[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Order of include and variable expansion
From: |
Paul Millar |
Subject: |
Re: Order of include and variable expansion |
Date: |
Sun, 11 Nov 2007 22:41:06 +0100 |
User-agent: |
KMail/1.9.7 |
Hi Dave,
Thanks for replying.
On Sunday 11 November 2007 14:20:04 Dave Korn wrote:
> On 10 November 2007 17:52, Paul Millar wrote:
> > I've a makefile of medium complexity
> >
> > I have a work-around for this, but I was wondering if:
> > a. is this a bug or a known problem?
> >
> > b. whether there's anyway of indicating the order in which phase 1
> > activity should take place (e.g. do the include first, delay expanding
> > the prerequisites, that sort of thing).
> >
> > I can post the makefile somewhere, if that helps.
>
> What would really help would be a cut-down trivial testcase, with just
> enough in it to show the required dependencies and the autogeneration.
> It's pretty hard to know what's going on without seeing an example, but the
> first thing I'd look at in such a testcase would be whether you're running
> into problems from the use of ':=' immediate evaluation versus '=' deferred
> evaluation.
I've attached a small test-case (it's very small, so I hope emailing it to the
list is OK). This test-case replicates the problem without using include, so
this may not have been the root-cause.
There are four parts to the test-case:
First, run the makefile as-is. This should demonstrate correct
behaviour.
Second, comment the first TEST_LIST definition and uncomment the second
TEST_LIST definition. The output should be different and, if run
with --warn-undefined-variables, you should get a warning.
Third, uncomment the PHONY definition. You should find the problem
persists.
Forth, uncomment the initial TEST_LIST definition and comment the
second
definition. You should *still* see the problem persist.
Only when the PHONY is commented again does the makefile work.
I'm using make v3.81 on Debian sid.
HTH,
Paul.
Makefile
Description: Text Data