3f4369fc452583f2c811cd834710246f4def7aba
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

1) WMLOPT  = \
2)           -I $(WMLBASE)/include \
3)           -D DOCROOT=$(WMLBASE) \
4)           -D IMGROOT=$(WMLBASE)/images \
Roger Dingledine finish moving to tor-manual...

Roger Dingledine authored 18 years ago

5)           -D TORSVNSTABLE=$(TORSVNSTABLE) \
6)           -D TORSVNHEAD=$(TORSVNHEAD)
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

7) 
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

8) 
Roger Dingledine simplified chinese, transla...

Roger Dingledine authored 17 years ago

9) LANGS=de en es it fr ja pl pt ru se zh-cn
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

10) WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
11) WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
12) 
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

13) HTMLFILES = $(shell perl -le 's,  (.*)/(.*).wml  ,        $$2.html.$$1    ,x, print $$_ for @ARGV' $(WMLFILES))
14) DEPFILES  = $(shell perl -le 's,  (.*)/(.*).wml  ,  .deps/$$2.html.$$1.d  ,x, print $$_ for @ARGV' $(WMLFILES))
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

15) 
16) 
17) all: $(HTMLFILES)
18) 
19) %.html.en: en/%.wml
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

20) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

21) 
Roger Dingledine and make it make the espano...

Roger Dingledine authored 18 years ago

22) %.html.es: es/%.wml en/%.wml
23) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
24) 
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

25) %.html.de: de/%.wml en/%.wml
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

26) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

27) 
28) %.html.it: it/%.wml en/%.wml
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

29) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

30) 
31) %.html.fr: fr/%.wml en/%.wml
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

32) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

33) 
Roger Dingledine more steps closer to making...

Roger Dingledine authored 18 years ago

34) %.html.ja: ja/%.wml en/%.wml
35) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
36) 
Peter Palfrader Add polish index.wml

Peter Palfrader authored 18 years ago

37) %.html.pl: pl/%.wml en/%.wml
38) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
39) 
Peter Palfrader Build portuguese translation

Peter Palfrader authored 18 years ago

40) %.html.pt: pt/%.wml en/%.wml
41) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
42) 
Roger Dingledine simplified chinese, transla...

Roger Dingledine authored 17 years ago

43) %.html.ru: ru/%.wml en/%.wml
44) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
45) 
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

46) %.html.se: se/%.wml en/%.wml
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

47) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

48) 
Roger Dingledine simplified chinese, transla...

Roger Dingledine authored 17 years ago

49) %.html.zh-cn: zh-cn/%.wml en/%.wml
Peter Palfrader Add russian translation

Peter Palfrader authored 18 years ago

50) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
51) 
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

52) .deps/%.html.en.d: en/%.wml .deps/.stamp
53) 	tmpfile=`tempfile` \
54) 	lang=`dirname $<` && \
55) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
Roger Dingledine oh, and this one

Roger Dingledine authored 18 years ago

56) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
57) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
58) 	rm -f $$tmpfile
59) .deps/%.html.es.d: es/%.wml .deps/.stamp
60) 	tmpfile=`tempfile` \
61) 	lang=`dirname $<` && \
62) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

63) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

64) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
65) 	rm -f $$tmpfile
66) .deps/%.html.de.d: de/%.wml .deps/.stamp
67) 	tmpfile=`tempfile` \
68) 	lang=`dirname $<` && \
69) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

70) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

71) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
72) 	rm -f $$tmpfile
73) .deps/%.html.it.d: it/%.wml .deps/.stamp
74) 	tmpfile=`tempfile` \
75) 	lang=`dirname $<` && \
76) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

77) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

78) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
79) 	rm -f $$tmpfile
80) .deps/%.html.fr.d: fr/%.wml .deps/.stamp
81) 	tmpfile=`tempfile` \
82) 	lang=`dirname $<` && \
83) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

84) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Peter Palfrader Add polish index.wml

Peter Palfrader authored 18 years ago

85) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
86) 	rm -f $$tmpfile
Roger Dingledine more steps closer to making...

Roger Dingledine authored 18 years ago

87) .deps/%.html.ja.d: ja/%.wml .deps/.stamp
88) 	tmpfile=`tempfile` \
89) 	lang=`dirname $<` && \
90) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
91) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
92) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
93) 	rm -f $$tmpfile
Peter Palfrader Add polish index.wml

Peter Palfrader authored 18 years ago

94) .deps/%.html.pl.d: pl/%.wml .deps/.stamp
95) 	tmpfile=`tempfile` \
96) 	lang=`dirname $<` && \
97) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
98) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Peter Palfrader Build portuguese translation

Peter Palfrader authored 18 years ago

99) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
100) 	rm -f $$tmpfile
101) .deps/%.html.pt.d: pt/%.wml .deps/.stamp
102) 	tmpfile=`tempfile` \
103) 	lang=`dirname $<` && \
104) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
105) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

106) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
107) 	rm -f $$tmpfile
Roger Dingledine simplified chinese, transla...

Roger Dingledine authored 17 years ago

108) .deps/%.html.ru.d: ru/%.wml .deps/.stamp
109) 	tmpfile=`tempfile` \
110) 	lang=`dirname $<` && \
111) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
112) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
113) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
114) 	rm -f $$tmpfile
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

115) .deps/%.html.se.d: se/%.wml .deps/.stamp
116) 	tmpfile=`tempfile` \
117) 	lang=`dirname $<` && \
118) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

119) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

120) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
121) 	rm -f $$tmpfile
Roger Dingledine simplified chinese, transla...

Roger Dingledine authored 17 years ago

122) .deps/%.html.zh-cn.d: zh-cn/%.wml .deps/.stamp
Peter Palfrader Add russian translation

Peter Palfrader authored 18 years ago

123) 	tmpfile=`tempfile` \
124) 	lang=`dirname $<` && \
125) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
126) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
127) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
128) 	rm -f $$tmpfile
Peter Palfrader Split Makefile in two

Peter Palfrader authored 18 years ago

129) .deps/.stamp:
130) 	[ -d .deps ] || mkdir .deps
131) 	touch "$@"
132) 
133) dep: $(DEPFILES)
134) clean:
135) 	rm -f $(HTMLFILES) $(DEPFILES)
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

136) 	for sub in $(SUBDIRS); do \
137) 		$(MAKE) -C "$$sub" WMLBASE=../$(WMLBASE) clean; \
138) 	done