gitarre
[projects.git] / tools / make / configure
index 2382c1d..f83750e 100755 (executable)
@@ -14,6 +14,18 @@ function echo_usage {
        echo "  -V : version set by project"
 }
 
+function create_build {
+       pushd $BUILD_DIR >/dev/null
+               if [ "$compile_type" == "PDF" ]
+               then
+                       echo "make $compile_target" > debian/$paket.build
+                       chmod 755 debian/$paket.build
+               else
+                       echo "build for compile_type not implemented."
+                       exit 10
+               fi
+       popd >/dev/null
+}
 function cmake_check {
        pushd ../build >/dev/null
                # do checks
@@ -316,7 +328,7 @@ else
        fi
 
        # .build
-       if [ "$compile_type" != "CMAKE" ]
+       if [ "$compile_type" != "CMAKE" -a "$compile_type" != "OLD" ]
        then
                cp debian/rules.pre $BUILD_DIR/$compile_dir/make.pre
                pushd $BUILD_DIR/$compile_dir >/dev/null
@@ -333,15 +345,16 @@ else
                popd >/dev/null
        fi
                
-       if [ -x debian/$paket.build ]
+       if [ -x debian/$paket.prebuild ]
        then
-               if [ -x debian/$paket.prebuild ]
-               then
-                       pushd $BUILD_DIR >/dev/null
-                               . debian/setenv.sh
-                               debian/$paket.prebuild
-                       popd >/dev/null
-               fi
+               pushd $BUILD_DIR >/dev/null
+                       . debian/setenv.sh
+                       debian/$paket.prebuild
+               popd >/dev/null
+       fi
+       if ! [ -x debian/$paket.build -o -f debian/$paket.cmake ]
+       then
+               create_build
        fi
 
        # .cmake