Subversion Repositories svn LFS-FR

Rev

Rev 7371 | Rev 7374 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7371 jlepiller 1
HTMLDIRSYSV_MLANG := html-MLANG-sysv
2
HTMLDIRSYSD_MLANG := html-MLANG-systemd
3
HTMLTARSYSV_MLANG := BLFS-$(MILESTONE)-MLANG-HTML.tar.bz2
4
HTMLTARSYSD_MLANG := BLFS-$(MILESTONE)-systemd-MLANG-HTML.tar.bz2
5
PDFSYSV_MLANG := BLFS-$(MILESTONE)-MLANG.pdf
6
PDFSYSD_MLANG := BLFS-$(MILESTONE)-MLANG-systemd.pdf
7
EPUBSYSV_MLANG := BLFS-$(MILESTONE)-MLANG.epub
8
EPUBSYSD_MLANG := BLFS-$(MILESTONE)-systemd-MLANG.epub
9
 
7372 jlepiller 10
XML_MLANG := $(shell find $(ORIGDIR) -name '*.xml' -a -type f -o -name stylesheets -prune -a -type f -o -name archive -prune -a -type f | sed "s|$(ORIGDIR)/|blfsgen-MLANG/|g" | tr '\n' ' ')
11
PO_MLANG := $(shell find $(ORIGDIR) -name '*.xml' -a -type f -o -name stylesheets -prune -a -type f -o -name archive -prune -a -type f | sed "s|$(ORIGDIR)/|MLANG/|g" | sed 's|.xml$|.po|' | tr '\n' ' ')
7371 jlepiller 12
PO += $(PO_MLANG)
13
IMAGES_MLANG := $(shell find images -type f | sed "s|^|blfsgen-MLANG/|g" | tr '\n' ' ')
14
STYLESHEETS_MLANG := $(shell find stylesheets -type f | sed "s|^|blfsgen-MLANG/|g" | tr '\n' ' ')
15
COPY_MLANG := $(addprefix blfsgen-MLANG/,$(filestoget))
16
 
17
blfsgen-MLANG/%.xml: $(ORIGDIR)/%.xml MLANG/%.po sed_MLANG.sh
18
	mkdir -p $$(dirname $@)
19
	LANG=$(LANG_MLANG) po4a-translate -k 0 -f docbook -m $< -l $@.tmp -p $(word 2,$^) -M ascii
20
	./$(word 3,$^) $@.tmp
21
	sed '0,/#-#/s|\([^>]*\) #-# \([^<]*\)|\1|' -i $@.tmp
22
	sed '0,/#-#/s|\([^>]*\) #-# \([^<]*\)|\2|' -i $@.tmp
23
	sed -e 's|encoding="ISO-8859-1"|encoding="UTF-8"|g' -i $@.tmp
24
	mv $@.tmp $@
25
 
26
blfsgen-MLANG/images/%: images/%
27
	mkdir -p $$(dirname $@)
28
	@rm -f $@
29
	cp $< $@
30
 
31
blfsgen-MLANG/stylesheets/%: stylesheets/%
32
	mkdir -p $$(dirname $@)
33
	@rm -f $@
34
	@if [ "$(DOCBOOK_LOCATION)" = "" ]; then \
35
	  echo "DOCBOOK_LOCATION not set. Please set it in config.mk" ;\
36
	  false ;\
37
	fi
38
	sed -e 's|DOCBOOK_LOCATION|$(DOCBOOK_LOCATION)|g' $< > $@
39
 
40
MLANG/%.po: $(ORIGDIR)/%.xml
41
	mkdir -p $$(dirname $@)
42
	LANG=$(LANG_MLANG) po4a-updatepo -f docbook -m $< -p $@ -M ascii
43
	@touch $@
44
 
45
clean-gen-MLANG:
46
	rm -rf blfsgen-MLANG
47
 
