| 1 |
foka |
1.23 |
# The two-letter code for the language |
| 2 |
|
|
LANGUAGE := zh |
| 3 |
|
|
SUBLANG := cn tw |
| 4 |
foka |
1.21 |
|
| 5 |
foka |
1.23 |
include $(WMLBASE)/../Makefile.common |
| 6 |
|
|
|
| 7 |
|
|
# If you need to modify that is already defined in ../Makefile.common |
| 8 |
|
|
# you can put it below |
| 9 |
chinese |
1.1 |
|
| 10 |
chinese |
1.2 |
# Experimental tag by the Debian Chinese Translation Team |
| 11 |
foka |
1.23 |
SHELL = /bin/bash |
| 12 |
chinese |
1.3 |
BIN = $(WMLBASE)/bin |
| 13 |
|
|
B5TOU8 = $(BIN)/b5tou8 |
| 14 |
chinese |
1.4 |
U8TOB5 = $(BIN)/u8tob5 |
| 15 |
chinese |
1.3 |
U8TOGB = $(BIN)/u8togb |
| 16 |
chinese |
1.2 |
B5TOGB = ( cat - | $(B5TOU8) | $(U8TOGB) ) |
| 17 |
chinese |
1.9 |
TOCN = $(BIN)/tocn.pl |
| 18 |
|
|
TOTW = $(BIN)/totw.pl |
| 19 |
foka |
1.22 |
FIX_BIG5 = $(BIN)/fix_big5.pl |
| 20 |
chinese |
1.2 |
|
| 21 |
foka |
1.23 |
WMLOUTPUT = -o UNDEFuZH@uCN:$(*F).zh-cn.html.tmp@g+w \ |
| 22 |
|
|
-o UNDEFuZH@uTW:$(*F).zh-tw.html.tmp@g+w |
| 23 |
|
|
WMLPROLOG = --prolog=$(FIX_BIG5) |
| 24 |
|
|
WML = wml $(WMLOPTIONS) $(WMLOUTPUT) $(WMLPROLOG) $(WMLEPILOG) |
| 25 |
chinese |
1.18 |
|
| 26 |
chinese |
1.20 |
# These are the relevant WML and WMLOPTIONS definition for the old buggy WML. |
| 27 |
|
|
# Please DO NOT remove the following comments, in case they're needed again. |
| 28 |
|
|
# July 11, 2000 |
| 29 |
|
|
#WMLOPTIONS += -p1-8 |
| 30 |
|
|
#WML = ( wml $(WMLOPTIONS) $(WMLPROLOG) $(WMLEPILOG) \ |
| 31 |
|
|
# | /usr/lib/wml/exec/wml_p9_slice $(WMLOUTPUT) ) < |
| 32 |
|
|
#WMLEPILOG=--epilog='/usr/lib/wml/exec/wml_p9_slice $(WMLOUTPUT)' |
| 33 |
|
|
#WML=wml $(WMLOPTIONS) $(WMLPROLOG) $(WMLEPILOG) |
| 34 |
foka |
1.23 |
|
| 35 |
|
|
install:: |
| 36 |
|
|
@rm -f $(HTMLDIR)/*.imgdot-1x1-transp.gif |
| 37 |
|
|
|
| 38 |
|
|
clean:: |
| 39 |
|
|
rm -f *.$(LANGUAGE)-??.html |
| 40 |
|
|
rm -f *.$(LANGUAGE)-??.html.tmp |
| 41 |
|
|
|
| 42 |
|
|
cleandest:: |
| 43 |
|
|
rm -f $(HTMLDIR)/*.$(LANGUAGE)-??.html |
| 44 |
|
|
|
| 45 |
|
|
|
| 46 |
|
|
# Is there anyway to combine the following two rules into one? |
| 47 |
|
|
$(HTMLDIR)/%.zh-cn.html: %.zh-cn.html |
| 48 |
|
|
@echo copying $(@F) to $(HTMLDIR) |
| 49 |
|
|
-@cp $(@F) $(HTMLDIR) |
| 50 |
|
|
$(HTMLDIR)/%.zh-tw.html: %.zh-tw.html |
| 51 |
|
|
@echo copying $(@F) to $(HTMLDIR) |
| 52 |
|
|
-@cp $(@F) $(HTMLDIR) |
| 53 |
|
|
# Create %.html -> %.zh-tw.html symlink if no English version of %.wml exists |
| 54 |
|
|
@if [ ! -f "$(WMLBASE)/../english/$(CUR_DIR)/$(*F).wml" ]; then \ |
| 55 |
|
|
echo "Making a link $(@D)/$(*F).html -> $(@F)"; \ |
| 56 |
|
|
ln -f -s $(@F) $(@D)/$(*F).html; \ |
| 57 |
|
|
fi |
| 58 |
|
|
|
| 59 |
|
|
ifndef NOGENERICDEP |
| 60 |
foka |
1.24 |
%.zh-cn.html %.zh-tw.html: %.wml \ |
| 61 |
foka |
1.23 |
$(TEMPLDIR)/template.wml $(TEMPLDIR)/languages.wml \ |
| 62 |
foka |
1.24 |
$(TOCN) $(TOTW) $(ZHTEMPLATE) $(HTMLDEP) |
| 63 |
foka |
1.23 |
$(WML) $(<F) |
| 64 |
foka |
1.24 |
# # *.imgdot-1x1-transp.gif are evil! Get rid of them! |
| 65 |
|
|
# # Must set nullglob or else the following fails - foka, June 2000 |
| 66 |
foka |
1.23 |
@shopt -s nullglob; \ |
| 67 |
|
|
for i in *.imgdot-1x1-transp.gif; do \ |
| 68 |
|
|
rm -f $$i; \ |
| 69 |
|
|
j=`basename $$i .imgdot-1x1-transp.gif` ; \ |
| 70 |
|
|
for k in $$j.$(LANGUAGE)-??.html.tmp; do \ |
| 71 |
|
|
perl -pi -e "s|$$j\\.(?=imgdot-1x1-transp\\.gif)|$(WMLBASE)/Pics/|g" $$k; \ |
| 72 |
|
|
done; \ |
| 73 |
|
|
done |
| 74 |
|
|
@echo -n " * Converting: [zh_CN.GB2312], " |
| 75 |
|
|
@$(B5TOGB) < $*.zh-cn.html.tmp > $*.zh-cn.html |
| 76 |
|
|
@rm -f $*.zh-cn.html.tmp |
| 77 |
|
|
@$(TOCN) $*.zh-cn.html |
| 78 |
|
|
@echo "[zh_TW.Big5]." |
| 79 |
|
|
@mv -f $*.zh-tw.html.tmp $*.zh-tw.html |
| 80 |
|
|
@$(TOTW) $*.zh-tw.html |
| 81 |
|
|
endif |
| 82 |
|
|
|
| 83 |
|
|
# template dependencies |
| 84 |
|
|
|
| 85 |
|
|
$(WMLBASE)/template/debian-zh/template.tmpl: $(TEMPLDIR)/template.wml \ |
| 86 |
|
|
$(WMLBASE)/template/debian-zh/macros.tmpl \ |
| 87 |
|
|
$(WMLBASE)/template/debian-zh/navbar.tmpl |
| 88 |
|
|
touch $@ |