mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
[build] Fix sed portability bug: Don't use '\n' in sed script.
Regression introduced 2010-07-22, "[build] Overhaul <errno.h>, <signal.h> cpp symbol extraction/checking". See: <http://autobuild.josefsson.org/guile/log-201008181002653292000.txt> * libguile/Makefile.am (.syms.c): Convert one-liner sed script to while-read-echo loop.
This commit is contained in:
parent
b405cdb4c5
commit
319b53dd1c
1 changed files with 8 additions and 3 deletions
|
@ -721,10 +721,15 @@ MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
|
|||
# #ifdef SYMBOL
|
||||
# scm_c_define ("SYMBOL", scm_from_int (SYMBOL));
|
||||
# #endif
|
||||
# writing output to foo.c.
|
||||
# writing output to foo.c. We use a while-read loop instead of a
|
||||
# one-line sed script because some seds (e.g., FreeBSD) don't read
|
||||
# '\n' as a newline (like GNU sed does). Sad, but true.
|
||||
.syms.c:
|
||||
sed 's/.*/#ifdef &\nscm_c_define ("&", scm_from_int (&));\n#endif/' \
|
||||
$< > $@T
|
||||
cat $< | while read sym ; do \
|
||||
echo "#ifdef $$sym" ; \
|
||||
echo "scm_c_define (\"$$sym\", scm_from_int ($$sym));" ; \
|
||||
echo "#endif" ; \
|
||||
done > $@T
|
||||
mv $@T $@
|
||||
|
||||
# Write $(srcdir)/cpp-{E,SIG}.syms.NEW if there are any not-yet-seen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue