3 if test -f config.sh; then TOP=.;
4 elif test -f ../config.sh; then TOP=..;
5 elif test -f ../../config.sh; then TOP=../..;
6 elif test -f ../../../config.sh; then TOP=../../..;
7 elif test -f ../../../../config.sh; then TOP=../../../..;
9 echo "Can't find config.sh."; exit 1
14 : This forces SH files to create target in same directory as SH file.
15 : This is so that make depend always knows where to find SH derivatives.
17 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
19 echo "Extracting cflags (with variable substitutions)"
20 : This section of the file will have variable substitutions done on it.
21 : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
22 : Protect any dollar signs and backticks that you do not want interpreted
23 : by putting a backslash in front. You may delete these comments.
24 $spitshell >cflags <<!GROK!THIS!
28 : In the following dollars and backticks do not need the extra backslash.
29 $spitshell >>cflags <<'!NO!SUBS!'
32 if test -f config.sh; then TOP=.;
33 elif test -f ../config.sh; then TOP=..;
34 elif test -f ../../config.sh; then TOP=../..;
35 elif test -f ../../../config.sh; then TOP=../../..;
36 elif test -f ../../../../config.sh; then TOP=../../../..;
38 echo "Can't find config.sh."; exit 1
45 optdebug='' # ensure -g used if building a -DDEBUGGING libperl
48 *perl.*) perltype='';;
49 *perld.*) perltype='-DDEBUGGING'; optdebug='-g' ;;
50 *perle.*) perltype='-DEMBED';;
51 *perlde.*) perltype='-DDEBUGGING -DEMBED'; optdebug='-g' ;;
52 *perlm.*) perltype='-DEMBED -DMULTIPLICITY';;
53 *perldm.*) perltype='-DDEBUGGING -DEMBED -DMULTIPLICITY'; optdebug='-g' ;;
60 1) also='echo 1>&2 " CCCMD = "'
64 0) set *.c; echo "The current C flags are:" ;;
67 set `echo "$* " | sed -e 's/\.[oc] / /g' -e 's/\.obj / /g'`
73 *) echo $n " $file.c $c" ;;
76 : allow variables like toke_cflags to be evaluated
78 eval 'eval ${'"${file}_cflags"'-""}'
121 if test "X$optdebug" != "X"; then
125 echo "$cc -c $ccflags $optimize $perltype $large $split"
126 eval "$also "'"$cc -c $ccflags $optimize $perltype $large $split"'