Split Makefile in two
Peter Palfrader

Peter Palfrader commited on 2006-01-26 23:26:07
Zeige 2 geänderte Dateien mit 93 Einfügungen und 148 Löschungen.

... ...
@@ -18,151 +18,4 @@ WMLOPT  = \
18 18
           -D TORCVSSTABLE=$(TORCVSSTABLE) \
19 19
           -D TORCVSHEAD=$(TORCVSHEAD)
20 20
 
21
-LANGS=de en it fr se
22
-WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
23
-WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
24
-
25
-HTMLFILES = $(patsubst de/%.wml, %.html.de,          \
26
-             $(patsubst en/%.wml, %.html.en,         \
27
-              $(patsubst it/%.wml, %.html.it,        \
28
-               $(patsubst fr/%.wml, %.html.fr,       \
29
-                $(patsubst se/%.wml, %.html.se,      \
30
-            $(WMLFILES)                              \
31
-                 )                                   \
32
-                )                                    \
33
-               )                                     \
34
-              )                                      \
35
-             )
36
-DEPFILES =  $(patsubst de/%.wml,.deps/%.html.de.d,   \
37
-             $(patsubst en/%.wml,.deps/%.html.en.d,  \
38
-              $(patsubst it/%.wml,.deps/%.html.it.d, \
39
-               $(patsubst fr/%.wml,.deps/%.html.fr.d,\
40
-                $(patsubst se/%.wml,.deps/%.html.se.d,\
41
-            $(WMLFILES)                              \
42
-                 )                                   \
43
-                )                                    \
44
-               )                                     \
45
-              )                                      \
46
-             )
47
-
48
-
49
-all: $(HTMLFILES)
50
-
51
-
52
-
53
-%.html.en: en/%.wml
54
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
55
-
56
-%.html.de: de/%.wml en/%.wml
57
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
58
-
59
-%.html.it: it/%.wml en/%.wml
60
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
61
-
62
-%.html.fr: fr/%.wml en/%.wml
63
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
64
-
65
-%.html.se: se/%.wml en/%.wml
66
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
67
-
68
-.deps/%.html.en.d: en/%.wml .deps/.stamp
69
-	tmpfile=`tempfile` \
70
-	lang=`dirname $<` && \
71
-	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
72
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
73
-	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
74
-	rm -f $$tmpfile
75
-.deps/%.html.de.d: de/%.wml .deps/.stamp
76
-	tmpfile=`tempfile` \
77
-	lang=`dirname $<` && \
78
-	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
79
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
80
-	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
81
-	rm -f $$tmpfile
82
-.deps/%.html.it.d: it/%.wml .deps/.stamp
83
-	tmpfile=`tempfile` \
84
-	lang=`dirname $<` && \
85
-	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
86
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
87
-	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
88
-	rm -f $$tmpfile
89
-.deps/%.html.fr.d: fr/%.wml .deps/.stamp
90
-	tmpfile=`tempfile` \
91
-	lang=`dirname $<` && \
92
-	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
93
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
94
-	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
95
-	rm -f $$tmpfile
96
-.deps/%.html.se.d: se/%.wml .deps/.stamp
97
-	tmpfile=`tempfile` \
98
-	lang=`dirname $<` && \
99
-	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
100
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
101
-	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
102
-	rm -f $$tmpfile
103
-.deps/.stamp:
104
-	[ -d .deps ] || mkdir .deps
105
-	touch "$@"
106
-
107
-tor-manual-cvs.html.en: $(TORCVSHEAD)/doc/tor.1.in
108
-tor-manual.html.en: $(TORCVSSTABLE)/doc/tor.1.in
109
-
110
-translation-status.html.en: $(LANGS) $(WMIFILES) $(WMLFILES)
111
-
112
-dep: $(DEPFILES)
113
-
114
-clean:
115
-	rm -f $(HTMLFILES) $(DEPFILES)
116
-
117
-include $(DEPFILES)
118
-
119
-
120
-
121
-
122
-
123
-# If we choose to use make rather than perl.  gets us proper dependencies, but doesn't
124
-# catch invalid page links that nicely.  Also, this doesn't really work yet, since
125
-# I abandoned this path for the much simplier and more readable <page> tag in
126
-# links.wmi, which just uses 3 lines of perl.
127
-### 
128
-### %.en.html: en/%.wml include-auto/langlocallinks.en.wmi include-auto/locallinks.wmi
129
-### %.de.html: de/%.wml en/%.wml include-auto/langlocallinks.de.wmi include-auto/locallinks.wmi
130
-### %.it.html: it/%.wml en/%.wml include-auto/langlocallinks.it.wmi include-auto/locallinks.wmi
131
-### 
132
-### .deps/%.en.html.d: en/%.wml include-auto/langlocallinks.en.wmi include-auto/locallinks.wmi
133
-### .deps/%.de.html.d: de/%.wml include-auto/langlocallinks.de.wmi include-auto/locallinks.wmi
134
-### .deps/%.it.html.d: it/%.wml include-auto/langlocallinks.it.wmi include-auto/locallinks.wmi
135
-### 
136
-### 
137
-### 
138
-### include-auto/locallinks.wmi: $(LANGS)
139
-### 	files=$$(for i in $^; do ls -1 $$i/*.wml; done | \
140
-### 		xargs -n1 basename | sed -e 's,\.wml,,' | sort | uniq) && \
141
-### 	rm -f $@.tmp && \
142
-### 	echo "<define-tag pageALL whitespace=delete>" > $@.tmp && \
143
-### 	for f in $$files; do \
144
-### 		echo "<define-tag link-$$f whitespace=delete>$$f.html</define-tag>" >> $@.tmp; \
145
-### 	done
146
-### 	if ! [ -z "$$FORCE_LOCALLINKS_UPDATE" ] || ! [ -e "$@" ] || ! diff "$@" "$@".tmp > /dev/null; then \
147
-### 		cat "$@".tmp > "$@"; \
148
-### 	else \
149
-### 		echo "$@ hasn't changed and environment variable FORCE_LOCALLINKS_UPDATE not set"; \
150
-### 	fi
151
-### 	rm -f "$@".tmp
152
-### 
153
-### include-auto/langlocallinks.%.wmi: %
154
-### 	@[ -d include-auto ] || mkdir include-auto
155
-### 	lang=$< \
156
-### 	files=$$(for i in $^; do ls -1 $$i/*.wml; done | \
157
-### 		xargs -n1 basename | sed -e 's,\.wml,,' | sort | uniq) && \
158
-### 	rm -f $@.tmp && \
159
-### 	for f in $$files; do \
160
-### 		echo "<define-tag link-$$f whitespace=delete>$$f.$$lang.html</define-tag>" >> $@.tmp; \
161
-### 	done
162
-### 	if ! [ -z "$$FORCE_LOCALLINKS_UPDATE" ] || ! [ -e "$@" ] || ! diff "$@" "$@".tmp > /dev/null; then \
163
-### 		cat "$@".tmp > "$@"; \
164
-### 	else \
165
-### 		echo "$@ hasn't changed and environment variable FORCE_LOCALLINKS_UPDATE not set"; \
166
-### 	fi
167
-### 	rm -f "$@".tmp
168
-### 
21
+include $(WMLBASE)/Makefile.common
... ...
@@ -0,0 +1,92 @@
1
+
2
+LANGS=de en it fr se
3
+WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
4
+WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
5
+
6
+HTMLFILES = $(patsubst de/%.wml, %.html.de,          \
7
+             $(patsubst en/%.wml, %.html.en,         \
8
+              $(patsubst it/%.wml, %.html.it,        \
9
+               $(patsubst fr/%.wml, %.html.fr,       \
10
+                $(patsubst se/%.wml, %.html.se,      \
11
+            $(WMLFILES)                              \
12
+                 )                                   \
13
+                )                                    \
14
+               )                                     \
15
+              )                                      \
16
+             )
17
+DEPFILES =  $(patsubst de/%.wml,.deps/%.html.de.d,   \
18
+             $(patsubst en/%.wml,.deps/%.html.en.d,  \
19
+              $(patsubst it/%.wml,.deps/%.html.it.d, \
20
+               $(patsubst fr/%.wml,.deps/%.html.fr.d,\
21
+                $(patsubst se/%.wml,.deps/%.html.se.d,\
22
+            $(WMLFILES)                              \
23
+                 )                                   \
24
+                )                                    \
25
+               )                                     \
26
+              )                                      \
27
+             )
28
+
29
+
30
+all: $(HTMLFILES)
31
+
32
+
33
+
34
+%.html.en: en/%.wml
35
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
36
+
37
+%.html.de: de/%.wml en/%.wml
38
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
39
+
40
+%.html.it: it/%.wml en/%.wml
41
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
42
+
43
+%.html.fr: fr/%.wml en/%.wml
44
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
45
+
46
+%.html.se: se/%.wml en/%.wml
47
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
48
+
49
+.deps/%.html.en.d: en/%.wml .deps/.stamp
50
+	tmpfile=`tempfile` \
51
+	lang=`dirname $<` && \
52
+	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
53
+	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
54
+	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
55
+	rm -f $$tmpfile
56
+.deps/%.html.de.d: de/%.wml .deps/.stamp
57
+	tmpfile=`tempfile` \
58
+	lang=`dirname $<` && \
59
+	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
60
+	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
61
+	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
62
+	rm -f $$tmpfile
63
+.deps/%.html.it.d: it/%.wml .deps/.stamp
64
+	tmpfile=`tempfile` \
65
+	lang=`dirname $<` && \
66
+	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
67
+	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
68
+	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
69
+	rm -f $$tmpfile
70
+.deps/%.html.fr.d: fr/%.wml .deps/.stamp
71
+	tmpfile=`tempfile` \
72
+	lang=`dirname $<` && \
73
+	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
74
+	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
75
+	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
76
+	rm -f $$tmpfile
77
+.deps/%.html.se.d: se/%.wml .deps/.stamp
78
+	tmpfile=`tempfile` \
79
+	lang=`dirname $<` && \
80
+	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
81
+	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
82
+	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
83
+	rm -f $$tmpfile
84
+.deps/.stamp:
85
+	[ -d .deps ] || mkdir .deps
86
+	touch "$@"
87
+
88
+dep: $(DEPFILES)
89
+clean:
90
+	rm -f $(HTMLFILES) $(DEPFILES)
91
+
92
+include $(DEPFILES)
0 93