[Top][All Lists]

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

Re: performing pre-build shell commands with automake

From: John Calcote
Subject: Re: performing pre-build shell commands with automake
Date: Sun, 20 Jun 2010 14:41:03 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100512 Thunderbird/3.0.5


On 6/20/2010 2:14 PM, Wesley Smith wrote:
> How does one do this kind of thing when the source file is specified
> in a subfolder?
> INCLUDES = -I/usr/include/lua5.1 -I/usr/include/cairo
> -I/usr/include/directfb -I/usr/include/freetype2
> cairo_la_LDFLAGS = -module -avoid-version
> cairo_la_LIBADD = -llua5.1 -L/usr/lib -lcairo -L/usr/lib -ldirectfb
> -L/usr/lib -lfreetype -L/usr/lib
> cairo_la_SOURCES = src/lcairo.c
> resource.qt:
>       touch TESTING
> lcairo.o: resource.qt
> lcairo.o never gets triggered here.  If I explicitly do make lcairo.o
> then it will get triggered, but I'm not sure from scanning the
> Makefile and how it would get implicitly triggered.

Build once without your qt dependencies in place and carefully note the
name and relative location of the object file generated from
src/lcairo.c. The qt dependency rule will have to look like this:

exact-name-and-relative-location-of-object : resource.qt

This is the short answer. You might also want to use the $(OBJEXT) macro
for the extension on the object file for portability's sake:

.../lcairo.$(OBJEXT) : resource.qt

This is why most people just use BUILT_SOURCES - it's cheating but it
works for most cases. (See section 9.5 of the Automake manual for more


reply via email to

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