X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=tools%2Fmake%2Fmconfigure;fp=tools%2Fmake%2Fmconfigure;h=4f0410ad4a62ac16e69c395de444beb9417ae183;hb=237602b9903d51a9b3de50e5ff9fed0289118be4;hp=dda9b97ffc319ed71f2c56050a378e93271d3757;hpb=946ca81debea60182a1eb28b5b9a791e74fcc8eb;p=projects.git diff --git a/tools/make/mconfigure b/tools/make/mconfigure index dda9b97..4f0410a 100755 --- a/tools/make/mconfigure +++ b/tools/make/mconfigure @@ -6,6 +6,31 @@ function echo_usage { ./configure -I } +function create_conf { + if [ -f "debian/$paket.cmake" ] + then + echo "compile_type=CMAKE" > debian/$paket.conf + elif [ -f "debian/$paket.build" ] + then + if [ -f "debian/$paket.cpp" ] + then + echo "compile_type=CPP" > debian/$paket.conf + else + echo "compile_type=OLD" > debian/$paket.conf + fi + else + echo "compile_type=NONE" > debian/$paket.conf + fi + + if [ -f "$paket.control" -a -f "$paket.cp" ] + then + echo "target_type=DEB" >> debian/$paket.conf + else + echo "target_type=FILE" >> debian/$paket.conf + fi + echo "$paket.conf created." +} + ############################################################################## # Main program ############################################################################## @@ -49,9 +74,16 @@ fi if [ ! -f debian/$paket.conf ] then + # check if any files for $paket are present + if ! ls debian/$paket.* 2>/dev/null + then + echo "$paket is no build target in this repository." + exit 5 + fi + + # build conf file echo "$paket.conf missing. We create it ..." - echo "to be implemented ..." - exit 5 + create_conf fi if [ ! -e configure ] @@ -67,6 +99,7 @@ then rm -rf ~/build mkdir ~/build fi + configure_args="$configure_args -b" fi # perform configure @@ -144,13 +177,15 @@ then elif [ "$target_type" == "FILE" ] then echo "PACK=version" >> debian/rules.pre - if [ -z "$compile_target" ] + if [ "$compile_type" != "OLD" ] then - echo "compile_target is needed for target_type FILE" - exit 12 + if [ -z "$compile_target" ] + then + echo "compile_target is needed for target_type FILE" + exit 12 + fi + echo "TARGET = $compile_target" >> debian/rules.pre fi - echo "TARGET = $compile_target" >> debian/rules.pre - else echo "Unknown target type: $target_type" exit 13