3 $description = "The following test creates a makefile to test the
4 simple functionality of make. It mimics the
5 rebuilding of a product with dependencies.
6 It also tests the simple definition of VPATH.";
8 open(MAKEFILE,"> $makefile");
12 edit: main.o kbd.o commands.o display.o \\
14 \t\@echo cc -o edit main.o kbd.o commands.o display.o \\
16 main.o : main.c defs.h
18 kbd.o : kbd.c defs.h command.h
20 commands.o : command.c defs.h command.h
21 \t\@echo cc -c commands.c
22 display.o : display.c defs.h buffer.h
23 \t\@echo cc -c display.c
24 insert.o : insert.c defs.h buffer.h
25 \t\@echo cc -c insert.c
31 @files_to_touch = ("$workdir${pathsep}main.c","$workdir${pathsep}defs.h",
32 "$workdir${pathsep}kbd.c","$workdir${pathsep}command.h",
33 "$workdir${pathsep}commands.c","$workdir${pathsep}display.c",
34 "$workdir${pathsep}buffer.h","$workdir${pathsep}insert.c",
35 "$workdir${pathsep}command.c");
37 &touch(@files_to_touch);
39 &run_make_with_options($makefile,"",&get_logfile);
41 # Create the answer to what should be produced by this Makefile
42 $answer = "cc -c main.c\ncc -c kbd.c\ncc -c commands.c\ncc -c display.c
43 cc -c insert.c\ncc -o edit main.o kbd.o commands.o display.o insert.o\n";
47 if (&compare_output($answer,&get_logfile(1))) {
48 unlink @files_to_touch;