Subversion Repositories svn LFS-FR

Rev

Rev 7373 | Blame | Compare with Previous | Last modification | View Log | RSS feed

HTMLDIRSYSV_MLANG := html-MLANG-sysv
HTMLDIRSYSD_MLANG := html-MLANG-systemd
HTMLTARSYSV_MLANG := LFS-$(MILESTONE)-MLANG-HTML.tar.bz2
HTMLTARSYSD_MLANG := LFS-$(MILESTONE)-systemd-MLANG-HTML.tar.bz2
PDFSYSV_MLANG := LFS-$(MILESTONE)-MLANG.pdf
PDFSYSD_MLANG := LFS-$(MILESTONE)-MLANG-systemd.pdf
EPUBSYSV_MLANG := LFS-$(MILESTONE)-MLANG.epub
EPUBSYSD_MLANG := LFS-$(MILESTONE)-systemd-MLANG.epub

XML_MLANG := $(shell find $(ORIGDIR) -name '*.xml' -o -name '*stylesheets*' -prune -a -type f | sed "s|$(ORIGDIR)/|lfsgen-MLANG/|g" | tr '\n' ' ')
PO_MLANG := $(shell find $(ORIGDIR) -name '*.xml' -o -name '*stylesheets*' -prune -a -type f | sed "s|$(ORIGDIR)/|MLANG/|g" | sed 's|.xml$$|.po|' | tr '\n' ' ')
PO += $(PO_MLANG)
IMAGES_MLANG := $(shell find images -type f | sed "s|^|lfsgen-MLANG/|g" | tr '\n' ' ')
STYLESHEETS_MLANG := $(shell find stylesheets -type f | sed "s|^|lfsgen-MLANG/|g" | tr '\n' ' ')
COPY_MLANG := $(addprefix lfsgen-MLANG/,$(filestoget))

lfsgen-MLANG/images/%: images/%
        mkdir -p $$(dirname $@)
        @rm -f $@
        cp $< $@

lfsgen-MLANG/stylesheets/%: stylesheets/%
        mkdir -p $$(dirname $@)
        @rm -f $@
        cp $< $@

lfsgen-MLANG/%.xml: $(ORIGDIR)/%.xml MLANG/%.po sed-MLANG
        mkdir -p $$(dirname $@)
        LANG=$(LANG_MLANG) po4a-translate -k 0 -f docbook -m $< -l $@.tmp -p $(word 2,$^)
        ./$(word 3,$^) $@
        rm $@.tmp

MLANG/%.po: $(ORIGDIR)/%.xml
        mkdir -p $$(dirname $@)
        LANG=$(LANG_MLANG) po4a-updatepo -f docbook -m $< -p $@
        @touch $@

clean-gen-MLANG:
        rm -rf lfsgen-MLANG

clean-product-MLANG:
        rm -rf $(HTMLTARSYSV_MLANG)
        rm -rf $(HTMLTARSYSD_MLANG)
        rm -rf $(HTMLDIRSYSV_MLANG)
        rm -rf $(HTMLDIRSYSD_MLANG)
        rm -rf $(PDFSYSV_MLANG)
        rm -rf $(PDFSYSD_MLANG)
        rm -rf $(EPUBSYSV_MLANG)
        rm -rf $(EPUBSYSD_MLANG)

.SECONDEXPANSION:
$(addprefix lfsgen-MLANG/,$(filestocopy)): INPUT=$(ORIGDIR)$(subst lfsgen-MLANG,,$@)
$(addprefix lfsgen-MLANG/,$(filestocopy)): $$(INPUT)
        mkdir -p $$(dirname $@)
        cp -r $< $@

genhtml-MLANG-sysv: $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
        LANG=$(LANG_MLANG) make -C lfsgen-MLANG -j1 REV=sysv BASEDIR=../$(HTMLDIRSYSV_MLANG) book

genhtml-MLANG-sysd: $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
        LANG=$(LANG_MLANG) make -C lfsgen-MLANG -j1 REV=systemd BASEDIR=../$(HTMLDIRSYSD_MLANG) book

genpdf-MLANG-sysv: $(PDFSYSV_MLANG)

$(PDFSYSV_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
        LANG=$(LANG_MLANG) make -C lfsgen-MLANG -j1 REV=sysv BASEDIR=.. pdf
        mv LFS-BOOK.pdf $@

genpdf-MLANG-sysd: $(PDFSYSD_MLANG)

$(PDFSYSD_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
        LANG=$(LANG_MLANG) make -C lfsgen-MLANG -j1 REV=systemd BASEDIR=.. pdf
        mv LFS-SYSD-BOOK.pdf $@

gentar-MLANG-sysv: $(HTMLTARSYSV_MLANG)
$(HTMLTARSYSV_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG) genhtml-MLANG-sysv
        rm -f $@
        tar cjf $@ $(HTMLDIRSYSV_MLANG)

gentar-MLANG-sysd: $(HTMLTARSYSD_MLANG)
$(HTMLTARSYSD_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG) genhtml-MLANG-sysd
        rm -f $@
        tar cjf $@ $(HTMLDIRSYSD_MLANG)

genepub-MLANG-sysv: $(EPUBSYSV_MLANG)
$(EPUBSYSV_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
        LANG=$(LANG_MLANG) make -C lfsgen-MLANG -j1 REV=sysv EPUB_OUTPUT=$@ epub

genepub-MLANG-sysd: $(EPUBSYSD_MLANG)
$(EPUBSYSD_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
        LANG=$(LANG_MLANG) make -C lfsgen-MLANG -j1 REV=systemd EPUB_OUTPUT=$@ epub

upload-MLANG-sysv: $(SSH_AGENT)
        cd $(HTMLDIRSYSV_MLANG) ;\
        rsync --progress --recursive * $(USER)@www.linuxfromscratch.org:/srv/www/www.MLANG.linuxfromscratch.org/view/lfs-svn/

upload-MLANG-sysd: $(SSH_AGENT)
        cd $(HTMLDIRSYSD_MLANG) ;\
        rsync --progress --recursive * $(USER)@www.linuxfromscratch.org:/srv/www/www.MLANG.linuxfromscratch.org/view/lfs-systemd-svn/