[Top][All Lists]

[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


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:

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

        @ echo $(blah)
        @ sleep 10
        @ echo $(blah)

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

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

This program built for x86_64-redhat-linux-gnu

I gotta be missing something obvious -- right?


reply via email to

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