include ../tools/Makefile.base # Makefile.base overrides FO_XSLTPROC_OPTS = --stringparam paper.type A4 L10N_REVISION = revisjon # Stuff below here is added for building the Norwegian version. COLLAB=https://svn.red-bean.com/svnbook BOOKFILES = \ book.xml \ foreword.xml \ ch-preface.xml \ ch-fundamental-concepts.xml \ ch-basic-usage.xml \ ch-advanced-topics.xml \ ch-branching-and-merging.xml \ ch-repository-admin.xml \ ch-server-configuration.xml \ ch-customizing-svn.xml \ ch-developer-info.xml \ ch-reference.xml \ app-quickstart.xml \ app-svn-for-cvs-users.xml \ app-webdav.xml \ app-third-party-tools.xml \ copyright.xml \ index.xml BDTMP = bd.tmp htmlbook: $(MAKE) clean && $(MAKE) all-html editmode: $(MAKE) convfiles CONV_PARAM=-e commitmode: $(MAKE) convfiles CONV_PARAM= status: ./bin/genstat --directory book --full --precision 2 $(BOOKFILES) >TRANSLATION-STATUS convfiles: @for _prc in $(BOOKFILES); do \ echo -n "$$_prc: convert..."; \ dest=book/$$_prc; \ swp=book/.$$_prc.swp; \ if [ -e $$swp ]; then \ echo "$$swp: Swap file found. Is the file being edited?" >&2; \ exit 1; \ fi; \ bin/clean_files $(CONV_PARAM) $$dest >$$dest.tmp || exit 1; \ echo -n "move..."; \ mv $$dest.tmp $$dest; \ echo "OK."; \ done bookdiff: @mkdir $(BDTMP) || { \ read -p "\"$(BDTMP)\" already exists. Press ENTER to delete it, or CTRL-C to abort..." dummyvariable; \ rm -rf $(BDTMP); \ mkdir $(BDTMP); \ } $(MAKE) engdir cp -a book/eng $(BDTMP)/ @for _ptd in $(BOOKFILES); do \ cat $(BDTMP)/eng/$$_ptd | bin/clean_files -e >>$(BDTMP)/eng.txt; \ cat book/$$_ptd | bin/clean_files -e >>$(BDTMP)/norw.txt; \ done @echo @echo Checking files against the English version. If everything is fine, @echo you should see only one line of output between the ===== lines. @echo ===== @diff -du $(BDTMP)/eng.txt $(BDTMP)/norw.txt | grep ^- @echo ===== @echo @echo The temporary files are still in $(BDTMP)/ for you to play with. @echo @read -p "Press Enter to launch vimdiff or CTRL-C to exit..." dummyvariable vimdiff $(BDTMP)/norw.txt $(BDTMP)/eng.txt engdir: @if [ -d book/eng ]; then \ svn up -r`cat LAST_SYNC` book/eng; \ else \ svn co -r`cat LAST_SYNC` $(COLLAB)/trunk/src/en/book book/eng; \ fi sync: mkdir sync.LOCK svn update @echo ======= START svn status ======= @svn status -q @echo ======== END svn status ======== @read -p "Press Enter to continue or CTRL-C to abort..." dummyvariable @if [ "$(HEAD)" = "" ]; then \ svnversion . | tr -d M >HEADREV; \ else \ echo $(HEAD) >HEADREV; \ echo "Note: Merging up to r$(HEAD) instead of actual repository HEAD"; \ fi; $(MAKE) editmode svn merge -r$$(cat LAST_SYNC):$$(cat HEADREV) $(COLLAB)/trunk/src/en . mv HEADREV LAST_SYNC $(MAKE) commitmode rmdir sync.LOCK # $Id$ # vim: set ts=4 sw=4 sts=4 noet :