48
clean-product-MLANG:
49
	rm -rf $(HTMLTARSYSV_MLANG)
50
	rm -rf $(HTMLTARSYSD_MLANG)
51
	rm -rf $(HTMLDIRSYSV_MLANG)
52
	rm -rf $(HTMLDIRSYSD_MLANG)
53
	rm -rf $(PDFSYSV_MLANG)
54
	rm -rf $(PDFSYSD_MLANG)
55
	rm -rf $(EPUBSYSV_MLANG)
56
	rm -rf $(EPUBSYSD_MLANG)
57
 
58
.SECONDEXPANSION:
59
$(addprefix blfsgen-MLANG/,$(filestocopy)): INPUT=$(ORIGDIR)$(subst blfsgen-MLANG,,$@)
60
$(addprefix blfsgen-MLANG/,$(filestocopy)): $$(INPUT)
61
	mkdir -p $$(dirname $@)
62
	cp -r $< $@
63
 
64
genhtml-MLANG-sysv: $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
65
	LANG=$(LANG_MLANG) make -C blfsgen-MLANG -j1 REV=sysv BASEDIR=../$(HTMLDIRSYSV_MLANG) html
66
 
67
genhtml-MLANG-sysd: $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
68
	LANG=$(LANG_MLANG) make -C blfsgen-MLANG -j1 REV=systemd BASEDIR=../$(HTMLDIRSYSD_MLANG) html
69
 
70
genpdf-MLANG-sysv: $(PDFSYSV_MLANG)
71
 
72
$(PDFSYSV_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
73
	LANG=$(LANG_MLANG) make -C blfsgen-MLANG -j1 REV=sysv BASEDIR=.. PDF_OUTPUT=$@ pdf
74
 
75
genpdf-MLANG-sysd: $(PDFSYSD_MLANG)
76
 
77
$(PDFSYSD_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
78
	LANG=$(LANG_MLANG) make -C blfsgen-MLANG -j1 REV=systemd BASEDIR=.. PDF_OUTPUT=$@ pdf
79
 
80
gentar-MLANG-sysv: $(HTMLTARSYSV_MLANG)
81
$(HTMLTARSYSV_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG) genhtml-MLANG-sysv
82
	rm -f $@
83
	tar cjf $@ $(HTMLDIRSYSV_MLANG)
84
 
85
gentar-MLANG-sysd: $(HTMLTARSYSD_MLANG)
86
$(HTMLTARSYSD_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG) genhtml-MLANG-sysd
87
	rm -f $@
88
	tar cjf $@ $(HTMLDIRSYSD_MLANG)
89
 
90
genepub-MLANG-sysv: $(EPUBSYSV_MLANG)
91
$(EPUBSYSV_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
92
	LANG=$(LANG_MLANG) make -C blfsgen-MLANG -j1 REV=sysv EPUB_OUTPUT=$@ epub
93
 
94
genepub-MLANG-sysd: $(EPUBSYSD_MLANG)
95
$(EPUBSYSD_MLANG): $(XML_MLANG) $(COPY_MLANG) $(IMAGES_MLANG) $(STYLESHEETS_MLANG)
96
	LANG=$(LANG_MLANG) make -C blfsgen-MLANG -j1 REV=systemd EPUB_OUTPUT=$@ epub
97
 
98
upload-MLANG-sysv: $(SSH_AGENT)
99
	cd $(HTMLDIRSYSV_MLANG) ;\
100
	rsync --progress --recursive * $(USER)@www.linuxfromscratch.org:/srv/www/www.MLANG.linuxfromscratch.org/view/blfs-svn/
101
 
102
upload-MLANG-sysd: $(SSH_AGENT)
103
	cd $(HTMLDIRSYSD_MLANG) ;\
104
	rsync --progress --recursive * $(USER)@www.linuxfromscratch.org:/srv/www/www.MLANG.linuxfromscratch.org/view/blfs-systemd-svn/