automake
[Top][All Lists]
Advanced

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

Re: linking source files from a different directory macro


From: Jason Roscoe
Subject: Re: linking source files from a different directory macro
Date: Tue, 22 Jan 2008 07:17:55 -0500
User-agent: Thunderbird 2.0.0.9 (X11/20071031)

Ralf Wildenhues wrote:
You can use AC_CONFIG_LINKS from Autoconf:
<http://www.gnu.org/software/autoconf/manual/html_node/Configuration-Links.html>
<http://www.gnu.org/software/automake/manual/html_node/Optional.html>

or there is AC_PROG_LN_S, which allows you to use $(LN_S) in rules in
Makefile.am.
Thank you. I did find AM_PROG_LN_S and $(LN_S) after my original post and that is what I am currently using.
You can use AC_CONFIG_LINKS([common/tester.c], [test/tester.c])
but can also use out-of-directory sources:

  check_PROGRAMS = foo
  foo_SOURCES = ../common/tester.c ../common/tester.h

and avoid all the symlinks.  Depends on your needs; the latter doesn't work
well with VPATH builds and non-GNU make programs.

Cheers,
Ralf
I also saw AC_CONFIG_LINKS but I wasn't sure it would be appropriate for what I was trying to do. I'll have a look at it again. One other thing is that I would like the links to be removed during a 'make clean' step, e.g.. Do you know offhand if AC_CONFIG_LINKS will setup any rules to remove the links?

Thanks!




reply via email to

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