File: Makefile

package info (click to toggle)
phpldapadmin 0.9.5-3sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,052 kB
  • ctags: 2,526
  • sloc: php: 21,258; sh: 262; makefile: 132; xml: 42
file content (144 lines) | stat: -rwxr-xr-x 4,646 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# 
# This Makefile (lang/Makefile) converts the source lang files to UTF8
# coding. You need iconv installed to use it.
# $Header: /cvsroot/phpldapadmin/phpldapadmin/lang/Makefile,v 1.24 2004/12/09 14:12:16 uugdave Exp $
# ToDo: detect the encoding in the "source"
#
# posible detect of the language
#  echo `cat de.php | grep "logged_in_as" | sed s/".*="//g | file - | sed s/".*: "//g | sed s/" .*"//g`
#
# or 
# 
# maybe like this
#  cat LANG.php | sed s/"^\/"//g | sed s/".*= "//g  | sed s/";.*"//g | grep -v "<"| file - | sed s/".*: "//g | sed s/" .*"//g      

# Where to place the recoded language files
DESTDIR=./recoded
# Path to the iconv binary
ICONV=iconv
# Path to the PHP binary
PHP=php

TARGETS=${DESTDIR}/auto.php \
		${DESTDIR}/ca.php \
		${DESTDIR}/cz.php \
		${DESTDIR}/de.php \
		${DESTDIR}/en.php \
		${DESTDIR}/es.php \
		${DESTDIR}/fr.php \
		${DESTDIR}/hu.php \
		${DESTDIR}/it.php \
		${DESTDIR}/ja.php \
		${DESTDIR}/nl.php \
		${DESTDIR}/pl.php \
		${DESTDIR}/pt-br.php \
		${DESTDIR}/ru.php \
		${DESTDIR}/sv.php \
		${DESTDIR}/zz.php \
		${DESTDIR}/zzz.php
# OFF zh-tw.php
#	        ${DESTDIR}/zh-tw.php \

default: 
	@echo "usage:"
	@echo " make iconvlang - to generate the lang coding"
	@echo " make iconvclean - to remove the utf8-converted file in  ${DESTDIR}"

iconvlang:	prepare ${TARGETS} syntax
	@echo "Setting permissions..."
	@chmod 644 ${TARGETS}
	@echo "Done!"

syntax: 
	@echo "Starting syntax checking..."
	@which $(PHP) >/dev/null 2>&1 || ( echo "You must have '$(PHP)' installed to use this Makefile, but I could not find it in your path!" && exit 1 )
	@for i in ${TARGETS}; do ${PHP} -l $$i >/dev/null 2>&1 || ( echo "Syntax errors found in $$i!" && exit 1 ); done
	@echo "Done"

prepare:
	@echo "Starting prepare"
	@which $(ICONV) >/dev/null 2>&1 || ( echo "You must have GNU '$(ICONV)' installed to use this Makefile, but I could not find it in your path!" && exit 1 )
	@mkdir -p ${DESTDIR}
	@chmod 755 ${DESTDIR}

iconvclean:
	@echo "deleting files "${TARGETS}
	@rm -vf ${TARGETS} 
	@echo "now use 'make iconvlang' to encode, otherwise you could not use phpldapadmin"

${DESTDIR}/auto.php: 	auto.php
	@echo "Fixing encoding auto.php to UTF8 "${DESTDIR}/auto.php
	@iconv -f iso8859-1 -t utf8 auto.php > ${DESTDIR}/auto.php


${DESTDIR}/ca.php: 	ca.php
	@echo "Fixing encoding ca.php to UTF8 "${DESTDIR}/ca.php
	@iconv -f iso8859-1 -t utf8 ca.php > ${DESTDIR}/ca.php

${DESTDIR}/cz.php: 	cz.php
	@echo "Fixing encoding cz.php to UTF8 "${DESTDIR}/cz.php
	@iconv -f iso8859-2 -t utf8 cz.php > ${DESTDIR}/cz.php


${DESTDIR}/de.php: 	de.php
	@echo "Fixing encoding de.php to UTF8 "${DESTDIR}/de.php
	@iconv -f iso8859-1 -t utf8 de.php > ${DESTDIR}/de.php

${DESTDIR}/en.php: 	en.php
	@echo "Fixing encoding en.php to UTF8 "${DESTDIR}/en.php
	@iconv -f iso8859-1 -t utf8 en.php > ${DESTDIR}/en.php

${DESTDIR}/es.php: 	es.php
	@echo "Fixing encoding es.php to UTF8 "${DESTDIR}/es.php
	@iconv -f iso8859-1 -t utf8 es.php > ${DESTDIR}/es.php

${DESTDIR}/fr.php: 	fr.php
	@echo "Fixing encoding fr.php to UTF8 "${DESTDIR}/fr.php
	@iconv -f iso8859-1 -t utf8 fr.php > ${DESTDIR}/fr.php

${DESTDIR}/hu.php: 	hu.php
	@echo "Fixing encoding hu.php to UTF8 "${DESTDIR}/hu.php
	#@iconv -f iso8859-2 -t utf8 hu.php > ${DESTDIR}/hu.php
	cp hu.php  ${DESTDIR}/.

${DESTDIR}/it.php: 	it.php
	@echo "Fixing encoding it.php to UTF8 "${DESTDIR}/it.php
	@iconv -f iso8859-1 -t utf8 it.php > ${DESTDIR}/it.php

${DESTDIR}/ja.php:  ja.php
	@echo "Copying only the ja.php"
	@cp ja.php ${DESTDIR}/.

${DESTDIR}/nl.php: 	nl.php
	@echo "Fixing encoding nl.php to UTF8 "${DESTDIR}/nl.php
	@iconv -f iso8859-1 -t utf8 nl.php > ${DESTDIR}/nl.php

${DESTDIR}/pl.php: 	pl.php
	@echo "Fixing encoding pl.php to UTF8 "${DESTDIR}/pl.php
	@iconv -f iso8859-2 -t utf8 pl.php > ${DESTDIR}/pl.php

${DESTDIR}/pt-br.php: 	pt-br.php
	@echo "Fixing encoding pt-br.php to UTF8 "${DESTDIR}/pt-br.php
	@iconv -f iso8859-1 -t utf8 pt-br.php > ${DESTDIR}/pt-br.php

${DESTDIR}/sv.php: 	sv.php
	@echo "Fixing encoding sv.php to UTF8 "${DESTDIR}/sv.php
	@iconv -f iso8859-1 -t utf8 sv.php > ${DESTDIR}/sv.php

${DESTDIR}/ru.php: 	ru.php
	@echo "Fixing encoding ru.php to UTF8 "${DESTDIR}/ru.php
	@iconv -f utf8 -t utf8 ru.php > ${DESTDIR}/ru.php

#${DESTDIR}/zh-tw.php:	zh-tw.php
#	@echo "Copying only the zh-tw.php"
        # 	@iconv -f utf8 -t utf8 zh-tw.php ${DESTDIR}/zh-tw.php
        # INTERNAL BUG COULDN CONVERT IT, SO WE COPY IT
	# cp zh-tw.php ${DESTDIR}/zh-tw.php
${DESTDIR}/zz.php:	zz.php
	@echo "Copying only the zz.php"
	@cp zz.php ${DESTDIR}/.

${DESTDIR}/zzz.php:	zzz.php
	@echo "Copying only the zzz.php"
	@cp zzz.php ${DESTDIR}/.