Subversion Repositories svn LFS-FR

Rev

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