3 # author: Angus Salkeld (ahsalkeld@gmail.com)
6 # run this from the base directory of openais
13 MAKE_LOG
=/tmp
/openais-make-test.log
17 TEST
="[1] simple make"
18 rm -f $SRCDIR/make_o_path
25 if [ -f $SRCDIR/make_o_path
]
27 make $
(cat $SRCDIR/make_o_path
) clean
>$MAKE_LOG 2>&1
30 if [ -n "$BUILD_DIR" ]
32 pushd $BUILD_DIR >/dev
/null
33 make -f $SRCDIR/Makefile clean
>$MAKE_LOG 2>&1
37 make clean
>$MAKE_LOG 2>&1
47 rm -f $SRCDIR/make_o_path
48 TEST
="[2] make from exec dir"
49 pushd $SRCDIR/exec >/dev
/null
58 local BUILD_DIR
=/tmp
/openais-make-test
59 echo "O=$BUILD_DIR" > $SRCDIR/make_o_path
61 TEST
="[3] make objects separately from the source"
63 make O
=$BUILD_DIR >$MAKE_LOG 2>&1
70 BUILD_DIR
=/tmp
/openais-make-test
71 rm -f $SRCDIR/make_o_path
73 TEST
="[4] make -f SRCDIR/Makefile from the builddir"
78 pushd $BUILD_DIR >/dev
/null
79 make -f $SRCDIR/Makefile
>$MAKE_LOG 2>&1
89 TESTS_TO_RUN
=$ALL_TESTS
92 for t
in $TESTS_TO_RUN
97 echo "$0 $TEST [failed]."
101 echo "$0 $TEST [passed]."
106 echo "$0 $TEST [failed to clean]."
110 echo "$0 $TEST [cleaned]."
114 echo $0 all
make tests passed
!