Re: Problems with conditional sources

2008-08-26 Thread John Calcote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Schwab wrote: John Calcote [EMAIL PROTECTED] writes: Andreas Schwab wrote: John Calcote [EMAIL PROTECTED] writes: Make is a two-pass utility. The first pass completely assimilates all macro data specified in the Makefile. THEN, the

Re: Problems with conditional sources

2008-08-25 Thread John Calcote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Sveningsson wrote: Hi, I am having some problems with conditional sources. This is what I have in Makefile.am: lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.cpp if WANT_BAR libfoo_la_SOURCES += a.cpp else

Re: Problems with conditional sources

2008-08-25 Thread David Sveningsson
John Calcote skrev: David Sveningsson wrote: Hi, I am having some problems with conditional sources. This is what I have in Makefile.am: lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.cpp if WANT_BAR libfoo_la_SOURCES += a.cpp else libfoo_la_SOURCES += b.cpp endif AM_CPPFLAGS

Re: Problems with conditional sources

2008-08-25 Thread John Calcote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 While that would make sense but my problem originates from the fact that the conditional files isn't compiled. After some hacking into the generated Makefile I noticed that the files wouldn't be compiled even if I inserted them into

Re: Problems with conditional sources

2008-08-25 Thread Andreas Schwab
David Sveningsson [EMAIL PROTECTED] writes: Hi, I am having some problems with conditional sources. This is what I have in Makefile.am: lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.cpp if WANT_BAR libfoo_la_SOURCES += a.cpp else libfoo_la_SOURCES += b.cpp endif

Re: Problems with conditional sources

2008-08-25 Thread Andreas Schwab
John Calcote [EMAIL PROTECTED] writes: Make is a two-pass utility. The first pass completely assimilates all macro data specified in the Makefile. THEN, the second pass generates the rule dependency tree. This is not true. Variable refences in target and dependency lists are expanded when

Re: Problems with conditional sources

2008-08-25 Thread David Sveningsson
Andreas Schwab skrev: David Sveningsson [EMAIL PROTECTED] writes: Hi, I am having some problems with conditional sources. This is what I have in Makefile.am: lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.cpp if WANT_BAR libfoo_la_SOURCES += a.cpp else libfoo_la_SOURCES

Re: Problems with conditional sources

2008-08-25 Thread Paul Smith
On Mon, 2008-08-25 at 23:21 +0200, David Sveningsson wrote: Thanks, this solved my problems. It doesn't seem work if I use tabs for indentation, but spaces works fine. Is this expected behavior? I've used tabs in many other places and it seem to work. I cannot find any section in the manual

Re: Problems with conditional sources

2008-08-25 Thread John Calcote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Schwab wrote: David Sveningsson [EMAIL PROTECTED] writes: Hi, I am having some problems with conditional sources. This is what I have in Makefile.am: lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.cpp if WANT_BAR

Re: Problems with conditional sources

2008-08-25 Thread John Calcote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Schwab wrote: John Calcote [EMAIL PROTECTED] writes: Make is a two-pass utility. The first pass completely assimilates all macro data specified in the Makefile. THEN, the second pass generates the rule dependency tree. This is not

Re: Problems with conditional sources

2008-08-25 Thread Paul Smith
On Mon, 2008-08-25 at 15:55 -0600, John Calcote wrote: Andreas Schwab wrote: John Calcote [EMAIL PROTECTED] writes: Make is a two-pass utility. The first pass completely assimilates all macro data specified in the Makefile. THEN, the second pass generates the rule dependency tree.

Re: Problems with conditional sources

2008-08-25 Thread Andreas Schwab
John Calcote [EMAIL PROTECTED] writes: Andreas Schwab wrote: John Calcote [EMAIL PROTECTED] writes: Make is a two-pass utility. The first pass completely assimilates all macro data specified in the Makefile. THEN, the second pass generates the rule dependency tree. This is not true.