Add a repeated-growfs-while-fsstressing test to catch deadlocks.
[xfstests-dev.git] / make_irix
1 #!/bin/sh
2 #
3 # Do a build using the IRIX TOOLROOT
4 # Use "-f" to force a configure.
5 #
6 # Copyright (c) 2004 Silicon Graphics, Inc.  All Rights Reserved.
7
8 # This program is free software; you can redistribute it and/or modify it
9 # under the terms of version 2 of the GNU General Public License as
10 # published by the Free Software Foundation.
11
12 # This program is distributed in the hope that it would be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
16 # Further, this software is distributed without any warranty that it is
17 # free of the rightful claim of any third person regarding infringement
18 # or the like.  Any license provided herein, whether implied or
19 # otherwise, applies only to this software file.  Patent licenses, if
20 # any, provided herein do not apply to combinations of this program with
21 # other software, or any other product whatsoever.
22
23 # You should have received a copy of the GNU General Public License along
24 # with this program; if not, write the Free Software Foundation, Inc., 59
25 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
26
27 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
28 # Mountain View, CA  94043, or:
29
30 # http://www.sgi.com 
31
32 # For further information regarding this notice, see: 
33
34 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
35 #
36 #
37
38 # check have root/toolroot set
39 error=false
40 if [ -z "$TOOLROOT" ]; then
41         echo "TOOLROOT needs to be set to a populated IRIX toolroot"
42         error=true
43 fi 
44 if [ -z "$ROOT" ]; then
45         echo "ROOT needs to be set to a populated IRIX root"
46         error=true
47 fi 
48 $error && exit 1
49
50 # root/toolroot paths
51 fw_bin=$TOOLROOT/usr/freeware/bin
52 fw_tools=$TOOLROOT/usr/fw_tools
53 fw_share=$ROOT/usr/freeware/share
54 irix_bin=$TOOLROOT/usr/bin
55
56 # env vars
57 export AC_MACRODIR=$fw_share/autoconf
58 export M4=$irix_bin/gnum4
59 export CC=$irix_bin/cc
60 export LIBTOOL=$fw_bin/libtool
61 export MAKE=$fw_tools/gmake
62 export AWK=$irix_bin/nawk
63
64 # check all tools/files are in root/toolroot that we need
65 FILES="$AC_MACRODIR $M4 $CC $LIBTOOL $MAKE $fw_bin/aclocal $fw_bin/autoheader $fw_bin/autoconf"
66 for f in $FILES; do
67         if [ ! -e $f ]; then
68                 echo "file $f not found in ROOT/TOOLROOT"
69                 error=true
70         fi
71 done
72 $error && exit 1
73
74 # force a full configure
75 if [ $# -eq 1 ]; then
76         if [ $1 = "-f" ]; then
77                 rm -f configure include/builddefs
78                 shift
79         fi
80 fi
81
82 # --- do all the configure stuff using the toolroot paths ---
83
84 # aclocal.m4 is actually checked in - probably won't recreate it often
85 if [ ! -e aclocal.m4 ]; then
86         set -x
87         $fw_bin/aclocal --acdir=m4 --output=aclocal.m4
88         set -
89 fi
90
91 if [ ! -e ./configure ]; then
92         set -x
93         $fw_bin/autoheader
94         $fw_bin/autoconf
95         set -
96 fi
97
98 if [ ! -e include/builddefs ]; then
99         set -x
100         ./configure
101         set -
102 fi
103
104 # Now call gmake with any args we were given
105 set -x
106 $MAKE $@
107 set -