help-make
[Top][All Lists]
Advanced

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

Re: does make -p dump variables in the right order?


From: Adam Kellas
Subject: Re: does make -p dump variables in the right order?
Date: Wed, 3 Mar 2010 13:03:23 -0500

On Wed, Mar 3, 2010 at 12:27 PM, Paul Smith <address@hidden> wrote:
In fact the output explicitly does NOT show in any particular order.

Thanks. When you say "explicit", do you mean literally that it's documented somewhere?
 
Variables are stored internally to make in a hash table, and the -p flag
dumps the contents by walking the hash table.  So, the values are
printed in essentially random order.


This is somewhat surprising to me - after all, given the makefile

CFLAGS = -g
CFLAGS = -O
all:;   @echo CFLAGS=$(CFLAGS)

the order is crucial to getting the right result. So make must keep track of order somehow, no? And if it has that data, why not use it in -p mode?

Thanks,
AK

reply via email to

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