build/omj.pri
changeset 78 71ad690e91f5
parent 67 63b81d807542
--- a/build/omj.pri	Fri Sep 17 16:44:34 2010 +0300
+++ b/build/omj.pri	Mon Oct 04 11:29:25 2010 +0300
@@ -20,6 +20,12 @@
   # Load project defines (if not already loaded). Fail if can not loaded.
   !include(../inc/build_defines.pri):error(Could not load build_defines.pri)
 
+  # Sanity check - otherwise components may fail e.g. with ODC file "what" target
+  PRO_FILE_BASE = $$basename(_PRO_FILE_)
+  !contains(PRO_FILE_BASE,$${TARGET}.pro) {
+     error(Target name $${TARGET} does not match file name of $${_PRO_FILE_})
+  }
+
   # Allow JAVATARGET to be used for defining the Java project name (java artifacts)
   isEmpty(JAVATARGET): JAVATARGET = $${TARGET}
 
@@ -154,7 +160,7 @@
   TRY_DIR=$${_PRO_FILE_PWD_}
   for(a, 1..10): {
      TRY_DIR = $$join(TRY_DIR,,,/..)
-     exists($${TRY_DIR}/build/Makefile.comp) DEPTH=$${a}
+     exists($${TRY_DIR}/build/omj.pri) DEPTH=$${a}
   }
 
   # Make include paths