Hi everyone,
I try to understand how variables are passed to sub-make. In the Makefile
below, target "c" below is scheduled for later execution by target "b".
all: b
export BAR=one
b:
@echo Target b FOO: $(FOO)
@echo Target b BAR $(BAR)
@echo Target b OTHER: $(OTHER)
@echo Target b MAKEFLAGS: $(MAKEFLAGS)
rsh hostA "echo 'make c FOO=sweet' | at now + 1 minute"
c:
@echo Target c FOO: $(FOO)
@echo Target c BAR: $(BAR)
@echo Target c OTHER: $(OTHER)
@echo Target c MAKEFLAGS: $(MAKEFLAGS)
% make OTHER=ok BAR=two
Then the following minute I get:
Target c FOO: sweet
Target c BAR: one
Target c OTHER:
Target c MAKEFLAGS: FOO=sweet
How do I get the end result to have BAR=two and OTHER=ok?
I am puzzled because the manual says:
"make automatically passes down variable values that were defined on the
command line, by putting them in the MAKEFLAGS variable."
Can someone explain? I am really tempted at passing $(MAKEFLAGS) like
this, but it does not work all the time:
rsh hostA "echo 'make c FOO=sweet $(MAKEFLAGS)' | at now + 1 minute"
Help!
Martin d'A.
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make