[Gllug] Re: automake: $(srcdir)

Stig Brautaset stigbrau at start.no
Fri Jul 5 11:08:17 UTC 2002


* Stig Brautaset <stigbrau at start.no> spake thus:
> I'm having questions about $(srcdir) this time. 
[snip my drivel]

> Anyway, the generated gaqueens/Makefile has this line:
> 
> 	DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/config

Eh.. I've now found out that why this line is like it is :)
*embarrassed* I really should learn to wait and rethink things before I
post.. I'm just too impatient. Sorry.

It occured to me when building in a different directory from the
sourcedir... 

[snip more drivel by me]

> Now, if my assumptions _were_ indeed correct and this is a bug, I could
> write my gaqueens/Makefile.am thus once it was fixed:

The question still stands how I can accomplish this properly though:

AM_CPPFLAGS = -I$(srcdir)
bin_PROGRAMS = gaqueens
gaqueens_SOURCES = gaqueens.c
gaqueens_LDADD =  $(srcdir)/libgga.la -lm

However, at the moment I have to write the considerably more kludgey:
(Unless, off course, I take shortcuts such as using `..' in place of
$(top_builddir) since I know that's what it expands to.)

AM_CPPFLAGS = -I$(top_builddir)/gga
bin_PROGRAMS = gaqueens
gaqueens_SOURCES = gaqueens.c
gaqueens_LDADD = $(top_builddir)/gga/libgga.la -lm

Stig

-- 
brautaset.org


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list