help-make
[Top][All Lists]
Advanced

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

Re: using output of perl script in make file


From: Brian Dessent
Subject: Re: using output of perl script in make file
Date: Thu, 25 Oct 2007 00:09:19 -0700

Ashish Raikwar wrote:

> RELEASE_TAG_VALUE=$(shell perl ./version.pl -v)
> BUILD_DATE_VALUE=$(shell date -u +"%A-%b-%d-%Y-%H:%M:%S")

I don't know that it's relevant to your problem, but you should
seriously consider using the simply expanded (immediate) type of
variable and not recursive (deferred) expansion.  This means using ":="
and not "=" to assign values.  With deferred expansion the shell
commands will be (re-)run every single time those variables are
referenced in a rule or expanded in another variable, which could
potentially be very costly (and not what you intended.)

<http://www.gnu.org/software/make/manual/html_node/Flavors.html>

Brian




reply via email to

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