Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: cflags Message-ID: <1991Jun16.040327.8818@jpl-devvax.jpl.nasa.gov> Date: 16 Jun 91 04:03:27 GMT References: Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 159 In article victor@watson.ibm.com writes: : I've had a working perl 4.003. I just got patches 4 through 10 from : devvax, and applied them. I did a make clean, then a Configure, make : depend, and make. However, after running bison make dies as follows: : : `sh cflags perly.o` perly.c : cflags: cflags: cannot open : *** Exit 1 : : There is NO cflags in the perl directory. There is a cflags.SH. I : tried a : : ln cflags.SH cflags : : and then make gives: : : `sh cflags perly.o` perly.c : CFLAGS = -Hpcc -O : sh: -Hpcc: not found : *** Exit 1 : : From looking at patch04 I find that there has been a change from : cflags to cflags.SH and and cflags.SH now puts out the name of the : compiler. Why didn't the patch update my stuff? The only thing that : I can think, is that I had customized cflags.SH to remove the -O flag : for certain programs (because the compiler couldn't hack it). What : should I do? Well, your cflags.SH may be trashed by now, since cflags.SH now writes cflags, and you linked them. Your mistake was probably back when you didn't notice that a patch failed. There might even be a reject file out there still. Here's what cflags.SH should look like: #! /bin/sh echo Extracting cflags.SH sed >cflags.SH <<'!STUFFY!FUNK!' -e 's/X//' Xcase $CONFIG in X'') X if test ! -f config.sh; then X ln ../config.sh . || \ X ln ../../config.sh . || \ X ln ../../../config.sh . || \ X (echo "Can't find config.sh."; exit 1) X fi X . config.sh X ;; Xesac X: This forces SH files to create target in same directory as SH file. X: This is so that make depend always knows where to find SH derivatives. Xcase "$0" in X*/*) cd `expr X$0 : 'X\(.*\)/'` ;; Xesac Xecho "Extracting cflags (with variable substitutions)" X: This section of the file will have variable substitutions done on it. X: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. X: Protect any dollar signs and backticks that you do not want interpreted X: by putting a backslash in front. You may delete these comments. X$spitshell >cflags <>cflags <<'!NO!SUBS!' Xcase "$0" in X*/*) cd `expr X$0 : 'X\(.*\)/'` ;; Xesac Xcase $CONFIG in X'') X if test ! -f config.sh; then X ln ../config.sh . || \ X ln ../../config.sh . || \ X ln ../../../config.sh . || \ X (echo "Can't find config.sh."; exit 1) X fi 2>/dev/null X . ./config.sh X ;; Xesac X Xalso=': ' Xcase $# in X1) also='echo 1>&2 " CCCMD = "' Xesac X Xcase $# in X0) set *.c; echo "The current C flags are:" ;; Xesac X Xset `echo "$* " | sed 's/\.[oc] / /g'` X Xfor file do X X case "$#" in X 1) ;; X *) echo $n " $file.c $c" ;; X esac X X : allow variables like toke_cflags to be evaluated X X eval 'eval ${'"${file}_cflags"'-""}' X X : or customize here X X case "$file" in X array) ;; X cmd) ;; X cons) ;; X consarg) ;; X doarg) ;; X doio) ;; X dolist) ;; X dump) ;; X eval) ;; X form) ;; X hash) ;; X malloc) ;; X perl) ;; X perly) ;; X regcomp) ;; X regexec) ;; X stab) ;; X str) ;; X toke) ;; X usersub) ;; X util) ;; X tarray) ;; X tcmd) ;; X tcons) ;; X tconsarg) ;; X tdoarg) ;; X tdoio) ;; X tdolist) ;; X tdump) ;; X teval) ;; X tform) ;; X thash) ;; X tmalloc) ;; X tperl) ;; X tperly) ;; X tregcomp) ;; X tregexec) ;; X tstab) ;; X tstr) ;; X ttoke) ;; X tusersub) ;; X tutil) ;; X *) ;; X esac X X echo "$cc -c $ccflags $optimize $large $split" X eval "$also "'"$cc -c $ccflags $optimize $large $split"' X X . ./config.sh X Xdone X!NO!SUBS! Xchmod +x cflags X$eunicefix cflags !STUFFY!FUNK! exit