diff options
author | Lukc <lukc@upyum.com> | 2010-12-12 04:13:19 +0100 |
---|---|---|
committer | Lukc <lukc@upyum.com> | 2010-12-12 04:13:19 +0100 |
commit | 9769d39d792c1e912234e23e663ba8bd21a6386e (patch) | |
tree | 76bf5a6a6c756cf78c73a847b2ff3ec97f048ee7 /make/make-3.81/tests/scripts/options | |
parent | abb6804a2c95065cbc228c3726781d44ed04e6cd (diff) | |
download | base-9769d39d792c1e912234e23e663ba8bd21a6386e.tar.gz base-9769d39d792c1e912234e23e663ba8bd21a6386e.tar.bz2 base-9769d39d792c1e912234e23e663ba8bd21a6386e.tar.xz base-9769d39d792c1e912234e23e663ba8bd21a6386e.zip |
Recette de make retir?e.
Diffstat (limited to 'make/make-3.81/tests/scripts/options')
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-B | 73 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-C | 71 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-I | 59 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-W | 88 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-e | 24 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-f | 85 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-k | 114 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-l | 55 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-n | 70 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-q | 57 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/dash-t | 58 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/general | 35 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/symlinks | 68 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/options/warn-undefined-variables | 25 |
14 files changed, 0 insertions, 882 deletions
diff --git a/make/make-3.81/tests/scripts/options/dash-B b/make/make-3.81/tests/scripts/options/dash-B deleted file mode 100644 index 864a01f..0000000 --- a/make/make-3.81/tests/scripts/options/dash-B +++ /dev/null @@ -1,73 +0,0 @@ -# -*-perl-*- - -$description = "Test make -B (always remake) option.\n"; - -$details = "\ -Construct a simple makefile that builds a target. -Invoke make once, so it builds everything. Invoke it again and verify -that nothing is built. Then invoke it with -B and verify that everything -is built again."; - -&touch('bar.x'); - -run_make_test(' -.SUFFIXES: - -.PHONY: all -all: foo - -foo: bar.x - @echo cp $< $@ - @echo "" > $@ -', - '', 'cp bar.x foo'); - -run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'."); -run_make_test(undef, '-B', 'cp bar.x foo'); - -# Put the timestamp for foo into the future; it should still be remade. - -utouch(1000, 'foo'); -run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'."); -run_make_test(undef, '-B', 'cp bar.x foo'); - -# Clean up - -rmfiles('bar.x', 'foo'); - -# Test -B with the re-exec feature: we don't want to re-exec forever -# Savannah bug # 7566 - -run_make_test(' -all: ; @: -$(info MAKE_RESTARTS=$(MAKE_RESTARTS)) -include foo.x -foo.x: ; @touch $@ -', - '-B', 'MAKE_RESTARTS= -#MAKEFILE#:4: foo.x: No such file or directory -MAKE_RESTARTS=1'); - -rmfiles('foo.x'); - -# Test -B with the re-exec feature: we DO want -B in the "normal" part of the -# makefile. - -&touch('blah.x'); - -run_make_test(' -all: blah.x ; @echo $@ -$(info MAKE_RESTARTS=$(MAKE_RESTARTS)) -include foo.x -foo.x: ; @touch $@ -blah.x: ; @echo $@ -', - '-B', 'MAKE_RESTARTS= -#MAKEFILE#:4: foo.x: No such file or directory -MAKE_RESTARTS=1 -blah.x -all'); - -rmfiles('foo.x', 'blah.x'); - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-C b/make/make-3.81/tests/scripts/options/dash-C deleted file mode 100644 index 5864ffd..0000000 --- a/make/make-3.81/tests/scripts/options/dash-C +++ /dev/null @@ -1,71 +0,0 @@ -# -*-perl-*- - -$description = "Test the -C option to GNU make."; - -$details = "\ -This test is similar to the clean test except that this test creates the file -to delete in the work directory instead of the current directory. Make is -called from another directory using the -C workdir option so that it can both -find the makefile and the file to delete in the work directory."; - -$example = $workdir . $pathsep . "EXAMPLE"; - -open(MAKEFILE,"> $makefile"); -print MAKEFILE <<EOF; -all: ; \@echo This makefile did not clean the dir ... good -clean: ; $delete_command EXAMPLE\$(ext) -EOF -close(MAKEFILE); - -# TEST #1 -# ------- -&touch($example); - -&run_make_with_options("${testname}.mk", - "-C $workdir clean", - &get_logfile); - -chdir $workdir; -$wpath = &get_this_pwd; -chdir $pwd; - -if (-f $example) { - $test_passed = 0; -} - -# Create the answer to what should be produced by this Makefile -$answer = "$make_name: Entering directory `$wpath'\n" - . "$delete_command EXAMPLE\n" - . "$make_name: Leaving directory `$wpath'\n"; - -&compare_output($answer,&get_logfile(1)); - - -# TEST #2 -# ------- -# Do it again with trailing "/"; this should work the same - -$example .= "slash"; - -&touch($example); - -&run_make_with_options("${testname}.mk", - "-C $workdir/ clean ext=slash", - &get_logfile); - -chdir $workdir; -$wpath = &get_this_pwd; -chdir $pwd; - -if (-f $example) { - $test_passed = 0; -} - -# Create the answer to what should be produced by this Makefile -$answer = "$make_name: Entering directory `$wpath'\n" - . "$delete_command EXAMPLEslash\n" - . "$make_name: Leaving directory `$wpath'\n"; - -&compare_output($answer,&get_logfile(1)); - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-I b/make/make-3.81/tests/scripts/options/dash-I deleted file mode 100644 index 8dc5d9b..0000000 --- a/make/make-3.81/tests/scripts/options/dash-I +++ /dev/null @@ -1,59 +0,0 @@ -# -*-perl-*- - -$description ="The following test creates a makefile to test the -I option."; - -$details = "\ -This test tests the -I option by including a filename in -another directory and giving make that directory name -under -I in the command line. Without this option, the make -would fail to find the included file. It also checks to make -sure that the -I option gets passed to recursive makes."; - -$makefile2 = &get_tmpfile; - -open(MAKEFILE,"> $makefile"); - -# The Contents of the MAKEFILE ... - -$mf2 = substr ($makefile2, index ($makefile2, $pathsep) + 1); -print MAKEFILE <<EOF; -include $mf2 -all: -\t\@echo There should be no errors for this makefile. -EOF - -# END of Contents of MAKEFILE - -close(MAKEFILE); - - -open(MAKEFILE,"> $makefile2"); - -print MAKEFILE <<EOF; -ANOTHER: -\t\@echo This is another included makefile -recurse: -\t\$(MAKE) ANOTHER -f $makefile -EOF - -close(MAKEFILE); - -&run_make_with_options($makefile,"-I $workdir all",&get_logfile); - -# Create the answer to what should be produced by this Makefile -$answer = "There should be no errors for this makefile.\n"; -&compare_output($answer,&get_logfile(1)); - - -$answer = "This is another included makefile\n"; -&run_make_with_options($makefile,"-I $workdir ANOTHER",&get_logfile); -&compare_output($answer,&get_logfile(1)); - - -$answer = "$mkpath ANOTHER -f $makefile -${make_name}[1]: Entering directory `$pwd' -This is another included makefile -${make_name}[1]: Leaving directory `$pwd'\n"; - -&run_make_with_options($makefile,"-I $workdir recurse",&get_logfile); -&compare_output($answer,&get_logfile(1)); diff --git a/make/make-3.81/tests/scripts/options/dash-W b/make/make-3.81/tests/scripts/options/dash-W deleted file mode 100644 index d3fde87..0000000 --- a/make/make-3.81/tests/scripts/options/dash-W +++ /dev/null @@ -1,88 +0,0 @@ -# -*-perl-*- - -$description = "Test make -W (what if) option.\n"; - -# Basic build - -run_make_test(' -a.x: b.x -a.x b.x: ; echo >> $@ -', - '', "echo >> b.x\necho >> a.x"); - -# Run it again: nothing should happen - -run_make_test(undef, '', "#MAKE#: `a.x' is up to date."); - -# Now run it with -W b.x: should rebuild a.x - -run_make_test(undef, '-W b.x', 'echo >> a.x'); - -# Put the timestamp for a.x into the future; it should still be remade. - -utouch(1000, 'a.x'); -run_make_test(undef, '', "#MAKE#: `a.x' is up to date."); -run_make_test(undef, '-W b.x', 'echo >> a.x'); - -# Clean up - -rmfiles('a.x', 'b.x'); - -# Test -W with the re-exec feature: we don't want to re-exec forever -# Savannah bug # 7566 - -# First set it up with a normal build - -run_make_test(' -all: baz.x ; @: -include foo.x -foo.x: bar.x - @echo "\$$(info restarts=\$$(MAKE_RESTARTS))" > $@ - @echo "touch $@" -bar.x: ; echo >> $@ -baz.x: bar.x ; @echo "touch $@" -', - '', '#MAKEFILE#:3: foo.x: No such file or directory -echo >> bar.x -touch foo.x -restarts=1 -touch baz.x'); - -# Now run with -W bar.x - -# Tweak foo.x's timestamp so the update will change it. -&utouch(1000, 'foo.x'); - -run_make_test(undef, '-W bar.x', "restarts=\ntouch foo.x\nrestarts=1\ntouch baz.x"); - -rmfiles('foo.x', 'bar.x'); - -# Test -W on vpath-found files: it should take effect. -# Savannah bug # 15341 - -mkdir('x-dir', 0777); -utouch(-20, 'x-dir/x'); -touch('y'); - -run_make_test(' -y: x ; @echo cp $< $@ -', - '-W x-dir/x VPATH=x-dir', - 'cp x-dir/x y'); - -# Make sure ./ stripping doesn't interfere with the match. - -run_make_test(' -y: x ; @echo cp $< $@ -', - '-W ./x-dir/x VPATH=x-dir', - 'cp x-dir/x y'); - -run_make_test(undef, - '-W x-dir/x VPATH=./x-dir', - 'cp ./x-dir/x y'); - -unlink(qw(y x-dir/x)); -rmdir('x-dir'); - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-e b/make/make-3.81/tests/scripts/options/dash-e deleted file mode 100644 index 17c3fc8..0000000 --- a/make/make-3.81/tests/scripts/options/dash-e +++ /dev/null @@ -1,24 +0,0 @@ -# -*-perl-*- - -$description = "The following test creates a makefile to ..."; - -$details = ""; - -$extraENV{GOOGLE} = 'boggle'; - -open(MAKEFILE,"> $makefile"); - -print MAKEFILE <<'EOF'; -GOOGLE = bazzle -all:; @echo "$(GOOGLE)" -EOF - -close(MAKEFILE); - -&run_make_with_options($makefile, '-e' ,&get_logfile); - -$answer = "boggle\n"; - -&compare_output($answer,&get_logfile(1)); - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-f b/make/make-3.81/tests/scripts/options/dash-f deleted file mode 100644 index 3aa4746..0000000 --- a/make/make-3.81/tests/scripts/options/dash-f +++ /dev/null @@ -1,85 +0,0 @@ -$description = "The following test tests that if you specify greater \n" - ."than one '-f makefilename' on the command line, \n" - ."that make concatenates them. This test creates three \n" - ."makefiles and specifies all of them with the -f option \n" - ."on the command line. To make sure they were concatenated, \n" - ."we then call make with the rules from the concatenated \n" - ."makefiles one at a time. Finally, it calls all three \n" - ."rules in one call to make and checks that the output\n" - ."is in the correct order."; - -$makefile2 = &get_tmpfile; -$makefile3 = &get_tmpfile; - -open(MAKEFILE,"> $makefile"); - -# The Contents of the MAKEFILE ... - -print MAKEFILE "all: \n"; -print MAKEFILE "\t\@echo This is the output from the original makefile\n"; - -# END of Contents of MAKEFILE - -close(MAKEFILE); - -# Create a second makefile -open(MAKEFILE,"> $makefile2"); -print MAKEFILE "TWO: \n"; -print MAKEFILE "\t\@echo This is the output from makefile 2\n"; -close(MAKEFILE); - -# Create a third makefile -open(MAKEFILE,"> $makefile3"); -print MAKEFILE "THREE: \n"; -print MAKEFILE "\t\@echo This is the output from makefile 3\n"; -close(MAKEFILE); - - -# Create the answer to what should be produced by this Makefile -$answer = "This is the output from the original makefile\n"; - -# Run make to catch the default rule -&run_make_with_options($makefile,"-f $makefile2 -f $makefile3",&get_logfile,0); - -&compare_output($answer,&get_logfile(1)); - - -# Run Make again with the rule from the second makefile: TWO -$answer = "This is the output from makefile 2\n"; - -&run_make_with_options($makefile,"-f $makefile2 -f $makefile3 TWO",&get_logfile,0); - -&compare_output($answer,&get_logfile(1)); - - -# Run Make again with the rule from the third makefile: THREE - -$answer = "This is the output from makefile 3\n"; -&run_make_with_options($makefile, - "-f $makefile2 -f $makefile3 THREE", - &get_logfile, - 0); -&compare_output($answer,&get_logfile(1)); - - -# Run Make again with ALL three rules in the order 2 1 3 to make sure -# that all rules are executed in the proper order - -$answer = "This is the output from makefile 2\n"; -$answer .= "This is the output from the original makefile\n"; -$answer .= "This is the output from makefile 3\n"; -&run_make_with_options($makefile, - "-f $makefile2 -f $makefile3 TWO all THREE", - &get_logfile, - 0); -&compare_output($answer,&get_logfile(1)); - - - - - - - - - - diff --git a/make/make-3.81/tests/scripts/options/dash-k b/make/make-3.81/tests/scripts/options/dash-k deleted file mode 100644 index d87a786..0000000 --- a/make/make-3.81/tests/scripts/options/dash-k +++ /dev/null @@ -1,114 +0,0 @@ -# -*-perl-*- - -$description = "Test the make -k (don't stop on error) option.\n"; - -$details = "\ -The makefile created in this test is a simulation of building -a small product. However, the trick to this one is that one -of the dependencies of the main target does not exist. -Without the -k option, make would fail immediately and not -build any part of the target. What we are looking for here, -is that make builds the rest of the dependencies even though -it knows that at the end it will fail to rebuild the main target."; - -open(MAKEFILE,"> $makefile"); - -# The Contents of the MAKEFILE ... - -print MAKEFILE <<EOF; -VPATH = $workdir -edit: main.o kbd.o commands.o display.o -\t\@echo cc -o edit main.o kbd.o commands.o display.o - -main.o : main.c defs.h -\t\@echo cc -c main.c - -kbd.o : kbd.c defs.h command.h -\t\@echo cc -c kbd.c - -commands.o : command.c defs.h command.h -\t\@echo cc -c commands.c - -display.o : display.c defs.h buffer.h -\t\@echo cc -c display.c -EOF - -# END of Contents of MAKEFILE - -close(MAKEFILE); - - -@files_to_touch = ("$workdir${pathsep}main.c","$workdir${pathsep}defs.h", - "$workdir${pathsep}command.h", - "$workdir${pathsep}commands.c","$workdir${pathsep}display.c", - "$workdir${pathsep}buffer.h", - "$workdir${pathsep}command.c"); - -&touch(@files_to_touch); - -if ($vos) { - $error_code = 3307; -} -else { - $error_code = 512; -} - -&run_make_with_options($makefile, "-k", &get_logfile, $error_code); - -# Create the answer to what should be produced by this Makefile -$answer = "cc -c main.c -$make_name: *** No rule to make target `kbd.c', needed by `kbd.o'. -cc -c commands.c -cc -c display.c -$make_name: Target `edit' not remade because of errors.\n"; - -# COMPARE RESULTS - -&compare_output($answer, &get_logfile(1)); - -unlink(@files_to_touch) unless $keep; - - -# TEST 1: Make sure that top-level targets that depend on targets that -# previously failed to build, aren't attempted. Regression for PR/1634. - -$makefile2 = &get_tmpfile; - -open(MAKEFILE, "> $makefile2"); -print MAKEFILE <<'EOF'; -.SUFFIXES: - -all: exe1 exe2; @echo making $@ - -exe1 exe2: lib; @echo cp $^ $@ - -lib: foo.o; @echo cp $^ $@ - -foo.o: ; exit 1 -EOF - -close(MAKEFILE); - -&run_make_with_options($makefile2, "-k", &get_logfile, $error_code); - -$answer = "exit 1 -$make_name: *** [foo.o] Error 1 -$make_name: Target `all' not remade because of errors.\n"; - -&compare_output($answer, &get_logfile(1)); - -# TEST -- make sure we keep the error code if we can't create an included -# makefile. - -run_make_test('all: ; @echo hi -include ifile -ifile: no-such-file; @false -', - '-k', - "#MAKEFILE#:2: ifile: No such file or directory -#MAKE#: *** No rule to make target `no-such-file', needed by `ifile'. -#MAKE#: Failed to remake makefile `ifile'. -hi\n", - 512); - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-l b/make/make-3.81/tests/scripts/options/dash-l deleted file mode 100644 index 58216f9..0000000 --- a/make/make-3.81/tests/scripts/options/dash-l +++ /dev/null @@ -1,55 +0,0 @@ -# -*-perl-*- -# Date: Tue, 11 Aug 1992 09:34:26 -0400 -# From: pds@lemming.webo.dg.com (Paul D. Smith) - -$description = "Test load balancing (-l) option."; - -$details = "\ -This test creates a makefile where all depends on three rules -which contain the same body. Each rule checks for the existence -of a temporary file; if it exists an error is generated. If it -doesn't exist then it is created, the rule sleeps, then deletes -the temp file again. Thus if any of the rules are run in -parallel the test will fail. When make is called in this test, -it is given the -l option with a value of 0.0001. This ensures -that the load will be above this number and make will therefore -decide that it cannot run more than one job even though -j 4 was -also specified on the command line."; - -open(MAKEFILE,"> $makefile"); - -# The Contents of the MAKEFILE ... - -print MAKEFILE <<'EOF'; -SHELL = /bin/sh - -define test -if [ ! -f test-file ]; then \ - echo >> test-file; sleep 2; rm -f test-file; \ -else \ - echo $@ FAILED; \ -fi -endef - -all : ONE TWO THREE -ONE : ; @$(test) -TWO : ; @$(test) -THREE : ; @$(test) -EOF - - -# END of Contents of MAKEFILE - -close(MAKEFILE); - -$mkoptions = "-l 0.0001"; -$mkoptions .= " -j 4" if ($parallel_jobs); - -&run_make_with_options($makefile, $mkoptions, &get_logfile); - -$slurp = &read_file_into_string (&get_logfile(1)); -if ($slurp !~ /cannot enforce load limit/) { - &compare_output("", &get_logfile(1)); -} - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-n b/make/make-3.81/tests/scripts/options/dash-n deleted file mode 100644 index de19f42..0000000 --- a/make/make-3.81/tests/scripts/options/dash-n +++ /dev/null @@ -1,70 +0,0 @@ -# -*-perl-*- -$description = "Test the -n option.\n"; - -$details = "Try various uses of -n and ensure they all give the correct results.\n"; - -open(MAKEFILE, "> $makefile"); - -# The Contents of the MAKEFILE ... - -print MAKEFILE <<'EOMAKE'; - -final: intermediate ; echo >> $@ -intermediate: orig ; echo >> $@ - -EOMAKE - -close(MAKEFILE); - -&touch('orig'); - -# TEST 0 - -&run_make_with_options($makefile, "", &get_logfile); -$answer = "echo >> intermediate\necho >> final\n"; -&compare_output($answer, &get_logfile(1)); - -# TEST 1 - -&run_make_with_options($makefile, "-Worig -n", &get_logfile); -$answer = "echo >> intermediate\necho >> final\n"; -&compare_output($answer, &get_logfile(1)); - -unlink('orig', 'intermediate', 'final'); - -# We consider the actual updated timestamp of targets with all -# recursive commands, even with -n. - -$makefile2 = &get_tmpfile; - -open(MAKEFILE, "> $makefile2"); - -print MAKEFILE <<'EOF'; -.SUFFIXES: -BAR = # nothing -FOO = +$(BAR) -a: b; echo > $@ -b: c; $(FOO) -EOF - -close(MAKEFILE); - -&utouch(-20, 'b'); -&utouch(-10, 'a'); -&touch('c'); - -# TEST 2 - -&run_make_with_options($makefile2, "", &get_logfile); -$answer = "$make_name: `a' is up to date.\n"; -&compare_output($answer, &get_logfile(1)); - -# TEST 3 - -&run_make_with_options($makefile2, "-n", &get_logfile); -$answer = "$make_name: `a' is up to date.\n"; -&compare_output($answer, &get_logfile(1)); - -unlink('a', 'b', 'c'); - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-q b/make/make-3.81/tests/scripts/options/dash-q deleted file mode 100644 index 56f04a1..0000000 --- a/make/make-3.81/tests/scripts/options/dash-q +++ /dev/null @@ -1,57 +0,0 @@ -# -*-perl-*- -$description = "Test the -q option.\n"; - -$details = "Try various uses of -q and ensure they all give the correct results.\n"; - -# TEST 0 - -run_make_test(' -one: -two: ; -three: ; : -four: ; $(.XY) -five: ; \ - $(.XY) -six: ; \ - $(.XY) - $(.XY) -seven: ; \ - $(.XY) - : foo - $(.XY) -', - '-q one', ''); - -# TEST 1 - -run_make_test(undef, '-q two', ''); - -# TEST 2 - -run_make_test(undef, '-q three', '', 256); - -# TEST 3 - -run_make_test(undef, '-q four', ''); - -# TEST 4 - -run_make_test(undef, '-q five', ''); - -# TEST 5 - -run_make_test(undef, '-q six', ''); - -# TEST 6 - -run_make_test(undef, '-q seven', '', 256); - -# TEST 7 : Savannah bug # 7144 - -run_make_test(' -one:: ; @echo one -one:: ; @echo two -', - '-q', '', 256); - -1; diff --git a/make/make-3.81/tests/scripts/options/dash-t b/make/make-3.81/tests/scripts/options/dash-t deleted file mode 100644 index ec27d7a..0000000 --- a/make/make-3.81/tests/scripts/options/dash-t +++ /dev/null @@ -1,58 +0,0 @@ -# -*-perl-*- - -$description = "Test the -t option.\n"; - -$details = "Look out for regressions of prior bugs related to -t.\n"; -# That means, nobody has even tried to make the tests below comprehensive - -# TEST 0 -# bug reported by Henning Makholm <henning@makholm.net> on 2001-11-03: -# make 3.79.1 touches only interm-[ab] but reports final-[a] as -# 'up to date' without touching them. -# The 'obvious' fix didn't work for double-colon rules, so pay special -# attention to them. - -open(MAKEFILE, "> $makefile"); -print MAKEFILE <<'EOMAKE'; -final-a: interm-a ; echo >> $@ -final-b: interm-b ; echo >> $@ -interm-a:: orig1-a ; echo >> $@ -interm-a:: orig2-a ; echo >> $@ -interm-b:: orig1-b ; echo >> $@ -interm-b:: orig2-b ; echo >> $@ -EOMAKE -close(MAKEFILE); - -&utouch(-30, 'orig1-a','orig2-b'); -&utouch(-20, 'interm-a','interm-b'); -&utouch(-10, 'final-a','final-b'); -&touch('orig2-a','orig1-b'); - -&run_make_with_options($makefile, "-t final-a final-b", &get_logfile); -$answer = "touch interm-a\ntouch final-a\ntouch interm-b\ntouch final-b\n"; -&compare_output($answer, &get_logfile(1)); - -unlink('orig1-a', 'orig2-a', 'interm-a', 'final-a'); -unlink('orig1-b', 'orig2-b', 'interm-b', 'final-b'); - -# TEST 1 -# -t should not touch files with no commands. - -$makefile2 = &get_tmpfile; - -open(MAKEFILE, "> $makefile2"); -print MAKEFILE <<'EOMAKE'; - -PHOOEY: xxx -xxx: ; @: - -EOMAKE -close(MAKEFILE); - -&run_make_with_options($makefile2, "-t", &get_logfile); -$answer = "touch xxx\n"; -&compare_output($answer, &get_logfile(1)); - -unlink('xxx'); - -1; diff --git a/make/make-3.81/tests/scripts/options/general b/make/make-3.81/tests/scripts/options/general deleted file mode 100644 index d35bb35..0000000 --- a/make/make-3.81/tests/scripts/options/general +++ /dev/null @@ -1,35 +0,0 @@ -# -*-perl-*- -$description = "Test generic option processing.\n"; - -open(MAKEFILE, "> $makefile"); - -# The Contents of the MAKEFILE ... - -print MAKEFILE "foo 1foo: ; \@echo \$\@\n"; - -close(MAKEFILE); - -# TEST 0 - -&run_make_with_options($makefile, "-j 1foo", &get_logfile); -if (!$parallel_jobs) { - $answer = "$make_name: Parallel jobs (-j) are not supported on this platform.\n$make_name: Resetting to single job (-j1) mode.\n1foo\n"; -} -else { - $answer = "1foo\n"; -} - -# TEST 1 - -# This test prints the usage string; I don't really know a good way to -# test it. I guess I could invoke make with a known-bad option to see -# what the usage looks like, then compare it to what I get here... :( - -# If I were always on UNIX, I could invoke it with 2>/dev/null, then -# just check the error code. - -&run_make_with_options($makefile, "-j1foo 2>/dev/null", &get_logfile, 512); -$answer = ""; -&compare_output($answer, &get_logfile(1)); - -1; diff --git a/make/make-3.81/tests/scripts/options/symlinks b/make/make-3.81/tests/scripts/options/symlinks deleted file mode 100644 index 40d2564..0000000 --- a/make/make-3.81/tests/scripts/options/symlinks +++ /dev/null @@ -1,68 +0,0 @@ -# -*-perl-*- - -$description = "Test the -L option."; - -$details = "Verify that symlink handling with and without -L works properly."; - -# Only run these tests if the system sypports symlinks - -# Apparently the Windows port of Perl reports that it does support symlinks -# (in that the symlink() function doesn't fail) but it really doesn't, so -# check for it explicitly. - -if ($port_type eq 'W32' || !( eval { symlink("",""); 1 })) { - # This test is N/A - -1; -} else { - - # Set up a symlink sym -> dep - # We'll make both dep and targ older than sym - $pwd =~ m%/([^/]+)$%; - $dirnm = $1; - &utouch(-10, 'dep'); - &utouch(-5, 'targ'); - symlink("../$dirnm/dep", 'sym'); - - # Without -L, nothing should happen - # With -L, it should update targ - run_make_test('targ: sym ; @echo make $@ from $<', '', - "#MAKE#: `targ' is up to date."); - run_make_test(undef, '-L', "make targ from sym"); - - # Now update dep; in all cases targ should be out of date. - &touch('dep'); - run_make_test(undef, '', "make targ from sym"); - run_make_test(undef, '-L', "make targ from sym"); - - # Now update targ; in all cases targ should be up to date. - &touch('targ'); - run_make_test(undef, '', "#MAKE#: `targ' is up to date."); - run_make_test(undef, '-L', "#MAKE#: `targ' is up to date."); - - # Add in a new link between sym and dep. Be sure it's newer than targ. - sleep(1); - rename('dep', 'dep1'); - symlink('dep1', 'dep'); - - # Without -L, nothing should happen - # With -L, it should update targ - run_make_test(undef, '', "#MAKE#: `targ' is up to date."); - run_make_test(undef, '-L', "make targ from sym"); - - rmfiles('targ', 'dep', 'sym', 'dep1'); - - # Check handling when symlinks point to non-existent files. Without -L we - # should get an error: with -L we should use the timestamp of the symlink. - - symlink("../$dirname/dep", 'sym'); - run_make_test('targ: sym ; @echo make $@ from $<', '', - "#MAKE#: *** No rule to make target `sym', needed by `targ'. Stop.", 512); - - run_make_test('targ: sym ; @echo make $@ from $<', '-L', - 'make targ from sym'); - - - rmfiles('targ', 'sym'); - - 1; -} diff --git a/make/make-3.81/tests/scripts/options/warn-undefined-variables b/make/make-3.81/tests/scripts/options/warn-undefined-variables deleted file mode 100644 index 34bfaea..0000000 --- a/make/make-3.81/tests/scripts/options/warn-undefined-variables +++ /dev/null @@ -1,25 +0,0 @@ -# -*-perl-*- - -$description = "Test the --warn-undefined-variables option."; - -$details = "Verify that warnings are printed for referencing undefined variables."; - -# Without --warn-undefined-variables, nothing should happen -run_make_test(' -EMPTY = -EREF = $(EMPTY) -UREF = $(UNDEFINED) - -SEREF := $(EREF) -SUREF := $(UREF) - -all: ; @echo ref $(EREF) $(UREF)', - '', 'ref'); - -# With --warn-undefined-variables, it should warn me -run_make_test(undef, '--warn-undefined-variables', - "#MAKEFILE#:7: warning: undefined variable `UNDEFINED' -#MAKEFILE#:9: warning: undefined variable `UNDEFINED' -ref"); - -1; |