bug-gnulib
[Top][All Lists]
Advanced

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

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


From: John W. Eaton
Subject: Re: Re: The non-recursive-gnulib-prefix-hack module
Date: Sun, 27 Nov 2016 07:52:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 10/22/2016 03:04 PM, Bruno Haible wrote:

The idea would be to have gnulib-tool emit the correct code for the
{Bison,coreutils,Octave} case right away, triggered by some command line
option.

If you want to help us here, please use the *current* gnulib-tool to
generate Makefile.am files. Then hand-edit these Makefile.am files with
a minimum of changes, so that they work in a non-recursive build (possibly
based on what prefix-gnulib-mk would produce). Then send us these files
(both the original and the edited Makefile.am) files, so that we can see
how gnulib-tool should be modified.

I did that for Octave and the resulting files are attached.

The gnulib-generated file is Makefile.am. The edited file that I included in Octave's main Makefile.am file is module.mk.

Additionally, I had to edit the definitions of gl_LIBOBJS and gl_LTLIBOBJS in the generated Makefile to add the source-base prefix (we use "libgnu/" in Octave).

Things like AUTOMAKE_OPTIONS need to be omitted. We can assume that the top-level Makefile.am file will define that.

Variables like SUBDIRS, noinst_HEADERS, etc. don't need to be initialized. The top-level Makefile.am file should do that and the makefile fragment that gnulib-tool generates should just append to these variables.

The libgnu_la_FOO variables need to be libgnu_libgnu_la_FOO instead (again assuming source-base is "libgnu/").

libgnu_libgnu_la_CPPFLAGS needs to be set so that libgnu/ headers are correctly found in the source and build trees.

Source and target file names need to be adjusted so that they are found in the libgnu/ directory.

There were some instances of using a file name like address@hidden That doesn't work if $@ contains a directory component so I changed them to address@hidden instead.

The generated makefile fragment contains some things like @address@hidden I didn't do anything with those, but something will probably need to change so that they have the proper directory prefix added to the substituted values.

Rules like the ones that generate alloca.h, dirent.h, etc., need to be fixed to find the source files in $(srcdir)/libgnu/FOO.in.h instead of just $(srcdir)/FOO.in.h.

I wasn't sure what to do with the mostlyclean-local target, but it seems that it should somehow be made local to the gnulib makefile fragment.

These changes were enough for me to do a completely non-recursive build of Octave on a Debian system.

jwe

Attachment: Makefile.am
Description: Text document

Attachment: module.mk
Description: Text Data


reply via email to

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