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.4 by muzaffar, Tue Nov 6 14:13:49 2007 UTC vs.
Revision 1.8 by muzaffar, Tue Oct 18 14:59:26 2011 UTC

# Line 3 | Line 3
3   #____________________________________________________________________
4   #  
5   # Author: Shaun Ashby <Shaun.Ashby@cern.ch>
6 # Update: 2004-06-22 14:49:43+0200
7 # Revision: $Id$
8 #
6   # Copyright: 2004 (C) Shaun Ashby
7   #
8   #--------------------------------------------------------------------
# Line 29 | Line 26 | sub new()
26    {
27    my $proto=shift;
28    my $class=ref($proto) || $proto;
29 <  my $self={ GMAKECMD => 'gmake', CMDOPTS => ' -r' };
29 >  my $self={ GMAKECMD => '${SCRAM_GMAKE_PATH}gmake', CMDOPTS => ' -r' };
30    bless $self,$class;
31    $|=1;
32  
# Line 49 | Line 46 | sub new()
46       (
47        "make"        => sub { }, # dummy so we can use help opt just for MakeInterface
48        "s"           => sub { $self->{CMDOPTS}.=" -s" },
49 <      "j=s"         => sub { $self->{CMDOPTS}.=" -j ".$_[1] },
49 >      "j=i"         => sub { $self->{CMDOPTS}.=" -j ".$_[1] },
50        "d"           => sub { $self->{CMDOPTS}.=" -d" },
51        "k"           => sub { $self->{CMDOPTS}.=" -k" },
52        "printdir"    => sub { $self->{CMDOPTS}.=" -w" },
# Line 57 | Line 54 | sub new()
54        "printdb"     => sub { $self->{CMDOPTS}.=" -p" }
55        );
56    
57 <  Getopt::Long::config qw(default no_ignore_case require_order);
57 >  Getopt::Long::config qw(default no_ignore_case require_order bundling);
58    
59    if (! Getopt::Long::GetOptions(\%opts, %options))
60       {
61       print "SCRAM Warning: Ignoring unknown option.","\n";
62 +     exit(1);
63       }
64    
65    return $self;
# Line 73 | Line 71 | sub exec()
71     my ($makefile)=@_;
72     my $PID;
73     my $makecmd=$self->{GMAKECMD}.$self->{CMDOPTS}." -f ".$makefile." ".join(" ",@ARGV);
74 <  
77 <   print "SCRAM: Starting ",$self->{GMAKECMD}," ....\n";
74 >
75     # Try without forking:
76 <   exec "$makecmd" || die "SCRAM MakeInterface::exec(): Unable to exec()...$!","\n";
76 >   exec("$makecmd") || die "SCRAM MakeInterface::exec(): Unable to run gmake ...$!","\n";
77     }
78  
79   1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines