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 _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
