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

« back to all changes in this revision

Viewing changes to source/3rdparty/qmake/tests/scripts/options/dash-k

  • 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
$description = "The following test creates a makefile to test the -k option.\n"
 
2
              ."Normally, make gives up immediately if an error happens \n"
 
3
              ."that make has not been told to ignore.  However, if the -k\n"
 
4
              ."option is specified, make continues to consider the other\n"
 
5
              ."dependencies of the pending targets.";
 
6
 
 
7
$details = "The makefile created in this test is a simulation of building \n"
 
8
          ."a small product.  However, the trick to this one is that one \n"
 
9
          ."of the dependencies of the main target does not exist.  \n"
 
10
          ."Without the -k option, make would fail immediately and not \n"
 
11
          ."build any part of the target.  What we are looking for here, \n"
 
12
          ."is that make builds the rest of the dependencies even though \n"
 
13
          ."it knows that at the end it will fail to rebuild the main target.";
 
14
 
 
15
open(MAKEFILE,"> $makefile");
 
16
 
 
17
# The Contents of the MAKEFILE ...
 
18
 
 
19
print MAKEFILE "VPATH = $workdir\n";
 
20
print MAKEFILE "edit:  main.o kbd.o commands.o display.o \n";
 
21
print MAKEFILE "\t\@echo cc -o edit main.o kbd.o commands.o display.o \n";
 
22
 
 
23
print MAKEFILE "main.o : main.c defs.h\n";
 
24
print MAKEFILE "\t\@echo cc -c main.c\n";
 
25
 
 
26
print MAKEFILE "kbd.o : kbd.c defs.h command.h\n";
 
27
print MAKEFILE "\t\@echo cc -c kbd.c\n";
 
28
 
 
29
print MAKEFILE "commands.o : command.c defs.h command.h\n";
 
30
print MAKEFILE "\t\@echo cc -c commands.c\n";
 
31
 
 
32
print MAKEFILE "display.o : display.c defs.h buffer.h\n";
 
33
print MAKEFILE "\t\@echo cc -c display.c\n";
 
34
 
 
35
# END of Contents of MAKEFILE
 
36
 
 
37
close(MAKEFILE);
 
38
 
 
39
 
 
40
@files_to_touch = ("$workdir${pathsep}main.c","$workdir${pathsep}defs.h",
 
41
               "$workdir${pathsep}command.h",
 
42
               "$workdir${pathsep}commands.c","$workdir${pathsep}display.c",
 
43
               "$workdir${pathsep}buffer.h",
 
44
               "$workdir${pathsep}command.c");
 
45
 
 
46
&touch(@files_to_touch);
 
47
 
 
48
if ($vos)
 
49
{
 
50
   $error_code = 3307;
 
51
}
 
52
else
 
53
{
 
54
   $error_code = 512;
 
55
}
 
56
 
 
57
&run_make_with_options($makefile,"-k",&get_logfile,$error_code);
 
58
 
 
59
# Create the answer to what should be produced by this Makefile
 
60
$answer = "cc -c main.c\n"
 
61
         ."$make_name: *** No rule to make target `kbd.c', needed by `kbd.o'.\n"
 
62
         ."cc -c commands.c\n"
 
63
         ."cc -c display.c\n"
 
64
         ."$make_name: Target `edit' not remade because of errors.\n";
 
65
 
 
66
# COMPARE RESULTS
 
67
 
 
68
if (&compare_output($answer,&get_logfile(1)))
 
69
{
 
70
  unlink @files_to_touch;
 
71
}
 
72
 
 
73
1;