bug-gnulib
[Top][All Lists]
Advanced

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

Re: arg-nonnull.h & warn-on-use.h in build-aux


From: Sam Steingold
Subject: Re: arg-nonnull.h & warn-on-use.h in build-aux
Date: Tue, 23 Feb 2010 17:06:50 -0500

Hi,

On 2/23/10, Eric Blake <address@hidden> wrote:
> According to Sam Steingold on 2/23/2010 2:05 PM:
>  > I updated gnulib in clisp and gnulib-tool installed arg-nonnull.h &
>  > warn-on-use.h in src/build-aux.
>  > why aren't these files in the usual place (src/gllib), together with all
>  > the other headers?
>
> Because the versions in src/build-aux are templates, which get further
>  modified by a sed script during make, such that you end up using the
>  modified contents as the inline portion merged with *.in.h header
>  templates to form replacement headers in build/gllib.

I am not sure I see the fundamental difference.

>  > now, I am getting this error when building modules which use gnulib:
>  >
>  > make[2]: *** No rule to make target
>  > `CLISP-HOME/modules/syscalls/src/build-aux/arg-nonnull.h', needed by
>  > `arg-nonnull.h'.  Stop.
>
> It seems like your problem is that top_srcdir is pointing to
>  CLISP-HOME/modules/syscalls/src instead of CLISP-HOME?  But why is that
>  happening?

clisp consists of core (in CLISP-HOME/src) and modules.
the core and some modules use gnulib.
it has been my unending (and losing) quest to
1. limit creep (when each new update brings more and more files in)
2. share files between src/gllib and modules/*/gllib

>  > this is no good - I need to be able to specify the location of the
>  > build-aux directory (since it could be coming from an existing clisp
>  > installation, not a build directory).
>
> I'm not sure I follow?  The build-aux directory is part of the source
>  tree, and does not get installed.  But you are correct that it is not part
>  of the build tree (unless you build in-tree, with srcdir==builddir).

I want to enable my users to build clisp modules against an existing
system-wide clisp installation (and install the user-built modules in
their home directory), similar to the way cpan works for perl.

since the configure files refer to some build-aux files, I have to
install those files when I install clisp.

>  > so, how do I specify the location of these files?
>  >
>  > this patch would help a lot:
>  >
>  > diff --git a/modules/warn-on-use b/modules/warn-on-use
>  > index f0ee83b..75346a7 100644
>  > --- a/modules/warn-on-use
>  > +++ b/modules/warn-on-use
>  > @@ -16,10 +16,10 @@ Makefile.am:
>  >  BUILT_SOURCES += warn-on-use.h
>  >  # The warn-on-use.h that gets inserted into generated .h files is the
>  > same as
>  >  # build-aux/warn-on-use.h, except that it has the copyright header cut
>  > off.
>  > -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
>  > +warn-on-use.h: $(build_aux)/warn-on-use.h
>  >      $(AM_V_GEN)rm -f address@hidden $@ && \
>  >      sed -n -e '/^.ifndef/,$$p' \
>  > -      < $(top_srcdir)/build-aux/warn-on-use.h \
>  > +      < $(build_aux)/warn-on-use.h \
>  >        > address@hidden && \
>  >      mv address@hidden $@
>  >  MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
>  >
>  > (and a similar one for arg-nonnull)
>  >
>  > one would also need to somehow convince automake to add
>  > build_aux = $(top_srcdir)/build-aux
>
>
> That just looks like a factorization - I'm not sure I see any difference
>  between:
>
>
>  build_aux=$(top_srcdir)/build-aux
>
> $(build_aux)/file
>
>  and
>
>  $(top_srcdir)/build-aux
>
>  How is it supposed to help matters?

take a look at the gllib target in, e.g.,
http://clisp.cvs.sourceforge.net/viewvc/*checkout*/clisp/clisp/modules/syscalls/Makefile.in
I do:

# syscalls relies on src/gllib, so we must also include files in the build dir
gllib libgnu_sc.a : force
        rm -f libgnu_sc.a
        mkdir -p gllib
        test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
        cd gllib; \
          $(MAKE) srcdir="$(srcdir)/gllib" \
                ACLOCAL_M4="$(srcdir)/gllib/Makefile.am" \
                CFLAGS="$(CFLAGS) -I$(CLISP_LINKKIT)/.."; \
          $(LN) libgnu.a ../libgnu_sc.a

(as you can see, I already work around the dependency on aclocal.m4:
 it does not exist where you expect it to be and compilation breaks when
gnulib tries to call autoconf, automake autoFOO autoBAR &c).

I want to be able to add build_aux=.... to the $(MAKE) invocation
so that the file arg-nonnull.h & warn-on-use.h are found in the right place.

thanks!
-- 
Sam Steingold <http://sds.podval.org>




reply via email to

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