bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The non-recursive-gnulib-prefix-hack module


From: John W. Eaton
Subject: Re: The non-recursive-gnulib-prefix-hack module
Date: Wed, 1 Feb 2017 17:28:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

Is there anything I can do to help get this change accepted as part of gnulib?

I'd really like to be able to use a completely non-recursive Makefile for Octave.

jwe


On 11/28/2016 12:40 AM, John W. Eaton wrote:
On 11/27/2016 06:18 PM, Bruno Haible wrote:
John,

I added

   AC_CONFIG_LIBOBJ_DIR([libgnu])

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
autoconf
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
configure.ac
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
    AC_CONFIG_LIBOBJ_DIR([libgnu])
invocation.

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;
this is
  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
    LIMITS_H=limits.h
by
    LIMITS_H=libgnu/limits.h
I would prefer to replace
    AC_SUBST([LIMITS_H])
by
    gl_FILENAME_SUBST([LIMITS_H])

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

  LIMITS_H=${gl_REL_SOURCE_BASE}limits.h

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

   gl_SOURCEBASE=$sourcebase
   AC_SUBST(gl_SOURCEBASE)

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.

jwe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]