]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/commitdiff
Update Makefile.rules to the latest version
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 23:33:37 +0000 (00:33 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 23:33:37 +0000 (00:33 +0100)
There is an improved support for wvtest framework.

build/aquosa/Makefile.rules

index 12aace8db9c93189559ea3980fe1fc330d5af97a..37e018c164afcdc739c90c38cf07c0796d0ea803 100644 (file)
@@ -4,7 +4,7 @@
 #  (C) Copyright 2006, 2007, 2008, 2009, 2010 by Michal Sojka - Czech Technical University, FEE, DCE
 #
 #  Homepage: http://rtime.felk.cvut.cz/omk/
-#  Version:  0.2-29-gac7ec3c
+#  Version:  0.2-47-g1d14a3e
 #
 # The OMK build system is distributed under the GNU General Public
 # License.  See file COPYING for details.
@@ -341,8 +341,13 @@ omkize:
           fi \
        done
                                                                                  #OMK:wvtest.omk@Makefile.rules.linux
-# Documentation: wvtest_PROGRAMS is equivalent to test_PROGRAMS. The
-# difference is that it is automatically run during "make wvtest".
+ifndef WVTEST_LIBRARY
+WVTEST_LIBRARY = wvtest
+endif
+
+# Documentation: wvtest_PROGRAMS is amost equivalent to test_PROGRAMS.
+# The two differences are that the program is automatically linked
+# with $(WVTEST_LIBRARY) and it is run during "make wvtest".
 test_PROGRAMS += $(wvtest_PROGRAMS)
 
 # Documentation: If your project uses wvtest, it is recomended to put
@@ -359,8 +364,12 @@ define wvtest_template
 wvtest-pass-local: wvtest-run-$(1)
 .PHONY: wvtest-run-$(1)
 wvtest-run-$(1):
-       mkdir -p $(1).wvtest
-       cd $(1).wvtest && $(1)
+       @$(QUIET_CMD_ECHO) "  RUN     $(1:$(MAKERULES_DIR)/%=%)"
+       $(Q)mkdir -p $(1).wvtest
+       $(Q)cd $(1).wvtest && \
+         PATH=$$(USER_BIN_DIR):$$$$PATH LD_LIBRARY_PATH=$$(USER_LIB_DIR):$$$$LD_LIBRARY_PATH \
+         $(1)
+$(notdir $(1))_LIBS += $$(WVTEST_LIBRARY)
 endef
 
 # Documentation: Write the test so, that it can be run from arbitrary
@@ -382,7 +391,7 @@ ifneq ($(LN_HEADERS),y)
 define cp_cmd
 if ! cmp --quiet $(1) $(2); then \
     echo "  CP      $(1:$(OUTPUT_DIR)/%=%) -> $(2:$(OUTPUT_DIR)/%=%)"; \
-    install -C -D $(CPHEADER_FLAGS) $(1) $(2) || exit 1; \
+    install -D $(CPHEADER_FLAGS) $(1) $(2) || exit 1; \
 fi
 endef
 else
@@ -1314,6 +1323,7 @@ $(LOCAL_BUILD_DIR)/$(dir $(1))Makefile: $(SOURCES_DIR)/$(1)
             $(QTDIR:%=QTDIR=%) CC=$(CC) CXX=$(CXX)                     \
             LIBS+="-L$(USER_LIB_DIR)" DESTDIR=$(USER_BIN_DIR)          \
             INCLUDEPATH+="$(USER_INCLUDE_DIR)"                         \
+            DEPENDPATH+="$(USER_INCLUDE_DIR)"                          \
             QMAKE_LFLAGS="-Wl,-rpath-link,$(USER_LIB_DIR) $$(QMAKE_LFLAGS)" \
             $(SOURCES_DIR)/$(1)