bug-gnulib
[Top][All Lists]
Advanced

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

Re: top_srcdir in Makefile.am & Makefile.in


From: Bruno Haible
Subject: Re: top_srcdir in Makefile.am & Makefile.in
Date: Sat, 30 Jul 2011 02:20:08 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Sam Steingold wrote:
> clisp directory structure is:
> clisp - top level; hand-written configure script (ask Bruno)
> clisp/src - most sources, configure.in, configure, aclocal.m4
> clisp/src/gllib, clisp/src/glm4 - imported from gnulib
> clisp/src/build-aux - imported from many places, mostly gnulib

The documentation in the Autoconf manual

 -- Variable: top_srcdir
     The name of the top-level source code directory for the package.
     In the top-level directory, this is the same as `srcdir'.

is a bit misleading. This quote, also from the Autoconf manual,

    "... coupled with the
    fact that `configure' is always run from the top build directory, it is
    sufficient to use just `$srcdir' instead of `$top_srcdir'."

indicates the real meaning: top_srcdir is the innermost directory that
contains $srcdir and has an autoconf-generated configure file.

For example, in gettext, I have a subdirectory gettext-runtime, and
inside this subdirectory $(top_srcdir) is the gettext-runtime directory -
because it has a separate configure file.

So, in clisp, $(top_srcdir) ought to be clisp/src.

You can get in trouble here if you use fake configure.ac / configure
file that are present at the moment 'automake' is run but are removed
afterwards.

> $ grep top_srcdir src/gllib/Makefile.am
> appears to indicate that top_srcdir should point to clisp.

Maybe this is related to this hack in clisp/Makefile.devel:

src/gllib/Makefile.in : src/gllib/Makefile.am src/configure.in src/aclocal.m4
        cd src && automake gllib/Makefile && \
        sed -i -e 's,$$(top_srcdir)/src/build-aux,$$(CLISP_LIBDIR)/build-aux,' \
          -e 's,$$(top_srcdir)/$$cl_cv_clisp_libdir,$$(CLISP_LIBDIR),' \
                gllib/Makefile.in

Bruno
-- 
In memoriam Pavel Dybenko <http://en.wikipedia.org/wiki/Pavel_Dybenko>



reply via email to

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