Update embedded build script same way as host one.
authorppisa <pisa@cmp.felk.cvut.cz>
Fri, 7 Aug 2009 16:10:29 +0000 (18:10 +0200)
committerppisa <pisa@cmp.felk.cvut.cz>
Fri, 7 Aug 2009 16:10:29 +0000 (18:10 +0200)
Signed-off-by: ppisa <pisa@cmp.felk.cvut.cz>
build-embedded.sh

index 8a68c7a..30e26c0 100755 (executable)
@@ -28,7 +28,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
 
 if [ ! -e "$BUILD_DIR/config.omk" ] ; then