gitarre
[projects.git] / tools / make / mconfigure
index e091ca6..0d053b1 100755 (executable)
@@ -3,7 +3,8 @@ set -e
 
 function echo_usage {
        echo "usage: mconfigure [options] <package>"
-       ./configure -I
+       echo "  -o: old style build (not recommended"
+       ./configure -h
 }
 
 function create_conf {
@@ -45,9 +46,11 @@ configure=0
 configure_args="-i debian/tmp"
 while [ $OPTIND -le "$#" ]
 do
-       if getopts "c" opt
+       if getopts "o" opt
        then
                case $opt in
+                       o) old_build=1
+                               ;;
                        \?) $confirure_args="$configure_ars -$OPTARG"
                                if [ $OPTARG="a" -o $OPTARG="C" -o $OPTARG="i" -o $OPTARG="v" ]
                                then
@@ -104,6 +107,11 @@ fi
 
 # perform configure
 . debian/$paket.conf
+if [ -n $old_build ]
+then
+       rm debian/$paket.conf
+fi
+
 if [ "$compile_type" != "NONE" ]
 then
        configure_args="$configure_args -b"
@@ -116,6 +124,7 @@ then
                echo "compile_type required in $paket.conf"
                exit 51
        fi
+       configure_args="$configure_args -c $compile_type"
 fi
 if [ "$target_type" == "FILE" ]
 then