|
From: | Sven Köhler |
Subject: | target-specific variables |
Date: | Sun, 14 Mar 2004 15:06:47 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 |
Hi, here's a short example if a Makefile: t1: TEST:=$(shell echo hallo 1>&2) t1: echo "" t2: echo ""With both "make t1" and "make t2" i get "hallo" on my screen, but i'd like to define a variable that is only valid for target t1, and i think that target-specific variables are the right thing to use here, but make executes the shell command, although it wouldn't have to.
I'd still like to use the $(shell ...) stuff and define a variable, but only if the target t1 is executed. Is there any trick to achieve that?
Thx Sven
[Prev in Thread] | Current Thread | [Next in Thread] |