help-gnu-utils
[Top][All Lists]
Advanced

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

make: are unique target-specific variables always evaluated?


From: SysTom
Subject: make: are unique target-specific variables always evaluated?
Date: Tue, 19 Feb 2008 11:38:50 -0800 (PST)
User-agent: G2/1.0

Hello,

I have makefile abbreviated as

  all:
         do a bunch of stuff
  ...
  next_target:
         $(MAKE)
         do a bunch of stuff
  ...
  nth_target: target_specific_var1 = ...
  nth_target: target_specific_var2 = ...
  nth_target: target_specific_var3 = $(shell my-shell-command...)
  nth_target:
        $(MAKE)
         do a bunch of other stuff

What I observe is, although I explicitly make 'next_target' the shell
command of the nth_target is always called.  Is that to be expected?
I would have assumed that the target-specific variables would not even
be evaluated unless I explicitly made them.  BTW, there are no cross-
dependencies here.  These targets really have no dependencies as
shown.

I'm using gnu make 3.81.

Thanks, Tom


reply via email to

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