3
@if grep '$$(top_srcdir)/acinclude.m4:' Makefile.am >/dev/null; then \
4
echo "*** Concatenating configure tests into acinclude.m4" ;\
5
rm -f acinclude.m4 configure.files ;\
6
$(MAKE) -f Makefile.am top_srcdir=. acinclude.m4 ;\
8
@if test -r configure.in.in; then \
9
rm -f subdirs configure.in ;\
10
echo "*** Creating list of subdirectories in subdirs" ;\
11
$(MAKE) -f Makefile.am top_srcdir=. subdirs ;\
12
echo "*** Searching for subdirectories..." ;\
13
$(MAKE) -f Makefile.am top_srcdir=. configure.in ;\
15
@echo "*** Retrieving configure tests needed by configure.in"
17
@echo "*** Scanning for include statements"
19
@echo "*** Building Makefile templates"
21
@echo "*** Scanning for moc files and kde tags"
23
@echo "*** Building configure"
25
@if test -r configure.in.in ; then \
26
perl -pi -e 'print "if test \"x\$$with_fast_perl\" = \"xyes\" ;\
27
then\n perl -i.bak \$$ac_aux_dir/conf.change.pl \$$CONFIG_STATUS\
28
|| mv \$$CONFIG_STATUS.bak \$$CONFIG_STATUS;\
29
\n rm -f \$$CONFIG_STATUS.bak;\nfi\
30
\n" if /^\s*chmod\s+.*\+x\s+.*CONFIG_STATUS/;' configure ;\
32
@echo "*** Creating date/time stamp"
34
@if egrep "^cvs-local:" Makefile.am >/dev/null; then \
35
$(MAKE) -f Makefile.am cvs-local ;\
37
@if grep '} \$$ac_kw foo' configure >/dev/null 2>&1; then perl -p -i -e "s/ac_kw foo/ac_kw int foo/" configure; fi
38
#David's hack for autoconf bug when $INSTALL is set
39
@perl -pi -e 'if (/\[\/\$$\]\*. INSTALL=/) { print $$_ ; $$_ = "\"\") ;;\n"; }' configure
41
@echo " Don't forget to run ./configure"
42
@echo " If you haven't done so in a while, run ./configure --help"
45
@if grep -e '$$(top_srcdir)/acinclude.m4:' Makefile.am >/dev/null; then \
46
$(MAKE) -f Makefile.am top_srcdir=. acinclude.m4 ;\
48
@if test -r configure.in.in; then \
49
$(MAKE) -f Makefile.am top_srcdir=. subdirs configure.in; \
53
automake --foreign --include-deps; \
56
if test -r configure.in.in ; then \
57
perl -pi -e 'print "if test \"x\$$with_fast_perl\" = \"xyes\" ;\
58
then\n perl -i.bak \$$ac_aux_dir/conf.change.pl \$$CONFIG_STATUS\
59
|| mv \$$CONFIG_STATUS.bak \$$CONFIG_STATUS;\
60
\n rm -f \$$CONFIG_STATUS.bak;\nfi\
61
\n" if /^\s*chmod\s+.*\+x\s+.*CONFIG_STATUS/;' configure ;\
64
if grep -e "^cvs-local:" Makefile.am >/dev/null; then \
65
$(MAKE) -f Makefile.am cvs-local ;\
67
if grep "ac_kw foo" configure >/dev/null 2>&1; then perl -p -i -e "s/ac_kw foo/ac_kw int foo/" configure; fi ;\
69
LIST=`find ./po -name "*.po"`; \
71
file2=`echo $$i | sed -e "s#\.po#\.gmo#"`; \
72
msgfmt -o $$file2 $$i || touch $$file2; \
75
@if grep -e "^cvs-dist-local:" Makefile.am >/dev/null; then \
76
$(MAKE) -f Makefile.am cvs-dist-local ;\
80
@if test ! -d CVS; then \
81
echo "You don't have a toplevel CVS directory."; \
82
echo "You most certainly didn't use cvs to get these sources."; \
83
echo "But this function depends on cvs's information."; \
87
dirs=`find . -type d | grep -v CVS | sed -e "s#^./##"` ;\
89
if test ! -d "$$pwd/$$i/CVS"; then \
96
if test ! -d "$$f"; then \
97
if grep "^/$$f/" CVS/Entries > /dev/null; then \
101
rm -f "$$pwd/$$i/$$f"; \
108
# The Makefiles have to be sorted for slashes, since configure creates
109
# only one directory per Makefile not the whole hierarchy
110
configure.in: configure.files $(shell test -f configure.files && cat configure.files) subdirs
111
@rm -f configure.in rm -f configure.in.new ;\
112
cat `cat configure.files | egrep -v "^configure.in.bot"` >> configure.in.new ;\
113
echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new ;\
114
echo "AC_OUTPUT( \\" >> configure.in.new ;\
115
mfs=`find . -type d -print | fgrep -v "/." | sed -e "s#\./##" -e "/^debian/d" | sort`; \
117
topleveldir=`echo $$i| sed -e "s#/.*##"`; \
118
if test -f $$topleveldir/configure.in; then \
121
if test ! -f $$i/Makefile.am; then \
124
if test -s inst-apps; then \
125
if test -z "`grep \"^$$topleveldir\" inst-apps`"; then \
129
echo "$$i/Makefile \\" >> configure.in.new ;\
131
egrep '^dnl AC_OUTPUT\(.*\)' `cat configure.files` | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#" >> configure.in.new ;\
132
echo ")" >> configure.in.new
134
if test -f configure.in.in; then \
135
if head -2 configure.in.in | egrep "^#MIN_CONFIG$$" > /dev/null; then \
136
line=`egrep "^AM_INIT_AUTOMAKE\(" configure.in.in` ;\
137
if test -n "$$line"; then \
138
modulename=`echo $$line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"` ;\
139
VERSION=`echo $$line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"` ;\
141
sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" configure.in.new > configure.in \
142
&& mv configure.in configure.in.new ;\
145
if test -z "$$modulename" || test "$$modulename" = "@MODULENAME@"; then \
146
modulename=`pwd`; modulename=`basename $$modulename`; \
148
if test -z "$$VERSION" || test "$$VERSION" = "@VERSION@"; then \
149
VERSION="\"2.1 beta 2\""; \
151
sed -e "s#@MODULENAME@#$$modulename#" configure.in.new | \
152
sed -e "s#@VERSION@#$$VERSION#" > configure.in
153
@if test -f configure.in.bot ; then cat configure.in.bot >> configure.in ; fi
154
@rm -f configure.in.new
156
configure.files: subdirs
158
for i in . .. ../.. ../../..; do \
159
if test -x $$i/admin; then admindir=$$i/admin; break; fi; \
161
rm -rf configure.files ;\
162
if test -f configure.in.in && head -2 configure.in.in | egrep "^#MIN_CONFIG$$" > /dev/null; then \
163
echo $$admindir/configure.in.min >> configure.files ;\
165
@test -f configure.in.in && echo configure.in.in >> configure.files
166
@list=`find . -name "configure.in.in" | sort`; \
167
for i in $$list; do if test -f $$i && test ! `dirname $$i` = "." ; then \
168
echo $$i >> configure.files ;\
170
@if test -f configure.in.mid ; then echo configure.in.mid >> configure.files ; fi
171
@if test -f configure.in.bot ; then echo configure.in.bot >> configure.files ; fi
174
@files=`ls -1 | sort`; \
179
compilefirst=`grep '^COMPILE_FIRST[ ]*=' Makefile.am | \
180
sed -e 's#^COMPILE_FIRST[ ]*=[ ]*#|#' | sed -e 's#$$#|#' | sed -e 's# #|#g'`;\
181
compilelast=`grep '^COMPILE_LAST[ ]*=' Makefile.am | \
182
sed -e 's#^COMPILE_LAST[ ]*=[ ]*#|#' | sed -e 's#$$#|#' | sed -e 's# #|#g'`;\
183
for i in $$files; do if test -d $$i; then \
184
if test -f $$i/Makefile.am; then \
185
if echo $$compilefirst | grep "|$$i|" >/dev/null; then \
186
first_dirs="$$first_dirs $$i" ;\
187
elif echo $$compilelast | grep "|$$i|" >/dev/null; then \
188
last_dirs="$$last_dirs $$i" ; \
189
else dirs="$$dirs $$i" ;\
195
for i in $$dirs; do \
196
echo $$i >> ./SUBDIRS; \
198
@if test -r subdirs && diff subdirs SUBDIRS > /dev/null; then \
201
@test -r SUBDIRS && mv SUBDIRS subdirs || true
204
@catalogs='$(POFILES)'; \
205
for cat in $$catalogs; do \
207
msgmerge -o $$cat.new $$cat $(PACKAGE).pot ; \
208
if test -s $$cat.new; then \
209
grep -v "\"POT-Creation" $$cat.new > $$cat.new.2 ; \
210
grep -v "\"POT-Creation" $$cat >> $$cat.new.1; \
211
if diff $$cat.new.1 $$cat.new.2; then \
214
mv $$cat.new $$cat ; \
216
rm -f $$cat.new.1 $$cat.new.2 ;\
224
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do \
225
egrep -v '^#([^:]|$)' po/$$i | egrep '^.*[^ ]+.*$$' | grep -v "\"POT-Creation" > po.backup/$$i ; \
226
cp po/$$i po.backup/backup_$$i ; \
227
touch -r po/$$i po.backup/backup_$$i ;\
230
@podir=$${podir:-$$PWD/po} ;\
231
files=`find . -name Makefile.am | xargs egrep -l '^messages:' `; \
232
dirs=`for i in $$files; do echo \`dirname $$i\`; done`; \
233
tmpname="$$PWD/messages.log" ;\
234
for subdir in $$dirs; do \
235
test -z "$$VERBOSE" || echo "Making messages in $$subdir"; \
237
if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then \
238
$${EXTRACTRC:-extractrc} *.rc *.ui > rc.cpp ;\
240
candidates=`ls -1 *.rc *.ui 2>/dev/null` ;\
241
if test -n "$$candidates"; then \
242
echo "$$subdir has *.rc or *.ui files, but not correct messages line" ;\
245
if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then \
246
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp ;\
247
else echo " " > _translatorinfo.cpp ;\
249
perl -e '$$mes=0; while (<STDIN>) { if (/^messages:/) { $$mes=1; print $$_; next; } if ($$mes) { if (/$$\\(XGETTEXT\)/ && / -o/) { s/ -o \$$\(podir\)/ _translatorinfo.cpp -o \$$\(podir\)/ } print $$_; } else { print $$_; } }' < Makefile.am > _transMakefile ;\
250
$(MAKE) -s -f _transMakefile podir=$$podir \
251
XGETTEXT="$${XGETTEXT:-xgettext} -C -ki18n \
252
-kI18N_NOOP -ktranslate -kaliasLocale \
253
-x $${includedir:-$$KDEDIR/include}/kde.pot" \
254
messages ) >$$tmpname 2>&1 ;\
255
test -s $$tmpname && (echo $$subdir ; cat $$tmpname) ;\
256
test ! -f $$subdir/rc.cpp || rm -f $$subdir/rc.cpp ;\
257
rm -f $$subdir/_translatorinfo.cpp ;\
258
rm -f $$subdir/_transMakefile ;\
261
@for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do \
262
if test ! -f po/$$i; then echo "disappeared: $$i"; fi ;\
264
@for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do \
265
egrep -v '^#([^:]|$)' po/$$i | egrep '^.*[^ ]+.*$$' | grep -v "\"POT-Creation" > temp.pot ;\
266
if test -f po.backup/$$i && test -n "`diff temp.pot po.backup/$$i`"; then \
267
echo "will update $$i"; \
268
msgmerge -q po.backup/backup_$$i po/$$i > temp.pot ;\
269
mv temp.pot po/$$i; \
271
if test -f po.backup/backup_$$i; then \
272
test -z "$$VERBOSE" || echo "I'm restoring $$i" ;\
273
mv po.backup/backup_$$i po/$$i; \
276
echo "will add $$i" ;\
284
perl -e '$$mes=0; while (<STDIN>) { if (/^messages:/) { $$mes=1; print $$_; next; } if ($$mes) { if (! /^\t/) { exit(0); } if (/$$\\(XGETTEXT\)/ && / -o/) { s/ -o/ _translatorinfo.cpp -o/ } print $$_; } }' < Makefile.am