diff options
author | Jeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen@ergo-project.org> | 2010-09-08 21:05:15 (GMT) |
---|---|---|
committer | Jeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen@ergo-project.org> | 2010-09-08 21:05:15 (GMT) |
commit | e38dad55bcb9eb40b56e12e4f41e3cc3bc6edfa0 (patch) | |
tree | 5f0a4a0c99e6f5203e3de0ffe58257558b1c8527 /Makefile | |
download | kolab-docs-e38dad55bcb9eb40b56e12e4f41e3cc3bc6edfa0.tar.gz |
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..df218c3 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +PRODUCT=Kolab +VERSION=2.3.0 + +BUILD_FORMATS="pdf html html-single" +BUILD_LANGS="en-US" + +SRCDIR :=$(shell pwd) + +all: clean + @mkdir builds + @sed -i -r \ + -e 's|ENTITY PRODUCT_VERSION "([\.0-9]+)"|ENTITY PRODUCT_VERSION "$(VERSION)"|g' \ + -e 's|productnumber>([\.0-9]+)</productnumber|productnumber>$(VERSION)</productnumber|g' \ + `find -type f -name "Book_Info.xml" -or -name "*.ent"` + for dir in `find -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort`; do \ + if [ -f "$$dir/publican.cfg" ]; then \ + cd $$dir; \ + publican build \ + --formats=$(shell echo $(BUILD_FORMATS) | sed -e 's/ /,/g' -e 's/"//g') \ + --langs=$(shell echo $(BUILD_LANGS) | sed -e 's/ /,/g' -e 's/"//g') \ + || exit 1; \ + for build in `find tmp/ -mindepth 2 -maxdepth 2 -type d | sort`; do \ + [ "`basename $$build`" == "xml" ] && continue; \ + [ "`basename $$build`" == "xml_tmp" ] && continue; \ + lang=`echo $$build | awk -F'/' '{print $$2}'`; \ + format=`echo $$build | awk -F'/' '{print $$3}'`; \ + cp -a $$build $(SRCDIR)/builds/$(PRODUCT)-$(VERSION)-$$dir-$$lang.$$format; \ + done; \ + cd ../; \ + fi; \ + done + +clean: + @rm -rf builds + @for dir in `ls -d */`; do \ + if [ -f "$$dir/publican.cfg" ]; then \ + cd $$dir; \ + publican clean; \ + cd ../; \ + fi; \ + done |