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: Eli Zaretskii
Subject: Re: Variable assignments from shell commands
Date: Fri, 03 Nov 2006 17:47:33 +0200

> From: address@hidden
> Date: Fri, 3 Nov 2006 08:45:02 -0600
> 
> 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. 

It does for me.

> 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)

Please show the shortest self-contained Makefile that can be used to
reproduce the problem, and please tell what port of which version of
Make do you have installed.  The $shell function works for me in Make
3.81 compiled with MinGW port of GCC.




reply via email to

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