diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in
index 45236ee..5dff74e 100644
a
|
b
|
|
572 | 572 | # This is set to MAKE=$make if your $make command doesn't |
573 | 573 | # do it for you. |
574 | 574 | @make_set_make@ |
575 | | MAKE = @make_c@ |
| 575 | MAKE = @make@ |
| 576 | MAKE_C = @make_c@ |
576 | 577 | |
577 | 578 | # These need to be above lines that define suffix rules to be portable |
578 | 579 | # (certainly FreeBSD make doesn't grok the pir.pbc rule otherwise) |
… |
… |
|
836 | 837 | |
837 | 838 | bootstrap-ops : $(OPS2C) |
838 | 839 | $(OPS2C) --core --quiet |
839 | | $(MAKE) . |
| 840 | $(MAKE_C) . |
840 | 841 | |
841 | 842 | runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES) |
842 | 843 | $(PARROT) -o $@ runtime/parrot/library/parrotlib.pir |
… |
… |
|
1295 | 1296 | # $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc |
1296 | 1297 | # |
1297 | 1298 | #examples/pasm/hello$(EXE): examples/pasm/hello$(O) |
1298 | | # $(MAKE) . EXEC=examples/pasm/hello exec |
| 1299 | # $(MAKE_C) . EXEC=examples/pasm/hello exec |
1299 | 1300 | examples/pasm/hello$(EXE): examples/pasm/hello.pbc $(PBC_TO_EXE) |
1300 | 1301 | $(PBC_TO_EXE) examples/pasm/hello.pbc |
1301 | 1302 | |
… |
… |
|
1931 | 1932 | @echo "Perldoc is required, but not detected." |
1932 | 1933 | |
1933 | 1934 | html.dummy : |
1934 | | $(MAKE) docs html |
| 1935 | $(MAKE_C) docs html |
1935 | 1936 | |
1936 | 1937 | html-clean : |
1937 | | $(MAKE) docs html-clean |
| 1938 | $(MAKE_C) docs html-clean |
1938 | 1939 | |
1939 | 1940 | #IF(has_perldoc):htmlhelp : htmlhelp.dummy |
1940 | 1941 | #ELSE:htmlhelp : htmlhelp.stub |
… |
… |
|
1943 | 1944 | @echo "Perldoc is required, but not detected." |
1944 | 1945 | |
1945 | 1946 | htmlhelp.dummy : |
1946 | | $(MAKE) docs htmlhelp |
| 1947 | $(MAKE_C) docs htmlhelp |
1947 | 1948 | |
1948 | 1949 | htmlhelp-clean : |
1949 | | $(MAKE) docs htmlhelp-clean |
| 1950 | $(MAKE_C) docs htmlhelp-clean |
1950 | 1951 | |
1951 | 1952 | pdf: |
1952 | | $(MAKE) docs pdf |
| 1953 | $(MAKE_C) docs pdf |
1953 | 1954 | |
1954 | 1955 | pdf-clean: |
1955 | | $(MAKE) docs pdf-clean |
| 1956 | $(MAKE_C) docs pdf-clean |
1956 | 1957 | |
1957 | 1958 | ############################################################################### |
1958 | 1959 | # |
… |
… |
|
1970 | 1971 | ############################################################################### |
1971 | 1972 | |
1972 | 1973 | editor-clean : |
1973 | | $(MAKE) editor clean |
| 1974 | $(MAKE_C) editor clean |
1974 | 1975 | |
1975 | 1976 | ############################################################################### |
1976 | 1977 | # |
diff --git a/config/inter/make.pm b/config/inter/make.pm
index 2d315b9..996bd86 100644
a
|
b
|
|
112 | 112 | sub _set_make_c { |
113 | 113 | my ($conf, $prog) = @_; |
114 | 114 | if ( $conf->data->get('gmake_version') ) { |
115 | | $conf->data->set( make_c => "$prog -C" ); |
| 115 | $conf->data->set( make_c => "+$prog -C" ); |
116 | 116 | } |
117 | 117 | else { |
118 | | |
119 | | # get the default value |
120 | | my $make_c = $conf->data->get('make_c'); |
121 | | |
122 | | # TT #1049: this is an ugly hack |
123 | | # replace the value for $(MAKE) with the actual path or we'll end up |
124 | | # with a variable that recursively refers to itself |
125 | | $make_c =~ s/\$\(MAKE\)/$prog/; |
126 | | |
127 | | $conf->data->set( make_c => $make_c ); |
| 118 | # The default value is fine. |
128 | 119 | } |
129 | 120 | } |
130 | 121 | |
diff --git a/t/steps/inter/make-01.t b/t/steps/inter/make-01.t
index 63a3af7..6912904 100644
a
|
b
|
|
66 | 66 | $conf->data->set('gmake_version' => '4.1'); |
67 | 67 | my $prog = 'gmake'; |
68 | 68 | inter::make::_set_make_c($conf, $prog); |
69 | | is($conf->data->get('make_c'), 'gmake -C', |
| 69 | is($conf->data->get('make_c'), '+gmake -C', |
70 | 70 | "make_c correctly set when gmake"); |
71 | 71 | |
72 | 72 | $conf->data->set('gmake_version' => undef); |
73 | | my $str = q|$(PERL) -e 'chdir shift @ARGV; system q{$(MAKE)}, @ARGV; exit $$? >> 8;'|; |
| 73 | my $str = q|$(PERL) -e 'chdir shift @ARGV; system q{make}, @ARGV; exit $$? >> 8;'|; |
74 | 74 | $conf->data->set(make_c => $str); |
75 | 75 | $prog = 'make'; |
76 | 76 | inter::make::_set_make_c($conf, $prog); |