|
1 #!/bin/sh |
|
2 # |
|
3 # $Id: configure 715 2009-12-30 13:28:15Z dimitri $ |
|
4 # |
|
5 # Copyright (C) 1997-2008 by Dimitri van Heesch. |
|
6 # |
|
7 # Permission to use, copy, modify, and distribute this software and its |
|
8 # documentation under the terms of the GNU General Public License is hereby |
|
9 # granted. No representations are made about the suitability of this software |
|
10 # for any purpose. It is provided "as is" without express or implied warranty. |
|
11 # See the GNU General Public License for more details. |
|
12 # |
|
13 # Documents produced by Doxygen are derivative works derived from the |
|
14 # input used in their production; they are not affected by this license. |
|
15 # |
|
16 # shell script to configure doxygen |
|
17 |
|
18 doxygen_version_major=1 |
|
19 doxygen_version_minor=6 |
|
20 doxygen_version_revision=2 |
|
21 |
|
22 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. |
|
23 doxygen_version_mmn=20100106_dita_0.1.50 |
|
24 |
|
25 bin_dirs=`echo $PATH | sed -e "s/:/ /g"` |
|
26 |
|
27 f_debug=NO |
|
28 f_shared=YES |
|
29 f_make=NO |
|
30 f_dot=NO |
|
31 f_perl=NO |
|
32 f_plf_auto=NO |
|
33 f_prefix=/usr/local |
|
34 f_insttool=NO |
|
35 f_english=NO |
|
36 f_wizard=NO |
|
37 f_app=NO |
|
38 f_thread=NO |
|
39 f_flex=NO |
|
40 f_bison=NO |
|
41 f_langs=nl,sv,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za,ar,fa,vi,tr,eo |
|
42 |
|
43 while test -n "$1"; do |
|
44 case $1 in |
|
45 --prefix | -prefix) |
|
46 shift; f_prefix=$1 |
|
47 ;; |
|
48 --docdir | -docdir) |
|
49 shift; f_docdir=$1 |
|
50 ;; |
|
51 --shared | -shared) |
|
52 f_shared=YES |
|
53 ;; |
|
54 --static | -static) |
|
55 f_shared=NO |
|
56 ;; |
|
57 --release | -release) |
|
58 f_debug=NO |
|
59 ;; |
|
60 --debug | -debug) |
|
61 f_debug=YES |
|
62 ;; |
|
63 --english-only | -english-only) |
|
64 f_english=YES |
|
65 ;; |
|
66 --enable-langs | -enable-langs) |
|
67 shift; f_langs=$1 |
|
68 ;; |
|
69 --platform | -platform) |
|
70 shift; f_platform=$1 |
|
71 ;; |
|
72 --make | -make) |
|
73 shift; f_make=$1 |
|
74 ;; |
|
75 --dot | -dot) |
|
76 shift; f_dot=$1 |
|
77 ;; |
|
78 --perl | -perl) |
|
79 shift; f_perl=$1 |
|
80 ;; |
|
81 --flex | -flex) |
|
82 shift; f_flex=$1 |
|
83 ;; |
|
84 --bison | -bison) |
|
85 shift; f_bison=$1 |
|
86 ;; |
|
87 --install | -install) |
|
88 shift; f_insttool=$1 |
|
89 ;; |
|
90 --with-doxywizard | -with-doxywizard) |
|
91 f_wizard=YES |
|
92 ;; |
|
93 --with-doxyapp | -with-doxyapp) |
|
94 f_app=YES |
|
95 ;; |
|
96 -h | -help | --help) |
|
97 f_help=y |
|
98 ;; |
|
99 *) |
|
100 echo $1: unknown argument |
|
101 f_help=y |
|
102 f_error=y |
|
103 ;; |
|
104 esac |
|
105 shift |
|
106 done |
|
107 |
|
108 if test "$f_help" = y; then |
|
109 cat <<EOF |
|
110 Usage: $0 [--help] [--shared] [--static] [--release] [--debug] |
|
111 [--perl name] [--flex name] [--bison name] [--make name] |
|
112 [--dot name] [--platform target] [--prefix dir] [--docdir dir] |
|
113 [--install name] [--english-only] [----enable-langs list] |
|
114 [--with-doxywizard] [--with-doxyapp] |
|
115 |
|
116 Options: |
|
117 |
|
118 --help Print this help |
|
119 --shared | --static Build using shared or static linking |
|
120 [default: shared] |
|
121 --release | --debug Build for release or debug |
|
122 [default: release] |
|
123 --perl name Use \`name' as the name of the perl interpreter |
|
124 [default: autodetect] |
|
125 --flex name Use \`name' as the name of the GNU lexical scanner |
|
126 [default: autodetect] |
|
127 --bison name Use \`name' as the name of the GNU compiler generator |
|
128 [default: autodetect] |
|
129 --make name Use \`name' as the name of the GNU make tool |
|
130 [default: autodetect] |
|
131 --dot name Use \`name' as the name of the dot tool that |
|
132 is part of the Graphviz package. |
|
133 [default: autodetect] |
|
134 --platform target Do not detect platform but use \`target' instead. |
|
135 See PLATFORMS for a list of possibilities |
|
136 --prefix dir Installation prefix directory (doxygen will be |
|
137 put in PREFIX/bin/doxygen) |
|
138 [default: $f_prefix] |
|
139 --docdir dir Documentation is installed in DOCDIR/ |
|
140 [default: PREFIX/share/doc/packages/doxygen] |
|
141 --install name Use \`name' as the name of the GNU install tool |
|
142 [default: autodetect] |
|
143 --english-only Include support for English only. |
|
144 --enable-langs list Include support for output languages listed in list. |
|
145 [default: $f_langs] |
|
146 --with-doxywizard Build the GUI frontend for doxygen. This |
|
147 requires Qt 3.3.x |
|
148 --with-doxyapp Example showing how to embed doxygen in an application. |
|
149 |
|
150 EOF |
|
151 test "$f_error" = y && exit 1 |
|
152 exit 0; |
|
153 fi |
|
154 |
|
155 u_release=`(uname -r) 2>/dev/null` || u_release=unknown |
|
156 u_system=`(uname -s) 2>/dev/null` || u_system=unknown |
|
157 |
|
158 if test -z "$f_platform"; then |
|
159 f_platforms="`cat PLATFORMS`" |
|
160 |
|
161 case "$u_system:$u_release" in |
|
162 AIX*) |
|
163 f_platform=aix-xlc |
|
164 ;; |
|
165 BeOS*) |
|
166 f_platform=beos-g++ |
|
167 ;; |
|
168 dgux:*) |
|
169 f_platform=dgux-g++ |
|
170 ;; |
|
171 Darwin:*) |
|
172 f_platform=macosx-c++ |
|
173 if test "$f_insttool" = NO; then |
|
174 f_insttool=/usr/bin/install |
|
175 fi |
|
176 ;; |
|
177 FreeBSD:*) |
|
178 f_platform=freebsd-g++ |
|
179 if test "$f_insttool" = NO; then |
|
180 f_insttool=/usr/bin/install |
|
181 fi |
|
182 ;; |
|
183 HP-UX:*) |
|
184 f_platform=hpux-g++ |
|
185 if test "$f_insttool" = NO; then |
|
186 f_insttool=/usr/bin/install |
|
187 fi |
|
188 ;; |
|
189 IRIX64:*) |
|
190 f_platform=irix-64 |
|
191 ;; |
|
192 IRIX:*) |
|
193 f_platform=irix-n32 |
|
194 ;; |
|
195 Linux:*|GNU:*|GNU/*:*) |
|
196 f_platform=linux-g++ |
|
197 ;; |
|
198 NetBSD:*) |
|
199 f_platform=netbsd-g++ |
|
200 ;; |
|
201 OpenBSD:*) |
|
202 f_platform=openbsd-g++ |
|
203 ;; |
|
204 OSF1:*) |
|
205 f_platform=osf1-g++ |
|
206 ;; |
|
207 QNX:*) |
|
208 f_platform=qnx-g++ |
|
209 ;; |
|
210 *:3.2) |
|
211 f_platform=sco-g++ |
|
212 ;; |
|
213 SunOS:4*) |
|
214 f_platform=sunos-g++ |
|
215 ;; |
|
216 SunOS:5*) |
|
217 f_platform=solaris-g++ |
|
218 if test "$f_insttool" = NO; then |
|
219 f_insttool=/usr/bin/install |
|
220 fi |
|
221 ;; |
|
222 ULTRIX:*) |
|
223 f_platform=ultrix-g++ |
|
224 ;; |
|
225 UNIX_SV:4.2*) |
|
226 f_platform=unixware-g++ |
|
227 ;; |
|
228 Cygwin:*|CYGWIN*) |
|
229 f_platform=win32-g++ |
|
230 ;; |
|
231 *MiNT:*) |
|
232 f_platform=m68k-atari-mint-g++ |
|
233 ;; |
|
234 *) |
|
235 echo |
|
236 echo "Your platform was not recognised by this configure script" |
|
237 echo "Please use the -platform option to specify one of platforms" |
|
238 echo "in this list:" |
|
239 echo |
|
240 for p in $f_platforms |
|
241 do |
|
242 echo " $0 $* -platform $p" |
|
243 done |
|
244 echo |
|
245 exit 2 |
|
246 esac |
|
247 echo " Autodetected platform $f_platform... " |
|
248 f_plf_auto=YES |
|
249 fi |
|
250 |
|
251 if test -z "$f_docdir"; then |
|
252 f_docdir='$(INSTALL)/share/doc/packages/doxygen' |
|
253 fi |
|
254 |
|
255 if test "$f_plf_auto" = NO; then |
|
256 echo -n " Checking for platform $f_platform... " |
|
257 if test '!' -d tmake/lib/$f_platform; then |
|
258 echo "not supported!" |
|
259 echo |
|
260 exit 2 |
|
261 fi |
|
262 echo "supported" |
|
263 fi |
|
264 |
|
265 #- check for qt -------------------------------------------------------------- |
|
266 |
|
267 if test "$f_wizard" = YES; then |
|
268 if test -z "$QTDIR"; then |
|
269 echo " QTDIR environment variable not set!" |
|
270 echo -n " Checking for Qt..." |
|
271 for d in /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4}; do |
|
272 if test -x "$d/bin/qmake"; then |
|
273 QTDIR=$d |
|
274 fi |
|
275 done |
|
276 else |
|
277 echo " Detected Qt via the QTDIR environment variable..." |
|
278 echo -n " " |
|
279 fi |
|
280 if test -z "$QTDIR"; then |
|
281 echo "QTDIR not set and Qt not found at standard locations!" |
|
282 echo |
|
283 echo "Set the QTDIR environment variable such that \$QTDIR/bin/qmake exists." |
|
284 echo "check the Qt installation instructions!" |
|
285 exit 2 |
|
286 fi |
|
287 fi |
|
288 |
|
289 # - check for make ------------------------------------------------------------ |
|
290 |
|
291 echo -n " Checking for GNU make tool... " |
|
292 if test "$f_make" = NO; then |
|
293 make_names="gmake make" |
|
294 make_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" |
|
295 make_prog=NO |
|
296 for i in $make_names; do |
|
297 for j in $make_dirs; do |
|
298 if test -x "$j/$i"; then |
|
299 if test -n "`$j/$i --version 2>/dev/null | grep GNU`"; then |
|
300 make_prog="$j/$i" |
|
301 break 2 |
|
302 fi |
|
303 fi |
|
304 done |
|
305 done |
|
306 f_make="$make_prog" |
|
307 fi |
|
308 |
|
309 if test "$f_make" = NO; then |
|
310 echo "not found!"; |
|
311 echo |
|
312 exit 2 |
|
313 fi |
|
314 echo "using $f_make" |
|
315 |
|
316 # - check for install ------------------------------------------------------------ |
|
317 |
|
318 echo -n " Checking for GNU install tool... " |
|
319 if test "$f_insttool" = NO; then |
|
320 install_names="ginstall install" |
|
321 install_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin /usr/ucb" |
|
322 install_prog=NO |
|
323 install_found=NO |
|
324 for i in $install_names; do |
|
325 for j in $install_dirs; do |
|
326 if test -x "$j/$i"; then |
|
327 if test -n "`$j/$i --version 2>/dev/null | grep utils`"; then |
|
328 install_found=YES |
|
329 install_prog="$j/$i" |
|
330 break 2 |
|
331 fi |
|
332 fi |
|
333 done |
|
334 done |
|
335 f_insttool="$install_prog" |
|
336 fi |
|
337 |
|
338 if test "$f_insttool" = NO; then |
|
339 if test "$install_found" = YES; then |
|
340 echo; |
|
341 else |
|
342 echo "not found!"; |
|
343 echo |
|
344 fi |
|
345 echo "GNU version of install is required: this is part of the fileutils/coreutils package: " |
|
346 echo "see http://www.gnu.org/software/fileutils/fileutils.html" |
|
347 echo |
|
348 exit 2 |
|
349 fi |
|
350 echo "using $f_insttool"; |
|
351 |
|
352 |
|
353 # - check for dot ------------------------------------------------------------ |
|
354 |
|
355 echo -n " Checking for dot (part of GraphViz)... " |
|
356 if test "$f_dot" = NO; then |
|
357 dot_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" |
|
358 dot_prog=NO |
|
359 for j in $dot_dirs; do |
|
360 if test -x "$j/dot"; then |
|
361 dot_prog="$j/dot" |
|
362 break 2 |
|
363 fi |
|
364 done |
|
365 f_dot="$dot_prog" |
|
366 fi |
|
367 |
|
368 if test "$f_dot" = NO; then |
|
369 echo "not found!"; |
|
370 else |
|
371 echo "using $f_dot" |
|
372 fi |
|
373 |
|
374 # - check for perl ------------------------------------------------------------ |
|
375 |
|
376 echo -n " Checking for perl... " |
|
377 if test "$f_perl" = NO; then |
|
378 perl_names="perl perl5" |
|
379 perl_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" |
|
380 perl_prog=NO |
|
381 perl_found=NO |
|
382 for i in $perl_names; do |
|
383 for j in $perl_dirs; do |
|
384 if test -x "$j/$i"; then |
|
385 perl_found=YES |
|
386 if $j/$i -e 'require 5.000;' 2>/dev/null ; then |
|
387 perl_prog="$j/$i" |
|
388 break 2 |
|
389 fi |
|
390 fi |
|
391 done |
|
392 done |
|
393 f_perl="$perl_prog" |
|
394 fi |
|
395 |
|
396 if test "$f_perl" = NO; then |
|
397 if test "$perl_found" = YES; then |
|
398 echo "version is too old (5.000 or higher is required)." |
|
399 else |
|
400 echo "not found!"; |
|
401 fi |
|
402 echo |
|
403 exit 2 |
|
404 fi |
|
405 echo "using $f_perl"; |
|
406 |
|
407 # - check for flex ------------------------------------------------------------ |
|
408 |
|
409 echo -n " Checking for flex... " |
|
410 if test "$f_flex" = NO; then |
|
411 flex_dirs="$bin_dirs /usr/bin /usr/local/bin /bin" |
|
412 flex_prog=NO |
|
413 flex_found=NO |
|
414 for j in $flex_dirs; do |
|
415 if test -x "$j/flex"; then |
|
416 flex_found=YES |
|
417 flex_prog="$j/flex" |
|
418 break |
|
419 fi |
|
420 done |
|
421 f_flex="$flex_prog" |
|
422 fi |
|
423 |
|
424 if test "$f_flex" = NO; then |
|
425 echo "not found!"; |
|
426 exit 2 |
|
427 else |
|
428 echo "using $f_flex" |
|
429 fi |
|
430 |
|
431 # - check for bison ------------------------------------------------------------ |
|
432 |
|
433 echo -n " Checking for bison... " |
|
434 if test "$f_bison" = NO; then |
|
435 bison_dirs="$bin_dirs /usr/bin /usr/local/bin /bin" |
|
436 bison_prog=NO |
|
437 bison_found=NO |
|
438 for j in $bison_dirs; do |
|
439 if test -x "$j/bison"; then |
|
440 bison_found=YES |
|
441 bison_prog="$j/bison" |
|
442 break |
|
443 fi |
|
444 done |
|
445 f_bison="$bison_prog" |
|
446 fi |
|
447 |
|
448 if test "$f_bison" = NO; then |
|
449 echo "not found!"; |
|
450 exit 2 |
|
451 else |
|
452 echo "using $f_bison" |
|
453 fi |
|
454 |
|
455 # ----------------------------------------------------------------------------- |
|
456 |
|
457 # |
|
458 # Make VERSION file |
|
459 # |
|
460 echo " Creating VERSION file." |
|
461 # Output should be something like 1.4.5-20051010 |
|
462 if test "x$doxygen_version_mmn" = "xNO"; then |
|
463 echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision" > VERSION |
|
464 else |
|
465 echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision-$doxygen_version_mmn" > VERSION |
|
466 fi |
|
467 |
|
468 test -f .makeconfig && rm .makeconfig |
|
469 test -f .tmakeconfig && rm .tmakeconfig |
|
470 |
|
471 configPWD=`pwd` |
|
472 |
|
473 cat > .makeconfig <<EOF |
|
474 DOXYGEN = $configPWD |
|
475 TMAKEPATH = $configPWD/tmake/lib/$f_platform |
|
476 ENV = env TMAKEPATH=\$(TMAKEPATH) |
|
477 TMAKE = $configPWD/tmake/bin/tmake |
|
478 MAKE = $f_make |
|
479 PERL = $f_perl |
|
480 RM = rm -f |
|
481 CP = cp |
|
482 VERSION = `cat VERSION` |
|
483 INSTALL = $f_prefix |
|
484 INSTTOOL = $f_insttool |
|
485 DOXYDOCS = .. |
|
486 DOCDIR = $f_docdir |
|
487 QTDIR = $QTDIR |
|
488 EOF |
|
489 |
|
490 if test "$f_dot" != NO; then |
|
491 cat >> .makeconfig <<EOF |
|
492 HAVE_DOT = $f_dot |
|
493 EOF |
|
494 fi |
|
495 |
|
496 if test "$f_platform" = "m68k-atari-mint-g++"; then |
|
497 cat >> .makeconfig <<EOF |
|
498 TMAKE += -unix |
|
499 EOF |
|
500 fi |
|
501 |
|
502 |
|
503 # Make doxygen.spec... |
|
504 # |
|
505 echo " Created doxygen.spec file, for rpm generation." |
|
506 |
|
507 echo "%define version $doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision" > spec.tmp |
|
508 if test "$doxygen_version_mmn" = NO; then |
|
509 echo "%define revision 1" >> spec.tmp |
|
510 echo "%define mmn 1" >> spec.tmp |
|
511 else |
|
512 echo "%define revision $doxygen_version_mmn" >> spec.tmp |
|
513 echo "%define mmn $doxygen_version_mmn" >> spec.tmp |
|
514 fi |
|
515 |
|
516 mkdir -p packages |
|
517 mkdir -p packages/rpm |
|
518 |
|
519 cat spec.tmp ./packages/rpm/doxygen.spec.in > ./packages/rpm/doxygen.spec |
|
520 |
|
521 rm -f spec.tmp |
|
522 |
|
523 |
|
524 # make .tmakeconfig |
|
525 # |
|
526 touch .tmakeconfig |
|
527 if test "$f_shared" = NO; then |
|
528 if test "$f_platform" = "osf1-cxx" -o "$f_platform" = "irix-n32"; then |
|
529 cat >> .tmakeconfig <<EOF |
|
530 TMAKE_LFLAGS += -non_shared |
|
531 EOF |
|
532 elif test "$f_platform" = "solaris-cc"; then |
|
533 cat >> .tmakeconfig <<EOF |
|
534 TMAKE_LFLAGS += -Bstatic |
|
535 EOF |
|
536 elif test "$f_platform" = "hpux-cc"; then |
|
537 cat >> .tmakeconfig <<EOF |
|
538 TMAKE_LFLAGS += -noshared |
|
539 EOF |
|
540 else |
|
541 cat >> .tmakeconfig <<EOF |
|
542 TMAKE_LFLAGS += -static |
|
543 EOF |
|
544 fi |
|
545 fi |
|
546 if test "$f_platform" = "hpux-g++" -o "$f_platform" = "linux-g++"; then |
|
547 cat >> .tmakeconfig <<EOF |
|
548 TMAKE_CXXFLAGS += -D_LARGEFILE_SOURCE |
|
549 EOF |
|
550 fi |
|
551 if test "$f_platform" = "macosx-uni-c++"; then |
|
552 if test -n "`ls /Developer/SDKs/MacOSX10.*.sdk 2>/dev/null`"; then |
|
553 mac_sdk=MacOSX10.4u.sdk |
|
554 fi |
|
555 if test -n "`ls /Developer/SDKs/MacOSX10.5*.sdk 2>/dev/null`"; then |
|
556 mac_sdk=MacOSX10.5.sdk |
|
557 fi |
|
558 if test -n $mac_sdk; then |
|
559 cat >> .tmakeconfig <<EOF |
|
560 TMAKE_CFLAGS += -isysroot /Developer/SDKs/$mac_sdk |
|
561 TMAKE_CXXFLAGS += -isysroot /Developer/SDKs/$mac_sdk |
|
562 TMAKE_LFLAGS += -Wl,-syslibroot,/Developer/SDKs/$mac_sdk |
|
563 EOF |
|
564 fi |
|
565 fi |
|
566 if test "$f_wizard" = YES; then |
|
567 cat >> .tmakeconfig <<EOF |
|
568 TMAKE_MOC = $QTDIR/bin/moc |
|
569 EOF |
|
570 fi |
|
571 |
|
572 if test "$f_english" = YES; then |
|
573 cat >> .tmakeconfig <<EOF |
|
574 TMAKE_CXXFLAGS += -DENGLISH_ONLY |
|
575 EOF |
|
576 fi |
|
577 |
|
578 f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/doxmlparser/src/Makefile.in addon/doxmlparser/test/Makefile.in addon/doxmlparser/examples/metrics/Makefile.in libmd5/Makefile.in addon/doxyapp/Makefile.in" |
|
579 |
|
580 for i in $f_inmakefiles ; do |
|
581 SRC=$i |
|
582 DST=`echo $i|sed 's%\(.*\).in$%\1%'` |
|
583 TIME=`date` |
|
584 cat > $DST <<EOF |
|
585 # |
|
586 # This file was generated from `basename $i` on $TIME |
|
587 # |
|
588 |
|
589 EOF |
|
590 cat .makeconfig >> $DST |
|
591 if test $i = Makefile.in; then |
|
592 echo "" >> $DST |
|
593 echo "all: src/version.cpp " >> $DST |
|
594 echo " \$(MAKE) -C qtools" >> $DST |
|
595 echo " \$(MAKE) -C libmd5" >> $DST |
|
596 echo " \$(MAKE) -C src" >> $DST |
|
597 if test $f_wizard = YES; then |
|
598 echo " \$(MAKE) -C addon/doxywizard" >> $DST |
|
599 fi |
|
600 if test $f_app = YES; then |
|
601 echo " \$(MAKE) -C addon/doxyapp" >> $DST |
|
602 fi |
|
603 echo "" >> $DST |
|
604 echo "doxywizard_install:" >> $DST |
|
605 if test $f_wizard = YES; then |
|
606 echo " \$(MAKE) -C addon/doxywizard install" >> $DST |
|
607 fi |
|
608 echo "" >> $DST |
|
609 fi |
|
610 if test $f_wizard = YES; then |
|
611 sed -e "s/%%WITHDOXYWIZARD%% /--with doxywizard /g" $SRC >> $DST |
|
612 else |
|
613 sed -e "s/%%WITHDOXYWIZARD%% //g" $SRC >> $DST |
|
614 fi |
|
615 echo " Created $DST from $SRC..." |
|
616 done |
|
617 |
|
618 f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libmd5/libmd5.pro.in addon/doxyapp/doxyapp.pro.in" |
|
619 |
|
620 for i in $f_inprofiles ; do |
|
621 SRC=$i |
|
622 DST=`echo $i|sed 's%\(.*\).in$%\1%'` |
|
623 TIME=`date` |
|
624 cat > $DST <<EOF |
|
625 # |
|
626 # This file was generated from `basename $i` on $TIME |
|
627 # |
|
628 |
|
629 EOF |
|
630 if test "$f_debug" = NO; then |
|
631 realopts="release" |
|
632 else |
|
633 realopts="debug" |
|
634 fi |
|
635 #if test "$f_thread" = YES; then |
|
636 # realopts="$realopts thread" |
|
637 #fi |
|
638 cat $SRC .tmakeconfig | sed -e "s/\$extraopts/$realopts/g" >> $DST |
|
639 echo " Created $DST from $SRC..." |
|
640 done |
|
641 |
|
642 # - generating src/lang_cfg.h |
|
643 |
|
644 if test -f "src/lang_cfg.h"; then |
|
645 chmod u+w src/lang_cfg.h # make sure file can be overwritten |
|
646 fi |
|
647 echo -n " Generating src/lang_cfg.h..." |
|
648 echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>); |
|
649 chomp @l; |
|
650 @allowed=(split(/,/,"NL,SV,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,MK,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA,AR,FA,SC,VI,TR,EO")); |
|
651 foreach my $elem (@l){ |
|
652 $elem =~ tr/a-z/A-Z/; |
|
653 $r=0; |
|
654 foreach my $tst (@allowed){ |
|
655 if ($tst eq $elem) { $r=1; last; } |
|
656 } |
|
657 if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; } |
|
658 print "#define LANG_$elem\n"; |
|
659 };' > ./src/lang_cfg.h |
|
660 echo |