[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The non-recursive-gnulib-prefix-hack module
From: |
Bruno Haible |
Subject: |
The non-recursive-gnulib-prefix-hack module |
Date: |
Sun, 16 Oct 2016 14:13:05 +0200 |
User-agent: |
KMail/4.8.5 (Linux/3.8.0-44-generic; KDE/4.8.5; x86_64; ; ) |
Hi Jim, all,
When I try to use the gnulib-tool --create-testdir option to produce a testdir
for all modules, it encounters errors and produces no toplevel Makefile.in:
$ ./gnulib-tool --create-testdir --with-tests --dir=/tmp/testdir1
gnulib-tool: warning: module euidaccess depends on a module with an
incompatible license: group-member
gnulib-tool: warning: module strtod-obsolete depends on a module with an
incompatible license: strtod
...
executing aclocal -I glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
configure.ac:3601: error: required directory ./lib does not exist
configure.ac:23: installing 'build-aux/ar-lib'
configure.ac:4: installing 'build-aux/install-sh'
configure.ac:4: installing 'build-aux/missing'
Makefile.am:5: warning: AM_GNU_GETTEXT used but 'po' not in SUBDIRS
gllib/Makefile.am:47: error: required file 'lib/alloca.c' not found
gllib/Makefile.am: installing 'build-aux/depcomp'
configure.ac: installing 'build-aux/ylwrap'
I've tracked it down to the module 'non-recursive-gnulib-prefix-hack':
$ ./gnulib-tool --create-testdir --with-tests --dir=/tmp/testdir3 nocrash
non-recursive-gnulib-prefix-hack
...
executing aclocal -I glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
configure.ac:109: error: required directory ./lib does not exist
...
$ ./gnulib-tool --create-testdir --with-tests --dir=/tmp/testdir3 alloca
non-recursive-gnulib-prefix-hack
...
executing aclocal -I glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
configure.ac:110: error: required directory ./lib does not exist
configure.ac:22: installing 'build-aux/ar-lib'
configure.ac:8: installing 'build-aux/compile'
configure.ac:4: installing 'build-aux/install-sh'
configure.ac:4: installing 'build-aux/missing'
automake: error: '$(ALLOCA)' cannot be used outside 'lib' if 'subdir-objects'
is not set
gllib/Makefile.am:46: error: required file 'lib/alloca.c' not found
gllib/Makefile.am: installing 'build-aux/depcomp'
Here are the problems that I see:
1) Both modules/non-recursive-gnulib-prefix-hack and
m4/non-recursive-gnulib-prefix-hack.m4 hardcode the subdirectory name 'lib'.
(Why does m4/non-recursive-gnulib-prefix-hack.m4 use 'lib' in one place and
$1
in another place??)
2) This is a different way of using Automake; it should not be used in
gnulib-tool's
testdirs.
3) Why has this feature been implemented as a module that hacks around in
undocumented Autoconf internals (ac_subst_vars is undocumented, no?, and
gl_LIBOBJS is undocumented as well), rather than as a command-line option
to gnulib-tool?
4) This module was added in September 2012. Does this mean that no one has used
gnulib-tool --create-testdir option to produce a testdir for all modules,
in four years?!
For problem 2), I propose the remedy below.
Bruno
2016-10-16 Bruno Haible <address@hidden>
gnulib-tool: Make --create-testdir on all modules work again.
* gnulib-tool (func_create_testdir): Don't include the
non-recursive-gnulib-prefix-hack module.
diff --git a/gnulib-tool b/gnulib-tool
index 12ee19f..666057a 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -5811,10 +5811,12 @@ func_create_testdir ()
if test -z "$modules"; then
# All modules together.
# Except config-h, which breaks all modules which use HAVE_CONFIG_H.
+ # Except non-recursive-gnulib-prefix-hack, which represents a nonstandard
+ # way of using Automake.
# Except ftruncate, mountlist, which abort the configuration on mingw.
FIXME.
# Except lib-ignore, which leads to link errors when Sun C++ is used.
FIXME.
modules=`func_all_modules`
- modules=`for m in $modules; do case $m in config-h | ftruncate | mountlist
| lib-ignore) ;; *) echo $m;; esac; done`
+ modules=`for m in $modules; do case $m in config-h |
non-recursive-gnulib-prefix-hack | ftruncate | mountlist | lib-ignore) ;; *)
echo $m;; esac; done`
fi
specified_modules="$modules"
- The non-recursive-gnulib-prefix-hack module,
Bruno Haible <=