test 121 creates unlinked and still referenced inodes, it doesn't clean up afterwards.
[xfstests-dev.git] / make_irix
1 #!/bin/sh
2 #
3 # Copyright (c) 2004 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # Do a build using the IRIX TOOLROOT
6 # Use "-f" to force a configure.
7 #
8
9 error=false
10
11 # Do initial checks
12
13 # check have root/toolroot set
14 if [ -z "$TOOLROOT" ]; then
15         echo "TOOLROOT needs to be set to a populated IRIX toolroot"
16         error=true
17 fi 
18 if [ -z "$ROOT" ]; then
19         echo "ROOT needs to be set to a populated IRIX root"
20         error=true
21 fi 
22
23 # check we have c compiler license
24 if ! grep -iq '^feature cc' /var/flexlm/license.dat; then
25         echo "Unable to find cc license for IRIX"
26         echo "Get license: http://www.csd.sgi.com/prod/software/swl/keyrequest.html"
27         error=true
28 fi
29
30 # check we have dev.sw.lib installed
31 # needed by ld32 even though we have $ROOT
32 if versions dev.sw.lib | grep -q dev.sw.lib; then
33         :
34 else
35         echo "dev.sw.lib is not installed"
36         echo "Install from irix-6.5-development-libraries-1/dist"
37         error=true
38 fi
39
40 # any check failures then exit out
41 $error && exit 1
42
43 # root/toolroot paths
44 fw_bin=$TOOLROOT/usr/freeware/bin
45 fw_tools=$TOOLROOT/usr/fw_tools
46 fw_share=$ROOT/usr/freeware/share
47 irix_bin=$TOOLROOT/usr/bin
48
49 # env vars
50 export AC_MACRODIR=$fw_share/autoconf
51 export M4=$irix_bin/gnum4
52 export CC=$irix_bin/cc
53 export LIBTOOL=$fw_bin/libtool
54 export MAKE=$fw_tools/gmake
55 export AWK=$irix_bin/nawk
56
57 # check all tools/files are in root/toolroot that we need
58 FILES="$AC_MACRODIR $M4 $CC $LIBTOOL $MAKE $fw_bin/aclocal $fw_bin/autoheader $fw_bin/autoconf"
59 for f in $FILES; do
60         if [ ! -e $f ]; then
61                 echo "file $f not found in ROOT/TOOLROOT"
62                 error=true
63         fi
64 done
65 $error && exit 1
66
67 # force a full configure
68 if [ $# -eq 1 ]; then
69         if [ $1 = "-f" ]; then
70                 rm -f config.cache configure include/builddefs
71                 shift
72         fi
73 fi
74
75 # --- do all the configure stuff using the toolroot paths ---
76
77 # aclocal.m4 is actually checked in - probably won't recreate it often
78 if [ ! -e aclocal.m4 ]; then
79         set -x
80         $fw_bin/aclocal --acdir=m4 --output=aclocal.m4
81         set -
82 fi
83
84 if [ ! -e ./configure ]; then
85         set -x
86         $fw_bin/autoheader
87         $fw_bin/autoconf
88         set -
89 fi
90
91 if [ ! -e include/builddefs ]; then
92         set -x
93         ./configure
94         set -
95 fi
96
97 # Now call gmake with any args we were given
98 set -x
99 $MAKE $@
100 set -