[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: output directory of generated files
From: |
Thomas Porschberg |
Subject: |
Re: output directory of generated files |
Date: |
Tue, 28 Mar 2006 15:51:47 +0200 |
Am Tue, 28 Mar 2006 15:36:36 +0200
schrieb Stepan Kasal <address@hidden>:
> 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.
OK, so I was not barking up the wrong tree.
>
> 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 $@
>
Thank you for the hints. I will take it into account.
Thomas
--