ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/MakeInterface.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/MakeInterface.pm (file contents):
Revision 1.2 by sashby, Fri Dec 10 13:41:37 2004 UTC vs.
Revision 1.7 by muzaffar, Fri Jan 14 17:36:42 2011 UTC

# Line 29 | Line 29 | sub new()
29    {
30    my $proto=shift;
31    my $class=ref($proto) || $proto;
32 <  my $self={ GMAKECMD => '/usr/bin/gmake', CMDOPTS => ' -r' };
32 >  my $self={ GMAKECMD => '${SCRAM_GMAKE_PATH}gmake', CMDOPTS => ' -r' };
33    bless $self,$class;
34    $|=1;
35  
# Line 49 | Line 49 | sub new()
49       (
50        "make"        => sub { }, # dummy so we can use help opt just for MakeInterface
51        "s"           => sub { $self->{CMDOPTS}.=" -s" },
52 <      "j=s"         => sub { $self->{CMDOPTS}.=" -j ".$_[1] },
52 >      "j=i"         => sub { $self->{CMDOPTS}.=" -j ".$_[1] },
53        "d"           => sub { $self->{CMDOPTS}.=" -d" },
54        "k"           => sub { $self->{CMDOPTS}.=" -k" },
55        "printdir"    => sub { $self->{CMDOPTS}.=" -w" },
# Line 57 | Line 57 | sub new()
57        "printdb"     => sub { $self->{CMDOPTS}.=" -p" }
58        );
59    
60 <  Getopt::Long::config qw(default no_ignore_case require_order);
60 >  Getopt::Long::config qw(default no_ignore_case require_order bundling);
61    
62    if (! Getopt::Long::GetOptions(\%opts, %options))
63       {
64       print "SCRAM Warning: Ignoring unknown option.","\n";
65 +     exit(1);
66       }
67    
68    return $self;
# Line 73 | Line 74 | sub exec()
74     my ($makefile)=@_;
75     my $PID;
76     my $makecmd=$self->{GMAKECMD}.$self->{CMDOPTS}." -f ".$makefile." ".join(" ",@ARGV);
76  
77   print "SCRAM MakeInterface::exec(): going to exec \"",$makecmd,"\"\n",if ($ENV{SCRAM_DEBUG});
77  
78     # Try without forking:
79 <   exec "$makecmd" || die "SCRAM MakeInterface::exec(): Unable to exec()...$!","\n";
79 >   exec("$makecmd") || die "SCRAM MakeInterface::exec(): Unable to run gmake ...$!","\n";
80     }
81  
82   1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines