When generating xcoff_%.c, the last command is a sed command. In case of a
sed failure, this will leave an incomplete file, which will appear as up to
date to make, so consequently it will not be regenerated. Fix this by
sedding into a temporary file instead.
Also, use $< to access the prerequisite xcoff.c, instead of spelling out the
file name once more.
2019-01-28 Tom de Vries <tdevries@suse.de>
* Makefile.am (xcoff_%.c): Generate sed result into temporary file.
Use $< to access prerequisite.
* Makefile.in: Regenerate.
From-SVN: r268344
+2019-01-28 Tom de Vries <tdevries@suse.de>
+
+ * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
+ Use $< to access prerequisite.
+ * Makefile.in: Regenerate.
+
2019-01-25 Nathan Sidwell <nathan@acm.org>
* elf.c (elf_add): Pass "" filename to recursive call with
REPLACE='#undef BACKTRACE_XCOFF_SIZE\
#define BACKTRACE_XCOFF_SIZE'; \
$(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
- $(srcdir)/xcoff.c \
- > $@
+ $< \
+ > $@.tmp
+ mv $@.tmp $@
test_elf_SOURCES = test_format.c testlib.c
test_elf_LDADD = libbacktrace_noformat.la elf.lo
@NATIVE_TRUE@ REPLACE='#undef BACKTRACE_XCOFF_SIZE\
@NATIVE_TRUE@ #define BACKTRACE_XCOFF_SIZE'; \
@NATIVE_TRUE@ $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
-@NATIVE_TRUE@ $(srcdir)/xcoff.c \
-@NATIVE_TRUE@ > $@
+@NATIVE_TRUE@ $< \
+@NATIVE_TRUE@ > $@.tmp
+@NATIVE_TRUE@ mv $@.tmp $@
@NATIVE_TRUE@instrumented_alloc.lo: alloc.c