[Top][All Lists]

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

Problem in defining generic targets

From: Vijay_Sharma
Subject: Problem in defining generic targets
Date: Mon, 26 Aug 2002 16:23:48 -0500

I have few simple problem in defining rules in my makefile.

Problem 1:

The problem is I want a generic rule to build targets say afile, bfile or
cfile dependent on a_FILES, b_FILES, c_FILES respectively
in example given below:

To_Build = a b c d

a_FILES = a1 a2 a3 a4
b_FILES = b1 b2 b3 b4
c_FILES = c1 c2 c3 c4

$(To_build)file: $(To_build)_FILES
(what I mean is I want target as afile, bfile, cfile having prequisite as
either a_FILES or b_FILES or c_FILES depending on target to build).

I tried the static  pattern rule for prequisite and pathsub for target but
it doesn't work:
$(patsubst %,%file,$(To_build)):%file:$(%_FILE)

Problem 2:
Also if I have,
temp = a
would $($(temp)_FILES) mean a_FILES

Would appreciate your help on the above



reply via email to

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