[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Split Makefile in two
Update of /home/or/cvsroot/website
In directory moria:/tmp/cvs-serv11726
Modified Files:
Makefile
Added Files:
Makefile.common
Log Message:
Split Makefile in two
Index: Makefile
===================================================================
RCS file: /home/or/cvsroot/website/Makefile,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -d -r1.11 -r1.12
--- Makefile 26 Jan 2006 22:21:25 -0000 1.11
+++ Makefile 26 Jan 2006 22:26:07 -0000 1.12
@@ -18,151 +18,4 @@ WMLOPT = \
-D TORCVSSTABLE=$(TORCVSSTABLE) \
-D TORCVSHEAD=$(TORCVSHEAD)
-LANGS=de en it fr se
-WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
-WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
-
-HTMLFILES = $(patsubst de/%.wml, %.html.de, \
- $(patsubst en/%.wml, %.html.en, \
- $(patsubst it/%.wml, %.html.it, \
- $(patsubst fr/%.wml, %.html.fr, \
- $(patsubst se/%.wml, %.html.se, \
- $(WMLFILES) \
- ) \
- ) \
- ) \
- ) \
- )
-DEPFILES = $(patsubst de/%.wml,.deps/%.html.de.d, \
- $(patsubst en/%.wml,.deps/%.html.en.d, \
- $(patsubst it/%.wml,.deps/%.html.it.d, \
- $(patsubst fr/%.wml,.deps/%.html.fr.d,\
- $(patsubst se/%.wml,.deps/%.html.se.d,\
- $(WMLFILES) \
- ) \
- ) \
- ) \
- ) \
- )
-
-
-all: $(HTMLFILES)
-
-
-
-%.html.en: en/%.wml
- lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
-
-%.html.de: de/%.wml en/%.wml
- lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
-
-%.html.it: it/%.wml en/%.wml
- lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
-
-%.html.fr: fr/%.wml en/%.wml
- lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
-
-%.html.se: se/%.wml en/%.wml
- lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
-
-.deps/%.html.en.d: en/%.wml .deps/.stamp
- tmpfile=`tempfile` \
- lang=`dirname $<` && \
- OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
- wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
- sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
- rm -f $$tmpfile
-.deps/%.html.de.d: de/%.wml .deps/.stamp
- tmpfile=`tempfile` \
- lang=`dirname $<` && \
- OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
- wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
- sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
- rm -f $$tmpfile
-.deps/%.html.it.d: it/%.wml .deps/.stamp
- tmpfile=`tempfile` \
- lang=`dirname $<` && \
- OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
- wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
- sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
- rm -f $$tmpfile
-.deps/%.html.fr.d: fr/%.wml .deps/.stamp
- tmpfile=`tempfile` \
- lang=`dirname $<` && \
- OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
- wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
- sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
- rm -f $$tmpfile
-.deps/%.html.se.d: se/%.wml .deps/.stamp
- tmpfile=`tempfile` \
- lang=`dirname $<` && \
- OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
- wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
- sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
- rm -f $$tmpfile
-.deps/.stamp:
- [ -d .deps ] || mkdir .deps
- touch "$@"
-
-tor-manual-cvs.html.en: $(TORCVSHEAD)/doc/tor.1.in
-tor-manual.html.en: $(TORCVSSTABLE)/doc/tor.1.in
-
-translation-status.html.en: $(LANGS) $(WMIFILES) $(WMLFILES)
-
-dep: $(DEPFILES)
-
-clean:
- rm -f $(HTMLFILES) $(DEPFILES)
-
-include $(DEPFILES)
-
-
-
-
-
-# If we choose to use make rather than perl. gets us proper dependencies, but doesn't
-# catch invalid page links that nicely. Also, this doesn't really work yet, since
-# I abandoned this path for the much simplier and more readable <page> tag in
-# links.wmi, which just uses 3 lines of perl.
-###
-### %.en.html: en/%.wml include-auto/langlocallinks.en.wmi include-auto/locallinks.wmi
-### %.de.html: de/%.wml en/%.wml include-auto/langlocallinks.de.wmi include-auto/locallinks.wmi
-### %.it.html: it/%.wml en/%.wml include-auto/langlocallinks.it.wmi include-auto/locallinks.wmi
-###
-### .deps/%.en.html.d: en/%.wml include-auto/langlocallinks.en.wmi include-auto/locallinks.wmi
-### .deps/%.de.html.d: de/%.wml include-auto/langlocallinks.de.wmi include-auto/locallinks.wmi
-### .deps/%.it.html.d: it/%.wml include-auto/langlocallinks.it.wmi include-auto/locallinks.wmi
-###
-###
-###
-### include-auto/locallinks.wmi: $(LANGS)
-### files=$$(for i in $^; do ls -1 $$i/*.wml; done | \
-### xargs -n1 basename | sed -e 's,\.wml,,' | sort | uniq) && \
-### rm -f $@.tmp && \
-### echo "<define-tag pageALL whitespace=delete>" > $@.tmp && \
-### for f in $$files; do \
-### echo "<define-tag link-$$f whitespace=delete>$$f.html</define-tag>" >> $@.tmp; \
-### done
-### if ! [ -z "$$FORCE_LOCALLINKS_UPDATE" ] || ! [ -e "$@" ] || ! diff "$@" "$@".tmp > /dev/null; then \
-### cat "$@".tmp > "$@"; \
-### else \
-### echo "$@ hasn't changed and environment variable FORCE_LOCALLINKS_UPDATE not set"; \
-### fi
-### rm -f "$@".tmp
-###
-### include-auto/langlocallinks.%.wmi: %
-### @[ -d include-auto ] || mkdir include-auto
-### lang=$< \
-### files=$$(for i in $^; do ls -1 $$i/*.wml; done | \
-### xargs -n1 basename | sed -e 's,\.wml,,' | sort | uniq) && \
-### rm -f $@.tmp && \
-### for f in $$files; do \
-### echo "<define-tag link-$$f whitespace=delete>$$f.$$lang.html</define-tag>" >> $@.tmp; \
-### done
-### if ! [ -z "$$FORCE_LOCALLINKS_UPDATE" ] || ! [ -e "$@" ] || ! diff "$@" "$@".tmp > /dev/null; then \
-### cat "$@".tmp > "$@"; \
-### else \
-### echo "$@ hasn't changed and environment variable FORCE_LOCALLINKS_UPDATE not set"; \
-### fi
-### rm -f "$@".tmp
-###
+include $(WMLBASE)/Makefile.common
--- NEW FILE: Makefile.common ---
LANGS=de en it fr se
WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
HTMLFILES = $(patsubst de/%.wml, %.html.de, \
$(patsubst en/%.wml, %.html.en, \
$(patsubst it/%.wml, %.html.it, \
$(patsubst fr/%.wml, %.html.fr, \
$(patsubst se/%.wml, %.html.se, \
$(WMLFILES) \
) \
) \
) \
) \
)
DEPFILES = $(patsubst de/%.wml,.deps/%.html.de.d, \
$(patsubst en/%.wml,.deps/%.html.en.d, \
$(patsubst it/%.wml,.deps/%.html.it.d, \
$(patsubst fr/%.wml,.deps/%.html.fr.d,\
$(patsubst se/%.wml,.deps/%.html.se.d,\
$(WMLFILES) \
) \
) \
) \
) \
)
all: $(HTMLFILES)
%.html.en: en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
%.html.de: de/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
%.html.it: it/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
%.html.fr: fr/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
%.html.se: se/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
.deps/%.html.en.d: en/%.wml .deps/.stamp
tmpfile=`tempfile` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.de.d: de/%.wml .deps/.stamp
tmpfile=`tempfile` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.it.d: it/%.wml .deps/.stamp
tmpfile=`tempfile` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.fr.d: fr/%.wml .deps/.stamp
tmpfile=`tempfile` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.se.d: se/%.wml .deps/.stamp
tmpfile=`tempfile` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/.stamp:
[ -d .deps ] || mkdir .deps
touch "$@"
dep: $(DEPFILES)
clean:
rm -f $(HTMLFILES) $(DEPFILES)
include $(DEPFILES)