[Top][All Lists]

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

Gmake problem when including sub makefiles

From: Martin Gaarde Lund
Subject: Gmake problem when including sub makefiles
Date: Wed, 16 Aug 2006 09:57:10 +0200

Im working on a makefile which includes submakefiles which defines various targets and variables. This affects my target definitions in a unfortunate way.

I have summarized my problem in the following example makefile:


PROJECT = project

    armcc test.c -o test.o --errors $(ERRORFILE)

PROJECT = project1

    armcc test1.c -o test1.o --errors $(ERRORFILE)
    rm *.o

From this example I would have expected make to assemble the following target commands:
armcc test.c -o test.o --errors project.err
armcc test1.c -o test1.o --errors project1.err

But what i get is:
armcc test.c -o test.o --errors project1.err
armcc test1.c -o test1.o --errors project1.err

As it appears the same ERRORFILE applies to both commands.. I realize that this is an effect of how make reads through the makefile in different stages.

Is it possible to make a construction which works as I intended it to?

Please note that I can not depend on the target rule for defining my error output.

Any input will be appreciated, thanks.


P.S. Im using GNU Make 3.81 built for i686-pc-mingw32

reply via email to

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