[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: |
Mon, 21 Jun 2010 00:48:31 +0200 |
>> There are 2 issues I see:
>> 1) Why would the Makefile.am below produce 2 commands compiling the
>> same source file into 2 different directories?
>>
>
> The two libtool commands are not exactly alike. The first command
> generates position-independent code (PIC) to be used in your libtool
> shared library. That's why the object file is placed in the .libs
> directory. The second line doesn't use the -fPIC and -DPIC options. This
> version of the object file is used in the traditional archive (static
> library). The double compile comes from the use of Libtool. However, if
> you don't use Libtool, you'll only get static libraries.
Ah!
>> 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.
>>
>
> Automake is a little too smart for us here. It won't generate a rule to
> build a libtool object if you've already written one - even if it's only
> a dependency rule (no commands). To fix this, place the dependency on
> the source file, not on the object:
>
> src/lcairo.c : resource.qt
>
> I tested this and it works - here's my test code:
It definitely does work! Thanks so much. The QT resources in my case
or code generated files from the actual source files, so it makes
sense to trigger the rules off of the sources themselves. I really
appreciate the help.
wes
- performing pre-build shell commands with automake, Wesley Smith, 2010/06/20
- Re: performing pre-build shell commands with automake, Peter Johansson, 2010/06/20
- Re: performing pre-build shell commands with automake, John Calcote, 2010/06/20
- Re: performing pre-build shell commands with automake, Wesley Smith, 2010/06/20
- Re: performing pre-build shell commands with automake, John Calcote, 2010/06/20
- Re: performing pre-build shell commands with automake, Wesley Smith, 2010/06/20
- Re: performing pre-build shell commands with automake, John Calcote, 2010/06/20
- Re: performing pre-build shell commands with automake,
Wesley Smith <=
- Re: performing pre-build shell commands with automake, John Calcote, 2010/06/21