summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Makefile37
-rwxr-xr-xbuild/build.sh23
-rwxr-xr-xbuild/buildone.sh9
-rwxr-xr-xbuild/buildweb.sh23
-rwxr-xr-xbuild/clear.sh12
5 files changed, 57 insertions, 47 deletions
diff --git a/build/Makefile b/build/Makefile
new file mode 100644
index 000000000..998fe8e5e
--- /dev/null
+++ b/build/Makefile
@@ -0,0 +1,37 @@
+TARGETS=$(foreach language,$(languages),$(addprefix $(language).,$(architectures)))
+
+.PHONY: $(TARGETS)
+
+all: $(TARGETS)
+
+$(TARGETS): %:
+ target=$@ ; \
+ lang=$${target%.*} ; \
+ arch=$${target#*.} ; \
+ echo "Architecture: $$arch" ; \
+ if [ -n "$$noarchdir" ]; then \
+ destsuffix="$$lang" ; \
+ else \
+ if [ -n "$$web" ] ; then \
+ destsuffix="$$arch" ; \
+ else \
+ destsuffix="$$lang.$$arch" ; \
+ fi ; \
+ fi ; \
+ export destdir=build.out.$$lang.$$arch ; \
+ export tempdir=build.tmp.$$lang.$$arch ; \
+ ./buildone.sh "$$arch" "$$lang" "$$formats" ; \
+ mkdir -p "$$destination/$$destsuffix" ; \
+ for format in $$formats; do \
+ if [ "$$format" = html ]; then \
+ mv ./$$destdir/html/* "$$destination/$$destsuffix" ; \
+ else \
+ # Do not fail because of missing PDF support for some languages \
+ if [ -n "$$web" ] ; then \
+ mv ./$$destdir/install.$$lang.$$format "$$destination/$$destsuffix/install.$$format.$$lang" 2>/dev/null || true ; \
+ else \
+ mv ./$$destdir/install.$$lang.$$format "$$destination/$$destsuffix" 2>/dev/null || true ; \
+ fi ; \
+ fi ; \
+ done ; \
+ ./clear.sh
diff --git a/build/build.sh b/build/build.sh
index 910e9eeb6..b621c705a 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -48,28 +48,9 @@ for lang in $languages; do
if [ ! -d ../$lang ] && uses_po; then
generate_xml
fi
-
- for arch in $architectures; do
- echo "Architecture: $arch"
- if [ -n "$noarchdir" ]; then
- destsuffix="$lang"
- else
- destsuffix="${lang}.${arch}"
- fi
- ./buildone.sh "$arch" "$lang" "$formats"
- mkdir -p "$destination/$destsuffix"
- for format in $formats; do
- if [ "$format" = html ]; then
- mv ./build.out/html/* "$destination/$destsuffix"
- else
- # Do not fail because of missing PDF support for some languages
- mv ./build.out/install.$lang.$format "$destination/$destsuffix" 2>/dev/null || true
- fi
- done
-
- ./clear.sh
- done
done
+
+make languages="$languages" architectures="$architectures" destination="$destination" formats="$formats"
PRESEED="../en/appendix/preseed.xml"
if [ -f $PRESEED ] && [ -f preseed.pl ] ; then
diff --git a/build/buildone.sh b/build/buildone.sh
index 388b1cbec..f0437c08b 100755
--- a/build/buildone.sh
+++ b/build/buildone.sh
@@ -36,7 +36,10 @@ if [ -z "$destdir" ]; then
destdir="build.out"
fi
-tempdir="build.tmp"
+if [ -z "$tempdir" ]; then
+ tempdir="build.tmp"
+fi
+
dynamic="${tempdir}/dynamic.ent"
create_profiled () {
@@ -227,9 +230,9 @@ create_pdf() {
echo "Info: creating .pdf file..."
- dvipdf $tempdir/install.${language}.dvi
+ ( cd $tempdir ; dvipdf install.${language}.dvi )
RET=$?; [ $RET -ne 0 ] && return $RET
- mv install.${language}.pdf $destdir/
+ mv $tempdir/install.${language}.pdf $destdir/
return 0
}
diff --git a/build/buildweb.sh b/build/buildweb.sh
index da02a2ee5..1ac40e3e8 100755
--- a/build/buildweb.sh
+++ b/build/buildweb.sh
@@ -46,28 +46,9 @@ for lang in $languages; do
if [ ! -d ../$lang ] && uses_po; then
generate_xml
fi
-
- for arch in $architectures; do
- echo "Architecture: $arch"
- if [ -n "$noarchdir" ]; then
- destsuffix="$lang"
- else
- destsuffix="${arch}"
- fi
- ./buildone.sh "$arch" "$lang" "$formats"
- mkdir -p "$destination/$destsuffix"
- for format in $formats; do
- if [ "$format" = html ]; then
- mv -f ./build.out/html/* "$destination/$destsuffix"
- else
- # Do not fail because of missing PDF support for some languages
- mv -f ./build.out/install.$lang.$format "$destination/$destsuffix/install.$format.$lang" || true
- fi
- done
-
- ./clear.sh
- done
done
+
+make languages="$languages" architectures="$architectures" destination="$destination" formats="$formats" web=1
PRESEED="../en/appendix/preseed.xml"
if [ -f $PRESEED ] && [ -f preseed.pl ] ; then
diff --git a/build/clear.sh b/build/clear.sh
index 35178fe86..25acba0ad 100755
--- a/build/clear.sh
+++ b/build/clear.sh
@@ -5,5 +5,13 @@ manual_path="$(echo $basedir | sed "s:/build$::")"
build_path="$manual_path/build"
cd $build_path
-rm -rf build.out
-rm -rf build.tmp
+if [ -z "$destdir" ]; then
+ destdir="build.out"
+fi
+
+if [ -z "$tempdir" ]; then
+ tempdir="build.tmp"
+fi
+
+rm -rf "$destdir"
+rm -rf "$tempdir"