Copy right leaf node Makefile even if script started from different directory.
authorppisa <pisa@cmp.felk.cvut.cz>
Fri, 7 Aug 2009 16:02:40 +0000 (18:02 +0200)
committerppisa <pisa@cmp.felk.cvut.cz>
Fri, 7 Aug 2009 16:02:40 +0000 (18:02 +0200)
Signed-off-by: ppisa <pisa@cmp.felk.cvut.cz>
build-lincan.sh

index 27ade3d..a02a8fd 100755 (executable)
@@ -27,7 +27,12 @@ for i in $SOURCE_DIRS ; do
 done
 
 if [ ! -e "$BUILD_DIR/Makefile" ] ; then
-  cp omk/Makefile "$BUILD_DIR/Makefile"
+  m=$OMK_RULES_DIR
+  if [ ! -e "$m/Makefile" ] ; then m="$(dirname $m)" ; fi
+  if [ ! -e "$m/Makefile" ] ; then m="$(dirname $m)" ; fi
+  if [ -e "$m/Makefile" ] ; then
+    cp -v "$m/Makefile" "$BUILD_DIR/Makefile"
+  fi
 fi
 
 ( cd "$BUILD_DIR" && make default-config ) || exit 1