help-make
[Top][All Lists]
Advanced

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

Re: Indirection Operators in the Command section of a makefile doesnt wo


From: Paul Smith
Subject: Re: Indirection Operators in the Command section of a makefile doesnt work.
Date: Sun, 02 Feb 2014 11:09:24 -0500

On Mon, 2014-01-20 at 04:25 -0800, Rakesh Sharma wrote:
> I have now modified my way to first define a multiline env variable
> from a csh file, then invoke the make from  this csh file,
> 
> finally use the $$multiline variable in the makefile , since it's now
> visible to the make by virtue of importing the environment.

csh!!  *shudder* Hard to believe that's still around in 2014.

Anyway, this seems like a much more complex solution than is needed.
You can define a multiline variable inside a makefile with define, then
export it and use it in your recipe.  And save yourself the hassle of
having a wrapper script... especially one in csh ;-)

    define BIGVAR
    this is line 1
    this is line 2
    this is line 3
    endef

    export BIGVAR

    all: ; @echo "$$BIGVAR" > bigfile ; cat bigfile





reply via email to

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