help-make
[Top][All Lists]
Advanced

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

Re-calculate variable values


From: Aditya Kher
Subject: Re-calculate variable values
Date: Wed, 30 Sep 2009 18:05:41 +0900

folks,
I would like to re-evaluate or rather re-calculate variable value during making of target
 
something like below:
 
%gmake all RUN_COUNT=4
 
 
Makefile:
all:
   ${MAKE} run${RUN_COUNT}
 
#add code for
#    1. RUN_COUNT = RUN_COUNT -1
#     2. re-evaluate "all" target after updating RUN_COUNT pre-requisite
 
%.txt:
       touch ${RUN_COUNT}.txt
 
run%:%.txt
       @ls $^
 
thanks!

reply via email to

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