diff options
Diffstat (limited to 'make/make-3.81/tests/scripts/misc')
-rw-r--r-- | make/make-3.81/tests/scripts/misc/close_stdout | 9 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/misc/general1 | 51 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/misc/general2 | 50 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/misc/general3 | 313 | ||||
-rw-r--r-- | make/make-3.81/tests/scripts/misc/general4 | 83 |
5 files changed, 0 insertions, 506 deletions
diff --git a/make/make-3.81/tests/scripts/misc/close_stdout b/make/make-3.81/tests/scripts/misc/close_stdout deleted file mode 100644 index 688942e..0000000 --- a/make/make-3.81/tests/scripts/misc/close_stdout +++ /dev/null @@ -1,9 +0,0 @@ -# -*-perl-*- - -$description = "Make sure make exits with an error if stdout is full."; - -if (-e '/dev/full') { - run_make_test('', '-v > /dev/full', '#MAKE#: write error', 256); -} - -1; diff --git a/make/make-3.81/tests/scripts/misc/general1 b/make/make-3.81/tests/scripts/misc/general1 deleted file mode 100644 index 352fc6a..0000000 --- a/make/make-3.81/tests/scripts/misc/general1 +++ /dev/null @@ -1,51 +0,0 @@ -# -*-perl-*- - -$description = "The following test creates a makefile to test the -simple functionality of make. It mimics the -rebuilding of a product with dependencies. -It also tests the simple definition of VPATH."; - -open(MAKEFILE,"> $makefile"); - -print MAKEFILE <<EOF; -VPATH = $workdir -edit: main.o kbd.o commands.o display.o \\ - insert.o -\t\@echo cc -o edit main.o kbd.o commands.o display.o \\ - insert.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 -insert.o : insert.c defs.h buffer.h -\t\@echo cc -c insert.c -EOF - -close(MAKEFILE); - - -@files_to_touch = ("$workdir${pathsep}main.c","$workdir${pathsep}defs.h", - "$workdir${pathsep}kbd.c","$workdir${pathsep}command.h", - "$workdir${pathsep}commands.c","$workdir${pathsep}display.c", - "$workdir${pathsep}buffer.h","$workdir${pathsep}insert.c", - "$workdir${pathsep}command.c"); - -&touch(@files_to_touch); - -&run_make_with_options($makefile,"",&get_logfile); - -# Create the answer to what should be produced by this Makefile -$answer = "cc -c main.c\ncc -c kbd.c\ncc -c commands.c\ncc -c display.c -cc -c insert.c\ncc -o edit main.o kbd.o commands.o display.o insert.o\n"; - -# COMPARE RESULTS - -if (&compare_output($answer,&get_logfile(1))) { - unlink @files_to_touch; -} - -1; diff --git a/make/make-3.81/tests/scripts/misc/general2 b/make/make-3.81/tests/scripts/misc/general2 deleted file mode 100644 index fb5c3aa..0000000 --- a/make/make-3.81/tests/scripts/misc/general2 +++ /dev/null @@ -1,50 +0,0 @@ -# -*-perl-*- - -$description = "The following test creates a makefile to test the -simple functionality of make. It is the same as -general_test1 except that this one tests the -definition of a variable to hold the object filenames."; - -open(MAKEFILE,"> $makefile"); - -# The contents of the Makefile ... - -print MAKEFILE <<EOF; -VPATH = $workdir -objects = main.o kbd.o commands.o display.o insert.o -edit: \$(objects) -\t\@echo cc -o edit \$(objects) -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 -insert.o : insert.c defs.h buffer.h -\t\@echo cc -c insert.c -EOF - -close(MAKEFILE); - - -@files_to_touch = ("$workdir${pathsep}main.c","$workdir${pathsep}defs.h", - "$workdir${pathsep}kbd.c","$workdir${pathsep}command.h", - "$workdir${pathsep}commands.c","$workdir${pathsep}display.c", - "$workdir${pathsep}buffer.h","$workdir${pathsep}insert.c", - "$workdir${pathsep}command.c"); - -&touch(@files_to_touch); - -&run_make_with_options($makefile,"",&get_logfile); - -# Create the answer to what should be produced by this Makefile -$answer = "cc -c main.c\ncc -c kbd.c\ncc -c commands.c\ncc -c display.c -cc -c insert.c\ncc -o edit main.o kbd.o commands.o display.o insert.o\n"; - -if (&compare_output($answer,&get_logfile(1))) { - unlink @files_to_touch; -} - -1; diff --git a/make/make-3.81/tests/scripts/misc/general3 b/make/make-3.81/tests/scripts/misc/general3 deleted file mode 100644 index b3142c2..0000000 --- a/make/make-3.81/tests/scripts/misc/general3 +++ /dev/null @@ -1,313 +0,0 @@ -# -*-perl-*- - -$description = "\ -This tests random features of the parser that need to be supported, and -which have either broken at some point in the past or seem likely to -break."; - -run_make_test(" -# We want to allow both empty commands _and_ commands that resolve to empty. -EMPTY = - -.PHONY: all a1 a2 a3 a4 -all: a1 a2 a3 a4 - -a1:; -a2: -\t -a3:;\$(EMPTY) -a4: -\t\$(EMPTY) - -\# Non-empty lines that expand to nothing should also be ignored. -STR = \# Some spaces -TAB = \t \# A TAB and some spaces - -\$(STR) - -\$(STR) \$(TAB)", - '', "#MAKE#: Nothing to be done for `all'."); - -# TEST 2 - -# Make sure files without trailing newlines are handled properly. -# Have to use the old style invocation to test this. - -$makefile2 = &get_tmpfile; - -open(MAKEFILE, "> $makefile2"); -print MAKEFILE "all:;\@echo FOO = \$(FOO)\nFOO = foo"; -close(MAKEFILE); - -&run_make_with_options($makefile2,"",&get_logfile); -$answer = "FOO = foo\n"; -&compare_output($answer,&get_logfile(1)); - -# TEST 3 - -# Check semicolons in variable references - -run_make_test(' -$(if true,$(info true; true)) -all: ; @: -', - '', 'true; true'); - -# TEST 4 - -# Check that backslashes in command scripts are handled according to POSIX. -# Checks Savannah bug # 1332. - -# Test the fastpath / no quotes -run_make_test(' -all: - @echo foo\ -bar - @echo foo\ - bar - @echo foo\ - bar - @echo foo\ - bar - @echo foo \ -bar - @echo foo \ - bar - @echo foo \ - bar - @echo foo \ - bar -', - '', 'foobar -foobar -foo bar -foo bar -foo bar -foo bar -foo bar -foo bar'); - -# Test the fastpath / single quotes -run_make_test(" -all: - \@echo 'foo\\ -bar' - \@echo 'foo\\ - bar' - \@echo 'foo\\ - bar' - \@echo 'foo\\ - bar' - \@echo 'foo \\ -bar' - \@echo 'foo \\ - bar' - \@echo 'foo \\ - bar' - \@echo 'foo \\ - bar' -", - '', 'foo\ -bar -foo\ -bar -foo\ - bar -foo\ - bar -foo \ -bar -foo \ -bar -foo \ - bar -foo \ - bar'); - -# Test the fastpath / double quotes -run_make_test(' -all: - @echo "foo\ -bar" - @echo "foo\ - bar" - @echo "foo\ - bar" - @echo "foo\ - bar" - @echo "foo \ -bar" - @echo "foo \ - bar" - @echo "foo \ - bar" - @echo "foo \ - bar" -', - '', 'foobar -foobar -foo bar -foo bar -foo bar -foo bar -foo bar -foo bar'); - -# Test the slow path / no quotes -run_make_test(' -all: - @echo hi; echo foo\ -bar - @echo hi; echo foo\ - bar - @echo hi; echo foo\ - bar - @echo hi; echo foo\ - bar - @echo hi; echo foo \ -bar - @echo hi; echo foo \ - bar - @echo hi; echo foo \ - bar - @echo hi; echo foo \ - bar -', - '', 'hi -foobar -hi -foobar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar'); - -# Test the slow path / no quotes. This time we put the slow path -# determination _after_ the backslash-newline handling. -run_make_test(' -all: - @echo foo\ -bar; echo hi - @echo foo\ - bar; echo hi - @echo foo\ - bar; echo hi - @echo foo\ - bar; echo hi - @echo foo \ -bar; echo hi - @echo foo \ - bar; echo hi - @echo foo \ - bar; echo hi - @echo foo \ - bar; echo hi -', - '', 'foobar -hi -foobar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar -hi'); - -# Test the slow path / single quotes -run_make_test(" -all: - \@echo hi; echo 'foo\\ -bar' - \@echo hi; echo 'foo\\ - bar' - \@echo hi; echo 'foo\\ - bar' - \@echo hi; echo 'foo\\ - bar' - \@echo hi; echo 'foo \\ -bar' - \@echo hi; echo 'foo \\ - bar' - \@echo hi; echo 'foo \\ - bar' - \@echo hi; echo 'foo \\ - bar' -", - '', 'hi -foo\ -bar -hi -foo\ -bar -hi -foo\ - bar -hi -foo\ - bar -hi -foo \ -bar -hi -foo \ -bar -hi -foo \ - bar -hi -foo \ - bar'); - -# Test the slow path / double quotes -run_make_test(' -all: - @echo hi; echo "foo\ -bar" - @echo hi; echo "foo\ - bar" - @echo hi; echo "foo\ - bar" - @echo hi; echo "foo\ - bar" - @echo hi; echo "foo \ -bar" - @echo hi; echo "foo \ - bar" - @echo hi; echo "foo \ - bar" - @echo hi; echo "foo \ - bar" -', - '', 'hi -foobar -hi -foobar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar -hi -foo bar'); - -1; diff --git a/make/make-3.81/tests/scripts/misc/general4 b/make/make-3.81/tests/scripts/misc/general4 deleted file mode 100644 index ccccf88..0000000 --- a/make/make-3.81/tests/scripts/misc/general4 +++ /dev/null @@ -1,83 +0,0 @@ -# -*-perl-*- - -$description = "\ -This tests random features of make's algorithms, often somewhat obscure, -which have either broken at some point in the past or seem likely to -break."; - -run_make_test(' -# Make sure that subdirectories built as prerequisites are actually handled -# properly. - -all: dir/subdir/file.a - -dir/subdir: ; @echo mkdir -p dir/subdir - -dir/subdir/file.b: dir/subdir ; @echo touch dir/subdir/file.b - -dir/subdir/%.a: dir/subdir/%.b ; @echo cp $< $@', - '', "mkdir -p dir/subdir\ntouch dir/subdir/file.b\ncp dir/subdir/file.b dir/subdir/file.a\n"); - -# Test implicit rules - -&touch('foo.c'); -run_make_test('foo: foo.o', - 'CC="@echo cc" OUTPUT_OPTION=', - 'cc -c foo.c -cc foo.o -o foo'); -unlink('foo.c'); - - -# Test other implicit rule searching - -&touch('bar'); -run_make_test(' -test.foo: -%.foo : baz ; @echo done $< -%.foo : bar ; @echo done $< -fox: baz -', - '', - 'done bar'); -unlink('bar'); - - -# Test implicit rules with '$' in the name (see se_implicit) - -run_make_test(q! -%.foo : baz$$bar ; @echo 'done $<' -%.foo : bar$$baz ; @echo 'done $<' -test.foo: -baz$$bar bar$$baz: ; @echo '$@' -!, - '', - "baz\$bar\ndone baz\$bar"); - - -# Test implicit rules with '$' in the name (see se_implicit) -# Use the '$' in the pattern. - -run_make_test(q! -%.foo : %$$bar ; @echo 'done $<' -test.foo: -test$$bar: ; @echo '$@' -!, - '', - "test\$bar\ndone test\$bar"); - -# Make sure that subdirectories built as prerequisites are actually handled -# properly... this time with '$' - -run_make_test(q! - -all: dir/subdir/file.$$a - -dir/subdir: ; @echo mkdir -p '$@' - -dir/subdir/file.$$b: dir/subdir ; @echo touch '$@' - -dir/subdir/%.$$a: dir/subdir/%.$$b ; @echo 'cp $< $@' -!, - '', "mkdir -p dir/subdir\ntouch dir/subdir/file.\$b\ncp dir/subdir/file.\$b dir/subdir/file.\$a\n"); - -1; |