diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-03-31 00:56:10 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-03-31 00:56:10 +0000 |
commit | 56febc5ef28a2ff414c466231d08046390ce0f59 (patch) | |
tree | 160c3ab5de4440c084383be3699ccdd933f9fac5 /Makefile.SH | |
parent | 8bb9dbe4584e4740e744f2e392c02dc263a7baee (diff) | |
download | perl-56febc5ef28a2ff414c466231d08046390ce0f59.tar.gz |
perl5.001 patch.1b: [byacc deps fix, set*id fixes, x2p/walk.c emit_split()
fix]
This is my patch patch.1b for perl5.001.
[Actually, that's a lie. This is just a reposting of two of my
patches (removing some byacc dependencies and fixing some set*id
stuff) + one version of the x2p/walk.c emit_split() patch.
I've just usurped the letter 'b' to fit in my patch sequence.
You probably have already applied these as well, but again here they
are all packaged up nice and neatly for storage on ftp sites.]
Here's one possible solution to the byacc problem. Short summary:
make will think your perly.[ch] are out of date because perly.c.diff
has changed. They aren't really out of date, but the ordering of the
timestamps in the distribution fools make. I had put some traps in
perly.fixer to check to make sure that everything got run only if
you ran the same version of byacc (1.8) as Larry, but the traps aren't good
enough: There's a Cygnus version of byacc out there that also calls
itself 1.8 (with a +Cygnus xxx note attached). I don't think I'll
ever be able to reliably detect all mutant byacc's, so the safest
course of action seems to be to never run byacc.
(Yes, the perly.fixer check could be a _lot_ smarter. Volunteers?)
This simple-minded fix just puts in a
perly.c: perly.y
- touch perly.c
perly.h: perly.y
- touch perly.h
to bring perly.[ch] up to date, if needed.
The '-' are in case your source is read-only.
It also does the same trick in x2p/Makefile.SH.
WARNING! Danger! Larry, if you do this, it means you have to
explicitly call
make run_byacc
whenever you change perly.y, perly.c.diff, or
cd x2p; make run_byacc
if you change x2p/a2p.y.
However, it might be worth it. I leave it up to you.
Diffstat (limited to 'Makefile.SH')
-rw-r--r-- | Makefile.SH | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/Makefile.SH b/Makefile.SH index 9de1de763a..3613c4691f 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -273,42 +273,30 @@ lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.PL lib/Config.pm install: all ./perl installperl -!NO!SUBS! - -: Only print out the rules for running byacc if the user _has_ byacc. -: Otherwise, comment them out. Users who really know what they are -: doing can uncomment them and run yacc or bison or whatever. -case "$d_byacc" in -'define') - comment1='' - comment2='#' ;; -*) comment1='#' - comment2='' ;; -esac - -$spitshell >>Makefile <<!GROK!THIS! - -perly.h: perly.c - @ echo Dummy dependency for dumb parallel make - touch perly.h # I now supply perly.c with the kits, so the following section is -# used only if you have byacc. +# used only if you force byacc to run by saying +# make run_byacc +# Since we patch up the byacc output, the perly.fixer script needs +# to run with precisely the same version of byacc as I use. You +# normally shouldn't remake perly.[ch]. + +run_byacc: + @ echo 'Expect' 109 shift/reduce and 1 reduce/reduce conflict + $(BYACC) -d perly.y + sh $(shellflags) ./perly.fixer y.tab.c perly.c + mv y.tab.h perly.h + echo 'extern YYSTYPE yylval;' >>perly.h + +# We don't want to regenerate perly.c and perly.h, but they might +# appear out-of-date after a patch is applied or a new distribution is +# made. +perly.c: perly.y + - touch perly.c + +perly.h: perly.y + - touch perly.h -${comment1}perly.c: perly.y perly.c.diff -${comment1} @ echo 'Expect' 109 shift/reduce and 1 reduce/reduce conflict -${comment1} \$(BYACC) -d perly.y -${comment1} sh \$(shellflags) ./perly.fixer y.tab.c perly.c -${comment1} mv y.tab.h perly.h -${comment1} echo 'extern YYSTYPE yylval;' >>perly.h - -# This version is used if you do not have byacc. -${comment2}perly.c: perly.y -${comment2} touch perly.c - -!GROK!THIS! - -$spitshell >>Makefile <<'!NO!SUBS!' # Extensions: # Names added to $(dynamic_ext) or $(static_ext) will automatically # get built. There should ordinarily be no need to change any of @@ -374,9 +362,7 @@ config.h: config.sh # When done, touch perlmain.c so that it doesn't get remade each time. depend: makedepend - - test -f perly.h || cp /dev/null perly.h ./makedepend - - test -s perly.h || /bin/rm -f perly.h - test -s perlmain.c && touch perlmain.c cd x2p; $(MAKE) depend |