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-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
?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.
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%