mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-03-30 22:19:06 +08:00
Libbacktrace: Fix the use of newline in sed replacement
On non-ELF targets, the Makefile needs a newline inside the sed REPLACE string. The way it is currently done fails with GNU Make < 4, but GCC only requires "GNU make version 3.80 (or later)". The portable solution is given in the autoconf manual: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Newlines-in-Make-Rules.html libbacktrace/ChangeLog: PR libbacktrace/103822 * Makefile.am: Fix newline. * Makefile.in: Regenerate.
This commit is contained in:
committed by
Ian Lance Taylor
parent
96bc206df0
commit
e652e16083
@@ -156,18 +156,18 @@ endif HAVE_OBJCOPY_DEBUGLINK
|
|||||||
endif HAVE_ELF
|
endif HAVE_ELF
|
||||||
|
|
||||||
elf_%.c: elf.c
|
elf_%.c: elf.c
|
||||||
|
nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
|
||||||
SEARCH='#error "Unknown BACKTRACE_ELF_SIZE"'; \
|
SEARCH='#error "Unknown BACKTRACE_ELF_SIZE"'; \
|
||||||
REPLACE='#undef BACKTRACE_ELF_SIZE\
|
REPLACE="#undef BACKTRACE_ELF_SIZE\\$${nl}#define BACKTRACE_ELF_SIZE"; \
|
||||||
#define BACKTRACE_ELF_SIZE'; \
|
|
||||||
$(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
$(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
||||||
$< \
|
$< \
|
||||||
> $@.tmp
|
> $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
xcoff_%.c: xcoff.c
|
xcoff_%.c: xcoff.c
|
||||||
|
nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
|
||||||
SEARCH='#error "Unknown BACKTRACE_XCOFF_SIZE"'; \
|
SEARCH='#error "Unknown BACKTRACE_XCOFF_SIZE"'; \
|
||||||
REPLACE='#undef BACKTRACE_XCOFF_SIZE\
|
REPLACE="#undef BACKTRACE_XCOFF_SIZE\\$${nl}#define BACKTRACE_XCOFF_SIZE"; \
|
||||||
#define BACKTRACE_XCOFF_SIZE'; \
|
|
||||||
$(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
$(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
||||||
$< \
|
$< \
|
||||||
> $@.tmp
|
> $@.tmp
|
||||||
|
|||||||
@@ -2647,18 +2647,18 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
|
|||||||
@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ mv $@.tmp $@
|
@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ mv $@.tmp $@
|
||||||
|
|
||||||
@NATIVE_TRUE@elf_%.c: elf.c
|
@NATIVE_TRUE@elf_%.c: elf.c
|
||||||
|
@NATIVE_TRUE@ nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
|
||||||
@NATIVE_TRUE@ SEARCH='#error "Unknown BACKTRACE_ELF_SIZE"'; \
|
@NATIVE_TRUE@ SEARCH='#error "Unknown BACKTRACE_ELF_SIZE"'; \
|
||||||
@NATIVE_TRUE@ REPLACE='#undef BACKTRACE_ELF_SIZE\
|
@NATIVE_TRUE@ REPLACE="#undef BACKTRACE_ELF_SIZE\\$${nl}#define BACKTRACE_ELF_SIZE"; \
|
||||||
@NATIVE_TRUE@ #define BACKTRACE_ELF_SIZE'; \
|
|
||||||
@NATIVE_TRUE@ $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
@NATIVE_TRUE@ $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
||||||
@NATIVE_TRUE@ $< \
|
@NATIVE_TRUE@ $< \
|
||||||
@NATIVE_TRUE@ > $@.tmp
|
@NATIVE_TRUE@ > $@.tmp
|
||||||
@NATIVE_TRUE@ mv $@.tmp $@
|
@NATIVE_TRUE@ mv $@.tmp $@
|
||||||
|
|
||||||
@NATIVE_TRUE@xcoff_%.c: xcoff.c
|
@NATIVE_TRUE@xcoff_%.c: xcoff.c
|
||||||
|
@NATIVE_TRUE@ nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
|
||||||
@NATIVE_TRUE@ SEARCH='#error "Unknown BACKTRACE_XCOFF_SIZE"'; \
|
@NATIVE_TRUE@ SEARCH='#error "Unknown BACKTRACE_XCOFF_SIZE"'; \
|
||||||
@NATIVE_TRUE@ REPLACE='#undef BACKTRACE_XCOFF_SIZE\
|
@NATIVE_TRUE@ REPLACE="#undef BACKTRACE_XCOFF_SIZE\\$${nl}#define BACKTRACE_XCOFF_SIZE"; \
|
||||||
@NATIVE_TRUE@ #define BACKTRACE_XCOFF_SIZE'; \
|
|
||||||
@NATIVE_TRUE@ $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
@NATIVE_TRUE@ $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
|
||||||
@NATIVE_TRUE@ $< \
|
@NATIVE_TRUE@ $< \
|
||||||
@NATIVE_TRUE@ > $@.tmp
|
@NATIVE_TRUE@ > $@.tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user