Changeset 12edad6 in rtems for c/src/make/leaf.cfg

Timestamp:
04/05/00 12:51:51 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
0c67e4ac
Parents:
a899433e
Message:

Patch rtems-rc-4.5-10-cvs.diff from Ralf Corsepius <corsepiu@…>.
Ralf's description of the patch follows:

Now that make VARIANT=xxx has prooven not to be simple enough, I made up
my mind to change again the internals of the mechanism being used to
handle variants:

With the patch below, I introduce the indirection step I had mentioned
in one of my recent mails to translate settings of VARIANT.

The trick is to use the contents of VARIANT as keyword to lookup another
internal keyword (VARIANT_V), which then is used as keyword to lookup
values for setting ARCH, LIB_VARIANT, LIBSUFFIX_VA and AM_CFLAGS from
ARCH_$(VARIANT_V)_V etc. (cf automake/local.am).

This means, at first to translate

VARIANT=[optimize|OPTIMIZE] into VARIANT_V=OPTIMIZE
VARIANT=[debug|DEBUG] into VARIANT_V=DEBUG
VARIANT=[profile|PROFILE] into VARIANT_V=PROFILE
VARIANT=<anything> into VARIANT_V=<anything>

=> perform keyword conversion to uppercase and reduction from 6 to 3+1

internal keywords.

$(VARIANT_V) then is used to lookup make variables from other tables
(eg. CFLAGS_*_V). Eg. ARCH is set up this way:

ARCH_OPTIMIZE_V = o-optimize
ARCH_DEBUG_V = o-debug
ARCH_PROFILE_V = o-profile
ARCHV = $(ARCH_OPTIMIZE_V)
ARCH = $(ARCH_$(VARIANT_V)_V)

Note the ARCHV variable. When VARIANT=<anything> is passed to make,
VARIANT_V=<anything> will be set, resulting into ARCH =
$(ARCH_$(<anything>)_V) = $(ARCH
V) = $(ARCH_OPTIMIZE_V), ie. falling
back to OPTIMIZE.

=> o- or o-<anything> should never popup anymore.

(No files)

Note: See TracChangeset for help on using the changeset viewer.