From: Akim Demaille Date: Sun, 30 Dec 2001 21:20:10 +0000 (+0000) Subject: * lib/am/yacc.am: Also rename the possible y.output file. X-Git-Tag: Release-1-5d~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9866cc1be268a50227c0787dd5543eb511ce5149;p=thirdparty%2Fautomake.git * lib/am/yacc.am: Also rename the possible y.output file. Remove the trailing y.tab.h. --- diff --git a/ChangeLog b/ChangeLog index d61855845..60d122e7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-12-30 Akim Demaille + + * lib/am/yacc.am: Also rename the possible y.output file. + Remove the trailing y.tab.h. + 2001-12-30 Paolo Bonzini * automake.texi (Install): Remove mention of nonexistent diff --git a/lib/am/yacc.am b/lib/am/yacc.am index 2c51b5773..8debce383 100644 --- a/lib/am/yacc.am +++ b/lib/am/yacc.am @@ -19,7 +19,7 @@ ?GENERIC?%EXT%%DERIVED-EXT%: ?!GENERIC?%OBJ%: %SOURCE% if %?MORE-THAN-ONE% - $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h -- %COMPILE% + $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE% else !%?MORE-THAN-ONE% %COMPILE% %SOURCE% ## Edit out `#line' or `#' directives. @@ -32,13 +32,17 @@ else !%?MORE-THAN-ONE% to=`echo "%BASE%_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ - sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >%BASE%.ht; \ + sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >%BASE%.ht; \ + rm y.tab.h; \ if cmp -s %BASE%.ht %BASE%.h; then \ rm -f %BASE%.ht ;\ else \ mv %BASE%.ht %BASE%.h; \ fi; \ fi + if test -f y.output; then \ + mv y.output %BASE%.output; \ + fi endif !%?MORE-THAN-ONE% ## Also generate a dependency for the .h file.