webwml/Makefile.common

313 lines
14 KiB
Makefile
Raw Normal View History

# Directions for adding a new language:
# 1. Add the two-letter code to LANGS below.
# 2. Add a new "%.html.es: es/%.wml en/%.wml" clause below.
# 3. Add a new ".deps/%.html.es.d: es/%.wml .deps/.stamp" clause below.
# 4. mkdir a new two-letter directory. Make sure there's a foot.wmi
# and navigation.wmi.
# 5. Edit include/perl-globals.wmi, add to @LANGUAGES and %LANGUAGES.
# You might find useful %LANGUAGES strings at the bottom of
# http://debian.org/
# 6. Add a new images/es.png flag image.
WMLOPT = \
-I $(WMLBASE)/include \
-D DOCROOT=$(WMLBASE) \
-D IMGROOT=$(WMLBASE)/images \
-D TORGIT=$(TORGIT)\
-D DEVTAG=$(DEVTAG) \
-D STABLETAG=$(STABLETAG)
#LANGS=ar bms cy da de en es et fa fi fr hu id it ja ko nl no pl pt pt-br ru se tr vn zh-cn
LANGS=en es
WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
2010-08-16 18:18:15 +00:00
HTMLFILES=$(shell perl -le 's, (.*)/(.*).wml , $$2.html.$$1 ,x, print $$_ for @ARGV' $(WMLFILES))
DEPFILES=$(shell perl -le 's, (.*)/(.*).wml , .deps/$$2.html.$$1.d ,x, print $$_ for @ARGV' $(WMLFILES))
all: $(HTMLFILES)
%.html.en: en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.ar: ar/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.bms: bms/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.cy: cy/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.es: es/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.et: et/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.de: de/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
2011-03-27 18:22:36 +00:00
%.html.da: da/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.fa: fa/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.id: id/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.it: it/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.fi: fi/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.fr: fr/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.hu: hu/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.ja: ja/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.ko: ko/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.nl: nl/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.no: no/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.pl: pl/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.pt: pt/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.pt-br: pt-br/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.ru: ru/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.se: se/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.tr: tr/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.vi: vi/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.vn: vn/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
%.html.zh-cn: zh-cn/%.wml en/%.wml
lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
.deps/%.html.en.d: en/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
2011-03-09 17:55:38 +00:00
.deps/%.html.ar.d: ar/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.bms.d: bms/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.cy.d: cy/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.es.d: es/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.et.d: et/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$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=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
2011-03-27 18:22:36 +00:00
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.da.d: da/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.id.d: it/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$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=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.fa.d: fa/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.fi.d: fi/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$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=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.hu.d: hu/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.ja.d: ja/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.ko.d: ko/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.nl.d: nl/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.no.d: no/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.pl.d: pl/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.pt.d: pt/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.pt-br.d: pt-br/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.ru.d: ru/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$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=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.tr.d: tr/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.vi.d: vi/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.vn.d: vn/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
rm -f $$tmpfile
.deps/%.html.zh-cn.d: zh-cn/%.wml .deps/.stamp
tmpfile=`mktemp -t tmp.XXXXXXX` \
lang=`dirname $<` && \
OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$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 *.html.* .deps/*.html.*.d
for sub in $(SUBDIRS); do \
$(MAKE) -C "$$sub" WMLBASE=../$(WMLBASE) clean; \
done
include $(DEPFILES)