automake
[Top][All Lists]
Advanced

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

Re: output directory of generated files


From: Stepan Kasal
Subject: Re: output directory of generated files
Date: Tue, 28 Mar 2006 15:36:36 +0200
User-agent: Mutt/1.4.1i

Hello,

On Thu, Mar 09, 2006 at 02:48:13PM +0100, Thomas Porschberg wrote:
> %.qm: %.ts
>         $(PROG1) $<
> 
> foo.h: foo.qm
>         $(top_srcdir)/utils/PROG2 < $< > $@
...
> PROG2 expected foo.qm now in BUILDDIR/src and not under project/src/.
> (surprisingly it worked when I started make a second time ?!)

It seems that on the second run make was able to find the .qm file using
the VPATH feature.  But during the first attempt, the file wasn't there at
the startup and make didn't expect that the rule will create it there.

> I change the rule now to:
> 
> %.qm: %.ts
>         $(PROG1) $< -qm $@
> 
> Now foo.qm is created in BUILDDIR/src and utils/PROG2 has no problem.

It's always better when you create non-distributed files in builddir.

There are two tiny problems, though:

1) you should be sure that src/foo.qm doesn't exist; if it existed, some
make implementations would update it, instead of creating a new one in
BUILDDIR/src  (see ``Limitations of Make'' in the Autoconf manual).

2) the rule is more portable this way:

.ts.qm:
        $(PROG1) $< -qm $@

Have a nice day,
        Stepan Kasal




reply via email to

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