On 11/27/2016 06:18 PM, Bruno Haible wrote:
to my configure.ac file. Maybe gnulib-tool could do this automatically
if --non-recursive-makefile is specified?
gnulib-tool does not rely on AC_LIBOBJ and friends, because these
macros assume that there is only one lib/ dir, whereas it is possible to
have several gnulib-tool invocations in the scope of a single
file. Instead, the gnulib-tool generated gl_INIT method provides its own
definition of AC_LIBOBJ for the scope of the modules and .m4 expansions
that it pulls in.
Therefore you should not need this
I don't currently see how to make it work without using this macro.
it demonstrates what changes need to be made.
This is very good to see.
I'm attaching a new patch that fixes a few more things and seems to work
for me with Octave.
One thing I don't like is to put directory names into the *.m4 files;
1. against the principle that *.m4 files should determine properties
of the platform, whereas Makefile.am contains file names,
2. a problem w.r.t. the requirement above to be able to use
several gnulib-tool invocations.
So, instead of replacing
I would prefer to replace
Here gl_FILENAME_SUBST is a (yet to be written) autoconf macro that takes
If that's better, it should be easy to change, though I don't have any
more time to devote to this at the moment.
What I have now is
With gl_REL_SOURCE_BASE defined to be "$sourcebase/" for non-recursive
builds or "" otherwise.
It should be done by gnulib-tool:
1. because it can already be done at this stage,
2. so that different gnulib-tool invocations in the scope of a single
configure file work.
I think I have this working, at least for the Makefile.am snippets in
the module files now.
It seems like that would be easy enough just by arranging
to do something like
in the configure script and then using this variable in the snippets
where you used @FILE@ above.
There is a variable gl_source_base in the configure script, set at the
beginning of gl_INIT. You can use it as a shell variable. But it is not
(and cannot be) AC_SUBSTable.
I defined a separate variable because it needs to be either empty or
$sourcebase/ (with the /) and I believe that the existing variable
doesn't have the trailing slash.
Current patch attached. Again, I only attempted to fix the module and
m4 files that are needed by Octave.