help-make
[Top][All Lists]
Advanced

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

Target specific variables


From: Jens Schweikhardt
Subject: Target specific variables
Date: Wed, 21 Mar 2001 17:26:44 +0100
User-agent: Mutt/1.2.5i

hello, world\n

I'm reading 6.10, Target specific variable values:

   target ... : variable-assignment

This works fine for setting a single variable, i.e.

  foo Foo: CFLAGS = -DMUMBLE

However, I also need to set some more variables, e.g. I'd like to say

 foo Foo: CFLAGS = -DMUBMLE, LDFLAGS = -DFROB, YFLAGS = bar baz

For now I simply repeat the targets,

  foo Foo: CFLAGS = -DMUMBLE
  foo Foo: LDFLAGS = -DFROB
  foo Foo: YFLAGS = bar baz

This does work, but it's somewhat ugly because my list of targets
(foo Foo) actually consists of up to one hundred separate targets
and repeating them leads to considerable Makefile bloat... In the
spirit of avoiding redundancy, is there a way to do what I want
or am I SOL?

I realize there's the problem of "What's the delimiter between diffenent
variable assignments" (comma in my example). But maybe I've overseen
something. If not, Paul may treat this mail as a feature-request :-)


Regards,

        Jens
-- 
Jens Schweikhardt  http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)



reply via email to

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