~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/3rdparty/qmake/tests/scripts/misc/general1

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#                                                                    -*-perl-*-
 
2
 
 
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.";
 
7
 
 
8
open(MAKEFILE,"> $makefile");
 
9
 
 
10
print MAKEFILE <<EOF;
 
11
VPATH = $workdir
 
12
edit:  main.o kbd.o commands.o display.o \\
 
13
       insert.o
 
14
\t\@echo cc -o edit main.o kbd.o commands.o display.o \\
 
15
                  insert.o
 
16
main.o : main.c defs.h
 
17
\t\@echo cc -c main.c
 
18
kbd.o : kbd.c defs.h command.h
 
19
\t\@echo cc -c kbd.c
 
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
 
26
EOF
 
27
 
 
28
close(MAKEFILE);
 
29
 
 
30
 
 
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");
 
36
 
 
37
&touch(@files_to_touch);
 
38
 
 
39
&run_make_with_options($makefile,"",&get_logfile);
 
40
 
 
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";
 
44
 
 
45
# COMPARE RESULTS
 
46
 
 
47
if (&compare_output($answer,&get_logfile(1))) {
 
48
  unlink @files_to_touch;
 
49
}
 
50
 
 
51
1;