]> sourceware.org Git - automake.git/commitdiff
* lib/am/yacc.am (?!GENERIC?%OBJ% aka .y.c): Don't redirect
authorJim Meyering <jim@meyering.net>
Fri, 18 Apr 2003 08:54:34 +0000 (08:54 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 18 Apr 2003 08:54:34 +0000 (08:54 +0000)
directly to $@.  Instead, redirect to $@t and rename upon success.
Also, move the commands that update $@ so they are last.  Otherwise,
this rule could leave the user with an up to date target (.c file)
but with a missing or corrupted corresponding .h file.

ChangeLog
lib/am/yacc.am

index 897008cafeafca3b9de5d4783f9ccdca7d607604..3101685800e43f768c71fae19ea30ba8763c7950 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-04-18  Jim Meyering  <jim@meyering.net>
+
+       * lib/am/yacc.am (?!GENERIC?%OBJ% aka .y.c): Don't redirect
+       directly to $@.  Instead, redirect to $@t and rename upon success.
+       Also, move the commands that update $@ so they are last.  Otherwise,
+       this rule could leave the user with an up to date target (.c file)
+       but with a missing or corrupted corresponding .h file.
+
 2003-04-17  Richard Dawe  <rich@phekda.freeserve.co.uk>
 
        * tests/defs.in: Handle required=runtest, to detect runtest
index eb0083dd1b14d2d037f6033f91fd760a8d37b382..cc799c49ad9bcc0929284dc45890d7a1a0a0694d 100644 (file)
@@ -26,9 +26,6 @@ else !%?MORE-THAN-ONE%
 ?GENERIC?      %COMPILE% %SOURCE%
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
 ?!GENERIC?     %COMPILE% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-## Edit out `#line' or `#' directives.
-       sed '/^#/ s|y\.tab\.c|%OBJ%|' y.tab.c >%OBJ%
-       rm -f y.tab.c
 ## Edit out Bison multiple inclusion guards.  It may be BISON_Y_TAB_H,
 ## or Y_TAB_H depending upon the version, that's why the regexp is
 ## so loose.
@@ -47,4 +44,7 @@ else !%?MORE-THAN-ONE%
        if test -f y.output; then \
          mv y.output %BASE%.output; \
        fi
+## Edit out `#line' or `#' directives.
+       sed '/^#/ s|y\.tab\.c|%OBJ%|' y.tab.c >%OBJ%t && mv %OBJ%t %OBJ%
+       rm -f y.tab.c
 endif !%?MORE-THAN-ONE%
This page took 0.02626 seconds and 5 git commands to generate.