a new slprintf() function. This one is totally portable but a bit of a
[Samba.git] / packaging / SGI / makefile.pl
blobd621097a2273ee96f5128fedc92ab4e8f63a67ff
1 #!/usr/bin/perl
3 # This perl script creates the SGI specific Makefile.
4 # The BASEDIR is set to /usr/samba, MANDIR is set to /usr/share/man, and
5 # the lines are uncommented for the requested OS version. If no version
6 # is specified, IRIX 6 is used.
8 if (!@ARGV) {
9 $OSver = "6";
11 else {
12 $OSver = $ARGV[0];
15 open(MAKEIN,"../../source/Makefile") || die "Unable to open source Makefile\n";
16 open(MAKEOUT,">Makefile") || die "Unable to open Makefile for output\n";
17 while (<MAKEIN>) {
18 if (/^BASEDIR =/) {
19 print MAKEOUT "BASEDIR = /usr/samba\n";
21 elsif (/^MANDIR =/) {
22 print MAKEOUT "MANDIR = /usr/share/man\n";
24 elsif (/^# FOR SGI IRIX $OSver/) {
25 print MAKEOUT;
26 while (<MAKEIN>) {
27 last if ($_ eq "\n");
28 if (/^# (FLAGSM|LIBSM|FLAGS1)/) {
29 s/^# //;
31 print MAKEOUT;
33 print MAKEOUT;
35 else {
36 print MAKEOUT;