[Top][All Lists]

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

output directory of generated files

From: Thomas Porschberg
Subject: output directory of generated files
Date: Thu, 9 Mar 2006 14:48:13 +0100


we have the following project structure and a file foo.ts:


The goal is
1) to translate foo.ts to foo.qm (with an external program, say PROG1)
2) to create a header file from the created foo.qm
   (with another helper script PROG2)

We tried to accomplish the task first with the following rules
in of src-directory :

%.qm: %.ts
        $(PROG1) $<

foo.h: foo.qm
        $(top_srcdir)/utils/PROG2 < $< > $@

The problem was that foo.qm was created in project/src
directory and PROG2 could not find the created foo.qm if
the build directory was not src directory.
What I want to say is: When someone created a separate build directory,

and called "../configure" there
it did not work, because PROG1 created


PROG2 expected foo.qm now in BUILDDIR/src and not under project/src/.
(surprisingly it worked when I started make a second time ?!)

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 works but I don't know if it is a good solution.



reply via email to

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