mkspecs/docml2bin.prf
branchGCC_SURGE
changeset 15 f378acbc9cfb
parent 7 923ff622b8b9
child 21 4633027730f5
child 34 ed14f46c0e55
--- a/mkspecs/docml2bin.prf	Thu Jul 15 14:03:49 2010 +0100
+++ b/mkspecs/docml2bin.prf	Thu Jul 22 16:36:53 2010 +0100
@@ -1,7 +1,8 @@
-include(hb_install.prf)
+exists(hb_install.prf):include(hb_install.prf)
+else:include($${HB_BUILD_DIR}/hb_install.prf)
 include(hb_functions.prf)
 
-QMAKE_DOCML2BIN = $$hbNativePath($${HB_BIN_DIR}/docml2bin)
+QMAKE_DOCML2BIN = $$hbToolCommand(docml2bin) 
  
 docml2bin.input = DOCML
 docml2bin.output = ${QMAKE_FILE_IN}.bin
@@ -9,11 +10,17 @@
 docml2bin.name = DOCML2BIN ${QMAKE_FILE_IN}
 docml2bin.CONFIG = no_link
 
-rcc.depends += compiler_docml2bin_make_all
+for(DOCMLFILE, $$list($$unique(DOCML))) {
+    DOCMLFILE_PWD = $${_PRO_FILE_PWD_}/$${DOCMLFILE}
+    rcc.depends += $${DOCMLFILE_PWD}.bin
 
-## how to add ".bin" for each variable?
-#rcc.depends += for(DOCMLFILE, $$list(DOCML)) { DOCMLFILE }
-#rcc.depends += $${first(DOCML)}.bin
-#rcc.depends += $${last(DOCML)}.bin
+    DOCML2BINEXTENSION = \
+        "START EXTENSION qt/qmake_extra_pre_targetdep.export" \
+        "OPTION PREDEP_TARGET $${DOCMLFILE_PWD}.bin" \
+        "OPTION DEPS $${DOCMLFILE_PWD}" \
+        "OPTION COMMAND $${QMAKE_DOCML2BIN} -s $${DOCMLFILE_PWD} -t $${DOCMLFILE_PWD}.bin" \
+        "END"    
+    BLD_INF_RULES.prj_extensions += DOCML2BINEXTENSION
+}
 
 QMAKE_EXTRA_COMPILERS += docml2bin