summaryrefslogtreecommitdiff
path: root/build/Makefile
diff options
context:
space:
mode:
authorSamuel Thibault <sthibault@debian.org>2012-08-27 07:59:07 +0000
committerSamuel Thibault <sthibault@debian.org>2012-08-27 07:59:07 +0000
commit4cf42d6dc39e7473f45445b72a7ecfe6f1524176 (patch)
treea316ebf6435fc7288edd4569e0d3ed2b549c3452 /build/Makefile
parent866bdd85974389487676b792a787dc29c85a36cc (diff)
downloadinstallation-guide-4cf42d6dc39e7473f45445b72a7ecfe6f1524176.zip
Add language-parallel build support.
Diffstat (limited to 'build/Makefile')
-rw-r--r--build/Makefile37
1 files changed, 37 insertions, 0 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