[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Missing $(LINK_WARNING_H) in test's Makefile causes error with Mac O
From: |
Bruno Haible |
Subject: |
Re: Missing $(LINK_WARNING_H) in test's Makefile causes error with Mac OS X 10.5.8's sed (GNU gnulib 2009-09-15 21:54:43) |
Date: |
Wed, 23 Sep 2009 10:34:59 +0200 |
User-agent: |
KMail/1.9.9 |
Hi,
Pauli Miettinen wrote:
> Building the gnulib's (GNU gnulib 2009-09-15 21:54:43) tests fail with
> Mac OS X 10.5.8 as follows:
>
> -e '/definition of GL_LINK_WARNING/r ' \
> < ./stdlib.in.h; \
> } > stdlib.h-t && \
> mv stdlib.h-t stdlib.h
> sed: 1: "/definition of GL_LINK_ ...": filename expected
> make[1]: *** [stdlib.h] Error 1
> make: *** [all-recursive] Error 1
>
> This happens when Makefile is building stdlib.h. It seems that this
> happens because the variable LINK_WARNING_H is not defined in tests/
> Makefile.am, and Mac OS X's sed can't handle verb 'r' without file
> name (in contrast to GNU sed 4.1.5). This problem does not happen when
> building the library, as then LINK_WARNING_H is properly defined in
> Makefile.am.
>
> The modules that were included were getopt-gnu and error (with
> dependencies). Importing link-warning module didn't help.
Thanks for the report. I cannot reproduce it with the modules 'getopt-gnu'
and 'error', and with stdlib.h. But I can reproduce it with 'unistd.h',
like this:
- Take a package, like GNU hello,
- Execute "gnulib-tool --import --with-tests atexit inttypes"
the autoreconf.
- Copy the package to a MacOS X 10.5 machine, without GNU sed in the PATH.
- ./configure
- cd tests; make
The combination of 'atexit' and 'inttypes' is such that
- 'atexit' does not require 'unistd' nor 'link-warning',
- 'atexit-tests' requires 'unistd'
- 'inttypes' requies 'link-warning' but not 'unistd'.
This fixes it.
2009-09-23 Bruno Haible <address@hidden>
* gnulib-tool (func_import): Add 'link-warning' to testsrelated_modules
when needed.
Test case: gnulib-tool --import --with-tests atexit inttypes.
Reported by Pauli Miettinen <address@hidden>.
--- gnulib-tool.orig 2009-09-23 10:28:32.000000000 +0200
+++ gnulib-tool 2009-09-23 10:28:29.000000000 +0200
@@ -2743,9 +2743,10 @@
# ignoring tests modules. Its lib/* sources go into $sourcebase/. If --lgpl
# is specified, it will consist only of LGPLed source.
# The tests-related module list is the transitive closure of the specified
- # modules, including tests modules, minus the main module list. Its lib/*
- # sources (brought in through dependencies of *-tests modules) go into
- # $testsbase/. It may contain GPLed source, even if --lgpl is specified.
+ # modules, including tests modules, minus the main module list excluding
+ # 'link-warning'. Its lib/* sources (brought in through dependencies of
+ # *-tests modules) go into $testsbase/. It may contain GPLed source, even if
+ # --lgpl is specified.
# Determine main module list.
saved_inctests="$inctests"
inctests=""
@@ -2759,7 +2760,8 @@
fi
# Determine tests-related module list.
echo "$final_modules" | LC_ALL=C sort -u > "$tmp"/final-modules
- testsrelated_modules=`func_reset_sigpipe; echo "$main_modules" | LC_ALL=C
sort -u | LC_ALL=C join -v 2 - "$tmp"/final-modules`
+ sed_remove_link_warning='/^link-warning$/d'
+ testsrelated_modules=`func_reset_sigpipe; echo "$main_modules" | LC_ALL=C
sort -u | sed -e "$sed_remove_link_warning" | LC_ALL=C join -v 2 -
"$tmp"/final-modules`
if test $verbose -ge 1; then
echo "Tests-related module list:"
echo "$testsrelated_modules" | sed -e 's/^/ /'