automake
[Top][All Lists]
Advanced

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

Conditionals in Makefile


From: akim
Subject: Conditionals in Makefile
Date: Wed, 7 Mar 2001 21:23:57 +0100
User-agent: Mutt/1.3.15i

There is a choice to make wrt conditionals, and I'd like to have your opinion 
as both choices  can be defended with sensible arguments.

The question can be asked as ``how should be output conditionals in
Makfiles: the order does not matter, hence alphabetical is fine,
or order matters''.

If the order does not matter, then sorting it can simplify a lot from
the code: simplify sort the conditions, that makes a uniq means to
designates them (conditional_same makes no sense, use eq, etc.).
The backdraw is that the user cannot see in the Makefile something
which is related to her input since the order can be completely different.

Or we output in the order made by the user.

The current situation is in between according to my current understating,
as the order is kept for the first form of a class of equivalent
conditions.  In other words

if FOO_TRUE
if BAR_TRUE
# Something
fi
fi

if BAR_TRUE
if FOO_TRUE
# Something else
fi
fi

will give

@FOO_TRUE@@address@hidden
@FOO_TRUE@@address@hidden else

        Akim




reply via email to

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