help-make
[Top][All Lists]
Advanced

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

Missing Something Obvious


From: Marc Smith
Subject: Missing Something Obvious
Date: Mon, 14 Nov 2011 09:53:52 -0500

Hi,

I must be missing something obvious... I'm using the shell function in
my Makefile with a recursive variable, however, it seems the command
in my shell function is only being evaluated once. I've tried this on
two different Linux distributions and get the same result; from
everything I read (even in the O'Reilly GNU Make book), this should
not be working this way. See below for an example:

--snip--
address@hidden testing]$ cat Makefile
blah = $(shell date)

all:
        @ echo $(blah)
        @ sleep 10
        @ echo $(blah)
--snip--


--snip--
address@hidden testing]$ make
Mon Nov 14 09:51:14 EST 2011
Mon Nov 14 09:51:14 EST 2011
--snip--


--snip--
address@hidden testing]$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-redhat-linux-gnu
--snip--

I gotta be missing something obvious -- right?


--Marc



reply via email to

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