help-make
[Top][All Lists]
Advanced

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

[SOLVED] forcing additional expansion of variables


From: Robert P. J. Day
Subject: [SOLVED] forcing additional expansion of variables
Date: Tue, 8 Mar 2005 09:43:42 -0500 (EST)

  well, i think i have a solution for what i asked about earlier (and
i really do need a way to do this for the build structure i've set
up.)

  if i want to associate various bits of info like config files with
particular subdirectories, it struck me that this is really just an
associative array/hash, so i grabbed the gnu make standard library,
and did the following.

  in one (to-be-included) makefile ("configs.mk), i defined the
information i want by repeated calls to "set" in creating a "configs"
hash:

  $(call set,configs,d1,fred)
  $(call set,configs,d2,barney)
  $(call set,configs,d3,wilma)

then, in my main makefile, i have the following:

include gmsl
include configs.mk

.PHONY: d1 d2 d3
d1 d2 d3:
        @echo directory target is address@hidden
        @echo Config file for this dir is $(call get,configs,$@).


this seems to work, unless there's a nasty gotcha i'm not seeing.

rday





reply via email to

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