[sac-dev] Patch to make our build system support VPATH builds
Kuang He
icrazy at gmail.com
Mon Oct 6 10:25:31 PDT 2008
On Mon, Oct 6, 2008 at 11:47 AM, Brian Savage <savage at uri.edu> wrote:
> The build on my system (OSX/Intel 10.4) fails. The abs_top_srcdir is not
> defined.
> I cannot find a resolution to this, but I will keep looking.
>
> I needed to rerun the bootstrap script (or autoreconf) as the Makefile.in
> files needed to be regenerated from the Makefile.am files.
>
> I am using autoconf 2.60 and automake 1.9.6
Dear Brian,
I have been using autoconf 2.61 and automake 1.10. According to my
tests, automake v1.9 does not define abs_* series macros [1], but
automake v1.10 does.
The reason I used abs_top_srcdir instead of top_srcdir in several
Makefile.am's is to solve a VPATH problem I could not solve otherwise.
For example, in libedit/Makefile.am, there is line that reads:
LIBEDIT_ENV = env CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
INSTALL="$(abs_top_srcdir)/config/install-sh"
If I were to write it using $(top_srcdir), I could not make it work
for all the following VPATH build cases:
(1) Build directory is a subdirectory of the source tree:
cd /path/to/sac/source/code
mkdir build && cd build
../configure
(2) Build directory is a subdirectory of a subdirectory of the source tree:
cd /path/to/sac/source/code
mkdir -p build/test && cd build/test
../../configure
(3) Build directory and source tree are not in the same tree:
cd /path/to/sac/source/code
mkdir -p /somewhere/else/build && cd /somewhere/else/build
/path/to/sac/source/code/configure
Could you try updating your automake version and try again? Or could
you figure out a way to solve this problem?
[1] The autoconf manual indicates that it is autoconf that is
generating macro like abs_srcdir, abs_top_srcdir, etc.
http://www.gnu.org/software/autoconf/manual/autoconf.html#Preset-Output-Variables
It is just automake v1.9 that has not used them (meaning: not
generating them in Makefile.in's).
Best regards,
--
Kuang He
Department of Physics
University of Connecticut
Storrs, CT 06269-3046
Tel: +1.860.486.4919
Web: http://www.phys.uconn.edu/~he/
More information about the sac-dev
mailing list