make-w32
[Top][All Lists]
Advanced

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

Re: Variable assignments from shell commands


From: John Graham-Cumming
Subject: Re: Variable assignments from shell commands
Date: Fri, 03 Nov 2006 17:07:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

address@hidden wrote:
According to section 8.11 of the gnu manual, I should be able to use the shell command to assign a variable. However, this doesn't work. I've tried assigning the variable from outside a rule but the command does not get executed and the variable is empty. The only time the shell command is executed is from within a rule but variable assignments within rule is not allowed.

     contents := $(shell cat foo)

A more complete bug report than that would be good. $(shell) with a variable assignment definitely does work, so something else must be going on. Can you reply with a simple Makefile that fails for you.

John.
--
John Graham-Cumming
address@hidden

Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/

POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/





reply via email to

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