# $1 target to compile
# $2 to die, or not to die, based on contents
-function make_target ()
+make_target ()
{
if [[ -z "$1" ]]; then
die "Programmer error, no target provided for make"
make_rpm ()
{
+ run_configure_if_required
make_target 'rpm'
}
echo "\`$@' $ARGS"
fi
- $@ $ARGS
+ eval $@ $ARGS
}
parse_command_line_options ()
if [[ -z "$MAKE" ]]; then
if command_exists gmake; then
MAKE=`type -p gmake`
+ else
+ if command_exists make; then
+ MAKE=`type -p make`
+ fi
fi
-
- if command_exists make; then
- MAKE=`type -p make`
+
+ if $DEBUG; then
+ MAKE="$MAKE --warn-undefined-variables"
fi
fi
;;
'configure')
;;
+ 'rpm')
+ ;;
'snapshot')
;;
'valgrind')
'snapshot')
make_for_snapshot
;;
+ 'rpm')
+ make_rpm
+ ;;
'valgrind')
make_valgrind
;;