[Top][All Lists]

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

Re: performing pre-build shell commands with automake

From: Wesley Smith
Subject: Re: performing pre-build shell commands with automake
Date: Sun, 20 Jun 2010 23:05:07 +0200

> 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

Funny enough, I was actually looking through the printout trying to
set it up properly as you mention.  From the output, lcairo.o should
be the proper rule.  I have the following structure

The output looks like:

/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H
-I. -I../.. -I/usr/include/lua5.1 -I/usr/include/cairo
-I/usr/include/directfb -I/usr/include/freetype2     -g -O2 -MT
lcairo.lo -MD -MP -MF .deps/lcairo.Tpo -c -o lcairo.lo `test -f
'src/lcairo.c' || echo './'`src/lcairo.c

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../..
-I/usr/include/lua5.1 -I/usr/include/cairo -I/usr/include/directfb
-I/usr/include/freetype2 -g -O2 -MT lcairo.lo -MD -MP -MF
.deps/lcairo.Tpo -c src/lcairo.c  -fPIC -DPIC -o .libs/lcairo.o

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../..
-I/usr/include/lua5.1 -I/usr/include/cairo -I/usr/include/directfb
-I/usr/include/freetype2 -g -O2 -MT lcairo.lo -MD -MP -MF
.deps/lcairo.Tpo -c src/lcairo.c -o lcairo.o >/dev/null 2>&1

mv -f .deps/lcairo.Tpo .deps/lcairo.Plo

/bin/bash ../../libtool --tag=CC   --mode=link gcc  -g -O2 -module
-avoid-version  -o -rpath /usr/local/lib lcairo.lo -llua5.1
-L/usr/lib -lcairo -L/usr/lib -ldirectfb -L/usr/lib -lfreetype
-L/usr/lib  -llua5.1

libtool: link: gcc -shared  .libs/lcairo.o   -L/usr/lib
/usr/lib/ -ldirectfb /usr/lib/
/usr/lib/    -Wl,-soname -Wl, -o .libs/

libtool: link: ar cru .libs/cairo.a  lcairo.o
libtool: link: ranlib .libs/cairo.a
libtool: link: ( cd ".libs" && rm -f "" && ln -s "../"
"" )

There are 2 issues I see:
1) Why would the below produce 2 commands compiling the
same source file into 2 different directories?
2) One of those builds commands actually puts lcairo.o in the same
directory as the Makefile, so I would assume that the rule lcairo.o
would correspond to this step.

I also tried .libs/lcairo.o to no avail.

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

reply via email to

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