3 # This file goes through all the necessary steps to build a release package.
5 # mkrelease.sh [5] [clean] [targets ....]
7 # You may specify 5 to build for IRIX 5.3
9 # You can specify clean to do a make clean before building. Make clean
10 # will also run configure and generate the required Makefile.
12 # You can specify which targets to build. If targets are specified, the
13 # specified targets will be built but inst packages will not be generated.
19 if [ ! -f ../../source/Makefile ]; then
23 if [ "$1" = "clean" ]; then
26 elif [ "$1" = "5" ]; then
31 # check again in case they put the args in the wrong order
33 if [ "$1" = "clean" ]; then
36 elif [ "$1" = "5" ]; then
43 if [ "$doclean" = "clean" ]; then
45 if [ -f Makefile ]; then
49 rm -rf bins catman html codepages swat samba.idb samba.spec
52 # create the catman versions of the manual pages
54 if [ "$doclean" = "clean" ]; then
55 echo Making manual pages
58 if [ $errstat -ne 0 ]; then
59 echo "Error $errstat making manual pages\n";
65 if [ "$doclean" = "clean" ]; then
66 echo Create SGI specific Makefile
68 chmod +x configure.developer
70 chmod +x config.status
72 ./configure --prefix=/usr/samba --mandir=/usr/share/catman --with-smbwrapper
74 if [ $errstat -ne 0 ]; then
75 echo "Error $errstat creating Makefile\n";
85 make "CFLAGS=-O -g3" $*
87 if [ $errstat -ne 0 ]; then
88 echo "Error $errstat building sources\n";
95 # Don't generate packages if targets were specified
97 if [ "$1" != "" ]; then
101 # generate the packages
103 echo Generating Inst Packages
104 ./spec.pl # create the samba.spec file
106 if [ $errstat -ne 0 ]; then
107 echo "Error $errstat creating samba.spec\n";
111 ./idb.pl # create the samba.idb file
113 if [ $errstat -ne 0 ]; then
114 echo "Error $errstat creating samba.idb\n";
118 if [ ! -d bins ]; then
123 /usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all