1
|
# This Makefile recodes source lang files into HTML Unicode.
|
2
|
# You should add your encodings to this file. You need to have GNU Recode
|
3
|
# installed.
|
4
|
#
|
5
|
# It is important to:
|
6
|
# - fix the delimiters of php code: <?php and ?>
|
7
|
# - convert CRLF -> LF
|
8
|
# - remove all text before first <?php
|
9
|
# - remove all text after last ?>
|
10
|
# using 'convert.awk'
|
11
|
#
|
12
|
# Modifications by Dave Smith, 2003-11-10:
|
13
|
# Added TARGETS variable for easy listing of all lang files.
|
14
|
# Added 'prepare' target to check that 'recode' is installed.
|
15
|
# Added 'clean' target to nuke recoded files.
|
16
|
# Surpressed verbose command line dumpage with '@'.
|
17
|
# Added dependency checking for incremental recoding.
|
18
|
# Added pretty "Recoding ..." messages.
|
19
|
# Added 'chmod 644' to 'all' target for correct file permissions.
|
20
|
# Modifications by Rafal Slubowski, 2003-12-12:
|
21
|
# All conversions of recoded text moved to convert.awk script
|
22
|
#
|
23
|
# $Id: Makefile,v 1.43.2.1 2005/11/19 09:51:27 chriskl Exp $
|
24
|
|
25
|
DESTDIR=./recoded
|
26
|
TARGETS=polish \
|
27
|
english \
|
28
|
chinese-tr \
|
29
|
chinese-sim \
|
30
|
danish \
|
31
|
dutch \
|
32
|
german \
|
33
|
spanish \
|
34
|
italian \
|
35
|
french \
|
36
|
russian \
|
37
|
japanese \
|
38
|
slovak \
|
39
|
turkish \
|
40
|
czech \
|
41
|
portuguese-br \
|
42
|
portuguese-pt \
|
43
|
swedish \
|
44
|
afrikaans \
|
45
|
arabic \
|
46
|
mongol \
|
47
|
ukrainian \
|
48
|
hungarian \
|
49
|
hebrew \
|
50
|
romanian
|
51
|
|
52
|
all: prepare ${TARGETS}
|
53
|
@for p in ${TARGETS} ; do chmod 644 ${DESTDIR}/$$p.php ; done
|
54
|
|
55
|
prepare:
|
56
|
@which recode >/dev/null 2>&1 || ( echo "You must have GNU 'recode' installed to use this Makefile,\
|
57
|
but I could not find it in your path!" && exit 1 )
|
58
|
@which sed >/dev/null 2>&1 || ( echo "You must have sed installed to use this Makefile,\
|
59
|
but I could not find it in your path!" && exit 1 )
|
60
|
@which awk >/dev/null 2>&1 || ( echo "You must have awk installed to use this Makefile,\
|
61
|
but I could not find it in your path!" && exit 1 )
|
62
|
|
63
|
clean:
|
64
|
@echo "Nuking recoded lang files..."
|
65
|
@for p in ${TARGETS} ; do rm -fv ${DESTDIR}/$$p.php ; done
|
66
|
|
67
|
polish: polish.php
|
68
|
@echo "Recoding polish..."
|
69
|
@cat polish.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
70
|
> ${DESTDIR}/polish.php
|
71
|
@chmod 644 polish.php ${DESTDIR}/polish.php
|
72
|
|
73
|
english: english.php
|
74
|
@echo "Recoding english..."
|
75
|
@cat english.php | recode latin1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
76
|
> ${DESTDIR}/english.php
|
77
|
@chmod 644 english.php ${DESTDIR}/english.php
|
78
|
|
79
|
dutch: dutch.php
|
80
|
@echo "Recoding dutch..."
|
81
|
@cat dutch.php | recode latin1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
82
|
> ${DESTDIR}/dutch.php
|
83
|
@chmod 644 dutch.php ${DESTDIR}/dutch.php
|
84
|
|
85
|
danish: danish.php
|
86
|
@echo "Recoding danish..."
|
87
|
@cat danish.php | recode latin1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
88
|
> ${DESTDIR}/danish.php
|
89
|
@chmod 644 danish.php ${DESTDIR}/danish.php
|
90
|
|
91
|
german: german.php
|
92
|
@echo "Recoding german..."
|
93
|
@cat german.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
94
|
> ${DESTDIR}/german.php
|
95
|
@chmod 644 german.php ${DESTDIR}/german.php
|
96
|
|
97
|
spanish: spanish.php
|
98
|
@echo "Recoding spanish..."
|
99
|
@cat spanish.php | recode iso-8859-1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
100
|
> ${DESTDIR}/spanish.php
|
101
|
@chmod 644 spanish.php ${DESTDIR}/spanish.php
|
102
|
|
103
|
italian: italian.php
|
104
|
@echo "Recoding italian..."
|
105
|
@cat italian.php | recode iso-8859-1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
106
|
> ${DESTDIR}/italian.php
|
107
|
@chmod 644 italian.php ${DESTDIR}/italian.php
|
108
|
|
109
|
chinese-tr: chinese-tr.php
|
110
|
@echo "Recoding chinese-tr..."
|
111
|
@cat chinese-tr.php | recode big5..xml | sed -e "s/'/'/g" | ./convert.awk \
|
112
|
> ${DESTDIR}/chinese-tr.php
|
113
|
@chmod 644 chinese-tr.php ${DESTDIR}/chinese-tr.php
|
114
|
|
115
|
chinese-sim: chinese-sim.php
|
116
|
@echo "Recoding chinese-sim..."
|
117
|
@cat chinese-sim.php | recode gb2312..xml | sed -e "s/'/'/g" | ./convert.awk \
|
118
|
> ${DESTDIR}/chinese-sim.php
|
119
|
@chmod 644 chinese-sim.php ${DESTDIR}/chinese-sim.php
|
120
|
|
121
|
french: french.php
|
122
|
@echo "Recoding french..."
|
123
|
@cat french.php | recode latin1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
124
|
> ${DESTDIR}/french.php
|
125
|
@chmod 644 french.php ${DESTDIR}/french.php
|
126
|
|
127
|
japanese: japanese.php
|
128
|
@echo "Recoding japanese..."
|
129
|
@cat japanese.php | recode euc-jp..xml | sed -e "s/'/'/g" | ./convert.awk \
|
130
|
> ${DESTDIR}/japanese.php
|
131
|
@chmod 644 japanese.php ${DESTDIR}/japanese.php
|
132
|
|
133
|
russian: russian.php
|
134
|
@echo "Recoding russian..."
|
135
|
@cat russian.php | recode koi8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
136
|
> ${DESTDIR}/russian.php
|
137
|
@chmod 644 russian.php ${DESTDIR}/russian.php
|
138
|
|
139
|
slovak: slovak.php
|
140
|
@echo "Recoding slovak..."
|
141
|
@cat slovak.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
142
|
> ${DESTDIR}/slovak.php
|
143
|
@chmod 644 slovak.php ${DESTDIR}/slovak.php
|
144
|
|
145
|
czech: czech.php
|
146
|
@echo "Recoding czech..."
|
147
|
@cat czech.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
148
|
> ${DESTDIR}/czech.php
|
149
|
@chmod 644 czech.php ${DESTDIR}/czech.php
|
150
|
|
151
|
turkish: turkish.php
|
152
|
@echo "Recoding turkish..."
|
153
|
@cat turkish.php | recode iso-8859-9..xml | sed -e "s/'/'/g" | ./convert.awk \
|
154
|
> ${DESTDIR}/turkish.php
|
155
|
@chmod 644 turkish.php ${DESTDIR}/turkish.php
|
156
|
|
157
|
portuguese-br: portuguese-br.php
|
158
|
@echo "Recoding portuguese-br..."
|
159
|
@cat portuguese-br.php | recode iso-8859-1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
160
|
> ${DESTDIR}/portuguese-br.php
|
161
|
@chmod 644 portuguese-br.php ${DESTDIR}/portuguese-br.php
|
162
|
|
163
|
portuguese-pt: portuguese-pt.php
|
164
|
@echo "Recoding portuguese-pt..."
|
165
|
@cat portuguese-pt.php | recode iso-8859-15..xml | sed -e "s/'/'/g" | ./convert.awk \
|
166
|
> ${DESTDIR}/portuguese-pt.php
|
167
|
@chmod 644 portuguese-pt.php ${DESTDIR}/portuguese-pt.php
|
168
|
|
169
|
swedish: swedish.php
|
170
|
@echo "Recoding swedish..."
|
171
|
@cat swedish.php | recode iso-8859-1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
172
|
> ${DESTDIR}/swedish.php
|
173
|
@chmod 644 swedish.php ${DESTDIR}/swedish.php
|
174
|
|
175
|
afrikaans: afrikaans.php
|
176
|
@echo "Recoding afrikaans..."
|
177
|
@cat afrikaans.php | recode iso-8859-1..xml | sed -e "s/'/'/g" | ./convert.awk \
|
178
|
> ${DESTDIR}/afrikaans.php
|
179
|
@chmod 644 afrikaans.php ${DESTDIR}/afrikaans.php
|
180
|
|
181
|
hungarian: hungarian.php
|
182
|
@echo "Recoding hungarian..."
|
183
|
@cat hungarian.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
184
|
> ${DESTDIR}/hungarian.php
|
185
|
@chmod 644 hungarian.php ${DESTDIR}/hungarian.php
|
186
|
|
187
|
arabic: arabic.php
|
188
|
@echo "Recoding arabic..."
|
189
|
@cat arabic.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
190
|
> ${DESTDIR}/arabic.php
|
191
|
@chmod 644 arabic.php ${DESTDIR}/arabic.php
|
192
|
|
193
|
mongol: mongol.php
|
194
|
@echo "Recoding mongol..."
|
195
|
@cat mongol.php | recode iso-8859-5..xml | sed -e "s/'/'/g" | ./convert.awk \
|
196
|
> ${DESTDIR}/mongol.php
|
197
|
@chmod 644 mongol.php ${DESTDIR}/mongol.php
|
198
|
|
199
|
ukrainian: ukrainian.php
|
200
|
@echo "Recoding ukrainian..."
|
201
|
@cat ukrainian.php | recode koi8-r..xml | sed -e "s/'/'/g" | ./convert.awk \
|
202
|
> ${DESTDIR}/ukrainian.php
|
203
|
@chmod 644 ukrainian.php ${DESTDIR}/ukrainian.php
|
204
|
|
205
|
hebrew: hebrew.php
|
206
|
@echo "Recoding hebrew..."
|
207
|
@cat hebrew.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
208
|
> ${DESTDIR}/hebrew.php
|
209
|
@chmod 644 hebrew.php ${DESTDIR}/hebrew.php
|
210
|
|
211
|
romanian: romanian.php
|
212
|
@echo "Recoding romanian..."
|
213
|
@cat romanian.php | recode utf-8..xml | sed -e "s/'/'/g" | ./convert.awk \
|
214
|
> ${DESTDIR}/romanian.php
|
215
|
@chmod 644 romanian.php ${DESTDIR}/romanian.php
|
216
|
|