I'd like to thank everyone who responded to my questions regarding
substitution vs expansion. I think I have a good handle on this issue
now. To summarize:
1. Use make variables everywhere you can in makefiles, as opposed to
autoconf substitution variables because doing so gives you more
flexibili
Erik,
I believe I understand Harlan's method. My understanding is that make
actually prefixes all targets not found relative to the current
directory with each path (relative or absolute) specified in VPATH,
until it finds the file (or not). To use my original example, here's
my directory structur
Erik wrote:
> Harlan Stenn wrote:
>
> > You can use: ../common/mySleep.c in your foo_SOURCES list.
>
> If the sources are in /home/user/src and you go to /home/usr/build
> and do "../src/configure" the above will be completely wrong.
>
> The correct way to do it is to use "$(top_srcdir)/common/m
Harlan Stenn wrote:
> You can use: ../common/mySleep.c in your foo_SOURCES list.
If the sources are in /home/user/src and you go to /home/usr/build
and do "../src/configure" the above will be completely wrong.
The correct way to do it is to use "$(top_srcdir)/common/mySleep.c"
which will work un
John,
> Bob, server/Makefile's VPATH only contains the expansion of
> @top_srcdir@/server, which in this case is ../../server. This means
> that make won't be able to find any sources listed that exist in
> directories other than ../../server. So I think I HAVE to use
> $(top_srcdir)/common/mySlee
NOTE: I routinely build in non-source directories because I can keep
separate sets of configure options.
Bob, server/Makefile's VPATH only contains the expansion of
@top_srcdir@/server, which in this case is ../../server. This means
that make won't be able to find any sources listed that exist in
On Tue, 4 Mar 2008, John Calcote wrote:
Thanks Bob and Ralf.
Here's one that's just a little more complex (the last one, I promise).
I have this in my Makefile.am:
registrarTest_SOURCES = registrar.c\
@top_srcdir@/common/mySleep.c
registrarTest_CPPFLAGS = -DREGISTRAR_TEST\
-I$(
On Tue, 2008-03-04 at 15:34 -0700, John Calcote wrote:
> This question is somewhat related to the last one I asked. Where
> should I use @top_srcdir@, and where should I use $(top_srcdir)?
The answer is, you should ALWAYS use the make variable, and NEVER use
the automake variable. There may be ve
* John Calcote wrote on Tue, Mar 04, 2008 at 11:34:54PM CET:
>
>registrarTest_SOURCES = registrar.c\
> @top_srcdir@/common/mySleep.c
Hmm, putting variables in *_SOURCES is problematic as the dependency
tracking code in m4/depout.m4 is really dumb and may do the wrong thing.
$(top_srcdir
Thanks Bob and Ralf.
Here's one that's just a little more complex (the last one, I promise).
I have this in my Makefile.am:
registrarTest_SOURCES = registrar.c\
@top_srcdir@/common/mySleep.c
registrarTest_CPPFLAGS = -DREGISTRAR_TEST\
-I$(top_srcdir)/common
This question is so
Hi John,
* John Calcote wrote on Tue, Mar 04, 2008 at 10:38:50PM CET:
> Newbie question here: Is it better to do this in a Makefile.am:
>
>install-exec-hook:
>$(mkdir_p) $(DESTDIR)@syslogdir@
>
> or this:
>
>install-exec-hook:
> $(mkdir_p) $(DESTDIR)$(syslogdir)
>
hi list,
Newbie question here: Is it better to do this in a Makefile.am:
install-exec-hook:
$(mkdir_p) $(DESTDIR)@syslogdir@
or this:
install-exec-hook:
$(mkdir_p) $(DESTDIR)$(syslogdir)
assuming, of course, that I called AC_SUBST(syslogdir) in configure.ac?
The fir
12 matches
Mail list logo