mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-27 06:27:51 +00:00
414af96a50
Go through both run_make_tests.pl and test_driver.pl and slightly modernize the Perl and clean up indentation etc. Fix a number of warnings in the test scripts detected by running with -w. * tests/test_driver.pl: Move make error string detection out of the base test driver. (run_all_tests): Ensure that we always look for tests in the cwd. * tests/run_make_tests.pl: Use File::Spec for path manipulations. Correctly use setlocale() when detecting error strings. Get configuration from the config-flags.pm file not config.status. * tests/scripts/features/archives: Use new $cwddir variable. * tests/scripts/features/reinvoke: Add missing semicolon. * tests/scripts/features/vpath2: Avoid non-existent variable. * tests/scripts/functions/foreach: Escape variables. * tests/scripts/misc/bs-nl: Remove non-existing \v escape sequence. * tests/scripts/misc/general4: Use handy create_file(). * tests/scripts/options/dash-C: Use Cwd/$cwddir. * tests/scripts/options/dash-I: Use subst_make_string() and #PWD#. * tests/scripts/options/symlinks: Use File::Spec. * tests/scripts/targets/DEFAULT: Use create_file and run_make_test. * tests/scripts/variables/CURDIR: Use run_make_test. * tests/scripts/variables/automatic: Remove extraneous "\". * tests/scripts/vms/library: Remove extra "my" and extraneous "\".
35 lines
1 KiB
Perl
35 lines
1 KiB
Perl
# -*-perl-*-
|
|
|
|
$description = "The following test creates a makefile to override part\n"
|
|
."of one Makefile with Another Makefile with the .DEFAULT\n"
|
|
."rule.";
|
|
|
|
$details = "This tests the use of the .DEFAULT special target to say that \n"
|
|
."to remake any target that cannot be made fram the information\n"
|
|
."in the containing makefile, make should look in another makefile\n"
|
|
."This test gives this makefile the target bar which is not \n"
|
|
."defined here but passes the target bar on to another makefile\n"
|
|
."which does have the target bar defined.\n";
|
|
|
|
create_file('defsub.mk', q!
|
|
bar: ; @echo Executing rule BAR
|
|
!);
|
|
|
|
run_make_test(q!
|
|
foo:; @echo Executing rule FOO
|
|
|
|
.DEFAULT: ; @$(MAKE) -f defsub.mk $@
|
|
!,
|
|
'bar',"#MAKE#[1]: Entering directory '#PWD#'\n"
|
|
. "Executing rule BAR\n"
|
|
. "#MAKE#[1]: Leaving directory '#PWD#'\n");
|
|
|
|
unlink('defsub.mk');
|
|
|
|
1;
|
|
|
|
|
|
|
|
|
|
|
|
|