diff options
Diffstat (limited to 'packaging/SGI/makefile.pl')
-rwxr-xr-x | packaging/SGI/makefile.pl | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/packaging/SGI/makefile.pl b/packaging/SGI/makefile.pl index 0857ecd909..544fb7e32d 100755 --- a/packaging/SGI/makefile.pl +++ b/packaging/SGI/makefile.pl @@ -1,24 +1,38 @@ #!/usr/bin/perl -while (<>) { +# 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"); +open(MAKEOUT,">Makefile"); +while (<MAKEIN>) { if (/^BASEDIR =/) { - print "BASEDIR = /usr/samba\n"; + print MAKEOUT "BASEDIR = /usr/samba\n"; } elsif (/^MANDIR =/) { - print "MANDIR = /usr/share/man\n"; + print MAKEOUT "MANDIR = /usr/share/man\n"; } - elsif (/^# FOR SGI IRIX 6/) { - print; - $a = <>; - print $a; - <>; - <>; - <>; - print "FLAGSM = -DSGI5 -DSHADOW_PWD -DHAVE_TIMEZONE -DFAST_SHARE_MODES\n"; - print "LIBSM =\n"; - print "FLAGS1 = -O -n32 -g3 -OPT:fold_arith_limit=1256\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; + print MAKEOUT; } } |