diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in index 45236ee..5dff74e 100644 --- a/config/gen/makefiles/root.in +++ b/config/gen/makefiles/root.in @@ -572,7 +572,8 @@ EXTRANCITHUNKS_SO = $(DYNEXT_DIR)/extra_nci_thunks$(LOAD_EXT) # This is set to MAKE=$make if your $make command doesn't # do it for you. @make_set_make@ -MAKE = @make_c@ +MAKE = @make@ +MAKE_C = @make_c@ # These need to be above lines that define suffix rules to be portable # (certainly FreeBSD make doesn't grok the pir.pbc rule otherwise) @@ -836,7 +837,7 @@ installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(IN bootstrap-ops : $(OPS2C) $(OPS2C) --core --quiet - $(MAKE) . + $(MAKE_C) . runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES) $(PARROT) -o $@ runtime/parrot/library/parrotlib.pir @@ -1295,7 +1296,7 @@ examples/pasm/hello.pbc: examples/pasm/hello.pasm # $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc # #examples/pasm/hello$(EXE): examples/pasm/hello$(O) -# $(MAKE) . EXEC=examples/pasm/hello exec +# $(MAKE_C) . EXEC=examples/pasm/hello exec examples/pasm/hello$(EXE): examples/pasm/hello.pbc $(PBC_TO_EXE) $(PBC_TO_EXE) examples/pasm/hello.pbc @@ -1931,10 +1932,10 @@ html.stub: @echo "Perldoc is required, but not detected." html.dummy : - $(MAKE) docs html + $(MAKE_C) docs html html-clean : - $(MAKE) docs html-clean + $(MAKE_C) docs html-clean #IF(has_perldoc):htmlhelp : htmlhelp.dummy #ELSE:htmlhelp : htmlhelp.stub @@ -1943,16 +1944,16 @@ htmlhelp.stub: @echo "Perldoc is required, but not detected." htmlhelp.dummy : - $(MAKE) docs htmlhelp + $(MAKE_C) docs htmlhelp htmlhelp-clean : - $(MAKE) docs htmlhelp-clean + $(MAKE_C) docs htmlhelp-clean pdf: - $(MAKE) docs pdf + $(MAKE_C) docs pdf pdf-clean: - $(MAKE) docs pdf-clean + $(MAKE_C) docs pdf-clean ############################################################################### # @@ -1970,7 +1971,7 @@ ext-clean: ############################################################################### editor-clean : - $(MAKE) editor clean + $(MAKE_C) editor clean ############################################################################### # diff --git a/config/inter/make.pm b/config/inter/make.pm index 2d315b9..996bd86 100644 --- a/config/inter/make.pm +++ b/config/inter/make.pm @@ -112,19 +112,10 @@ sub runstep { sub _set_make_c { my ($conf, $prog) = @_; if ( $conf->data->get('gmake_version') ) { - $conf->data->set( make_c => "$prog -C" ); + $conf->data->set( make_c => "+$prog -C" ); } else { - - # get the default value - my $make_c = $conf->data->get('make_c'); - - # TT #1049: this is an ugly hack - # replace the value for $(MAKE) with the actual path or we'll end up - # with a variable that recursively refers to itself - $make_c =~ s/\$\(MAKE\)/$prog/; - - $conf->data->set( make_c => $make_c ); + # The default value is fine. } } diff --git a/t/steps/inter/make-01.t b/t/steps/inter/make-01.t index 63a3af7..6912904 100644 --- a/t/steps/inter/make-01.t +++ b/t/steps/inter/make-01.t @@ -66,11 +66,11 @@ $step = test_step_constructor_and_description($conf); $conf->data->set('gmake_version' => '4.1'); my $prog = 'gmake'; inter::make::_set_make_c($conf, $prog); -is($conf->data->get('make_c'), 'gmake -C', +is($conf->data->get('make_c'), '+gmake -C', "make_c correctly set when gmake"); $conf->data->set('gmake_version' => undef); -my $str = q|$(PERL) -e 'chdir shift @ARGV; system q{$(MAKE)}, @ARGV; exit $$? >> 8;'|; +my $str = q|$(PERL) -e 'chdir shift @ARGV; system q{make}, @ARGV; exit $$? >> 8;'|; $conf->data->set(make_c => $str); $prog = 'make'; inter::make::_set_make_c($conf, $prog);