[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: |
Sun, 27 Nov 2016 12:56:31 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 |
On 11/27/2016 07:52 AM, John W. Eaton wrote:
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.
I also started working on a change to replace the
non-recursive-gnulib-prefix-hack module with a --non-recursive-makefile
option for gnulib-tool. My initial attempt is attached. It gets part
of the way there, but I am stuck trying to figure out what to do about
the Makefile.am snippets that appear in module files. I'm not sure
exactly where the file names in lines like
lib_SOURCES += xsize.c xsize.h
should be prefixed with the $sourcebase directory name or exactly how to
handle the rules that might be included there. For example, I think
things like
# We need the following in order to create <errno.h> when the system
# doesn't have one that is POSIX compliant.
if GL_GENERATE_ERRNO_H
errno.h: errno.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f address@hidden $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
[...] \
< $(srcdir)/errno.in.h; \
} > address@hidden && \
mv address@hidden $@
else
errno.h: $(top_builddir)/config.status
rm -f $@
endif
from modules/errno will need to have $(sourcebase) included in a few key
spots:
# We need the following in order to create <errno.h> when the system
# doesn't have one that is POSIX compliant.
if GL_GENERATE_ERRNO_H
SOURCEBASE/errno.h: SOURCEBASE/errno.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f address@hidden $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
[...] \
< $(srcdir)/SOURCEBASE/errno.in.h; \
} > address@hidden && \
mv address@hidden $@
else
SOURCEBASE/errno.h: $(top_builddir)/config.status
rm -f $@
endif
I'm willing to continue working on this and/or testing with Octave but I
will need a bit of guidance for how best to proceed.
Thanks,
jwe
diffs.txt
Description: Text document
Re: The non-recursive-gnulib-prefix-hack module, Bruno Haible, 2016/11/27