File: rebuild

package info (click to toggle)
perl-tk 1%3A804.029-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 33,688 kB
  • ctags: 35,258
  • sloc: ansic: 349,527; perl: 51,850; sh: 17,937; makefile: 5,729; asm: 3,565; ada: 1,681; pascal: 1,089; cpp: 1,006; yacc: 883; cs: 879
file content (33 lines) | stat: -rwxr-xr-x 675 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/local/bin/new/perl -w
open(STDERR,">&STDOUT") || die "Cannot redirect STDERR";
$| = 1;
use Cwd;
my $host = `uname -n`;
chomp($host);
my $cwd = getcwd();
print "$host in $cwd executing $0\n";
print $ENV{'PATH'},"\n";
#System("make",'-f','Makefile.old',"clean") if -f "Makefile.old";
#System("make","clean") if -f "Makefile";
System("cleanup");
System("$^X","Makefile.PL");
System("time","make","parallel");

sub System
{
 print join(' ',@_),"\n";
 my $pid = fork;
 if ($pid)
  {
   local %SIG;
   $SIG{INT} = sub { warn "\nInterrupt"; kill 9,$pid; exit 1 };
   wait;
   die "Error $?" if ($?);
  }
 else
  {
   exec(@_) || die "Cannot exec".join(' ',@_).":$!";
  }
}