]> rtime.felk.cvut.cz Git - omk/sssa.git/commitdiff
Fixed QT compilation from subdirectory and documented QT_SUBDIRS variable
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Apr 2008 18:51:00 +0000 (18:51 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Apr 2008 18:51:00 +0000 (18:51 +0000)
darcs-hash:20080418185129-f2ef6-52c01a0f1cd4d998a783ea8e8738e5667a1680bb.gz

doc/omk-manual.texinfo
snippets/qt
tests/qt/Makefile1.omk [moved from tests/qt/Makefile.omk with 100% similarity]
tests/qt/Makefile2.omk [new file with mode: 0644]
tests/qt/dir/Makefile [new file with mode: 0644]
tests/qt/dir/Makefile.omk [new file with mode: 0644]
tests/qt/runtest

index c97770063ca4ca7558e163ce357cd0d8fed6091c..9a5b094d98aca2c376b9375528a58614430223f6 100644 (file)
@@ -891,6 +891,14 @@ sugest, but also for other Unices and even for Windows.
   used. If not specified manually, it equals to BUILD_OS. 
 @end defvar
 
+@defvar QT_SUBDIRS
+  Lists subdirectories with QT project (.pro) file. OMK will generate
+  there @file{Makefile} by calling @command{qmake} with correct
+  parameters to interface QT application to the rest of the compilation
+  tree.  Then @command{make} is called there to compile QT
+  application. Variable @samp{QTDIR} must be set to the directory with
+  QT instalation (e.g. /usr/share/qt4 on Debian).
+@end defvar
 
 
 @node System-Less, RTEMS, Linux, Properties of Specific Makefile.rules
index 7091df6ddc38a56d9aff7b2c7f660f207cec05c3..b554df47910a6b7b901421f06f51b1dc3810aa1e 100644 (file)
@@ -21,7 +21,7 @@ qt-subpass: $(foreach dir,$(QT_SUBDIRS), $(SOURCES_DIR)/$(dir)/Makefile)
                -f $(SOURCES_DIR)/$(dir)/Makefile || exit 1 ;)
 
 # Hook to binary pass
-binary-pass: qt-subpass
+binary-pass-submakes: qt-subpass
 
 # Hook to clean pass
 clean-local: clean-qt
similarity index 100%
rename from tests/qt/Makefile.omk
rename to tests/qt/Makefile1.omk
diff --git a/tests/qt/Makefile2.omk b/tests/qt/Makefile2.omk
new file mode 100644 (file)
index 0000000..37acf49
--- /dev/null
@@ -0,0 +1,2 @@
+SUBDIRS = somelib dir
+
diff --git a/tests/qt/dir/Makefile b/tests/qt/dir/Makefile
new file mode 100644 (file)
index 0000000..08cf5ff
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else   
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/tests/qt/dir/Makefile.omk b/tests/qt/dir/Makefile.omk
new file mode 100644 (file)
index 0000000..4df20f8
--- /dev/null
@@ -0,0 +1 @@
+QT_SUBDIRS = ../qtapp
index 845edc1eeb350e6ce5e9aba815328b0955a1e28c..8fef771c82d7bad24555684863b1bb3e2f4f49ed 100755 (executable)
@@ -4,5 +4,15 @@ source ../functions.sh
 
 touch config.omk-default
 QTDIR=/usr/share/qt4
+export QTDIR
 [ -d $QTDIR ] || canttest "Can't find QT4 instalation"
-make QTDIR=$QTDIR
+
+cp Makefile1.omk Makefile.omk
+make || error "QT compilation"
+[ -x qtapp/qtapp ] || error "QT application was not compiled"
+
+make distclean || error "QT distclean"
+
+cp Makefile2.omk Makefile.omk
+make || error "QT Compilation in subdir"
+[ -x qtapp/qtapp ] || error "QT application was not compiled"