help-make
[Top][All Lists]
Advanced

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

Re: Make doesn't honor .SHELLFLAGS?


From: Greg Chicares
Subject: Re: Make doesn't honor .SHELLFLAGS?
Date: Thu, 25 Oct 2012 08:41:03 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1

On 2012-10-25 06:57Z, Warlich, Christof wrote:
> 
> I'd like to have Make to use a shell that executes a specific init file.
> I tried the following, but it doesn't work:
> 
> echo "echo -n Hello">xxx && make SHELL=/bin/bash .SHELLFLAGS="--init-file xxx 
> -i -c"

Seems to work for me:

$ echo "echo -n Hello">xxx && make SHELL=/bin/bash .SHELLFLAGS="--init-file xxx 
-i -c"
Hello World

$ make --version
GNU Make 3.82.90
Built for i686-pc-cygwin ...

$ bash --version
GNU bash, version 4.1.10(4)-release (i686-pc-cygwin) ...

> The Makefile may be as simple as:
> 
> all: ; @echo " World"
> 
> but I only see:
> 
> $ make
> World
> 
> while I'd expect:
> 
> $ make
> Hello World

Just to be sure...you're using the full 'echo ...' command above,
and not just typing 'make' at the command line, right?

$ make
 World

Does it make a difference if you specify '/bin/echo -n ...',
to get the 'echo' binary instead of a shell builtin?

- echo "echo -n Hello">xxx ...
+ echo "/bin/echo -n Hello">xxx ...

> By the way: This works:
> 
> $ echo "echo -n Hello">xxx && /bin/bash --init-file xxx -i -c "echo \" 
> World\""
> Hello World

That works here, too:

$ echo "echo -n Hello">xxx && /bin/bash --init-file xxx -i -c "echo \" World\""
Hello World




reply via email to

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