1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00
samba-mirror/packaging/SGI/makefile.pl
Herb Lewis 365f1eadaa dded error checking to scripts
(This used to be commit b7e1265f106010e03d92575f4578162ec659994b)
1997-12-01 14:50:52 +00:00

39 lines
907 B
Perl
Executable File

#!/usr/bin/perl
# This perl script creates the SGI specific Makefile.
# The BASEDIR is set to /usr/samba, MANDIR is set to /usr/share/man, and
# the lines are uncommented for the requested OS version. If no version
# is specified, IRIX 6 is used.
if (!@ARGV) {
$OSver = "6";
}
else {
$OSver = $ARGV[0];
}
open(MAKEIN,"../../source/Makefile") || die "Unable to open source Makefile\n";
open(MAKEOUT,">Makefile") || die "Unable to open Makefile for output\n";
while (<MAKEIN>) {
if (/^BASEDIR =/) {
print MAKEOUT "BASEDIR = /usr/samba\n";
}
elsif (/^MANDIR =/) {
print MAKEOUT "MANDIR = /usr/share/man\n";
}
elsif (/^# FOR SGI IRIX $OSver/) {
print MAKEOUT;
$a = <MAKEIN>;
print MAKEOUT $a;
($a = <MAKEIN>) =~ s/^# //;
print MAKEOUT $a;
($a = <MAKEIN>) =~ s/^# //;
print MAKEOUT $a;
($a = <MAKEIN>) =~ s/^# //;
print MAKEOUT $a;
}
else {
print MAKEOUT;
}
}