qt module patches
Adriaan de Groot <adridg-FlD2LfDziEhmR6Xm/[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Find attached a small patch for the qt module. It writes generated files to $BDIR instead of in the source dir (I hop,e at least -- does this depend on the value of $BDIR when the action executes or when the action is defined?) It also replaces some include <> by include "" so that AAP tries to generate the files. Finally it adds an allowance for .h files that are considered to be C(++) sources. -- pub 1024D/FEA2A3FE 2002-06-18 Adriaan de Groot <[email protected]> If the door is ajar, can we fill it with door-jamb?
qt.aap.diff
(text/x-diff, 1.7 KB)
Index: qt.aap
===================================================================
RCS file: /cvsroot/a-a-p/Exec/modules/qt.aap,v
retrieving revision 1.1
diff -u -3 -p -r1.1 qt.aap
--- qt.aap 3 Oct 2003 09:01:44 -0000 1.1
+++ qt.aap 9 Oct 2003 13:58:32 -0000
@@ -31,10 +31,7 @@ qt_includedir = $QTDIR/include
# This is for the intermediate mocs, which get #included
:action h2moc default
- :sys $moc -o $target $source
-
-:action h2mocspecial default
- :sys $moc -o `sufreplace("",".moc",source)` $source
+ :sys $moc -o $-target $source
:rule %.moc : %.h
:do h2moc $source
@@ -43,14 +40,15 @@ qt_includedir = $QTDIR/include
# Designer files
+# Two actions, because h files are often considered C or C++ sources.
:action ui2h h ui
- :print $source -> $target
:sys uic -tr i18n $source > $target
- :do h2mocspecial $target
+:action ui2h cpp ui
+ :sys uic -tr i18n $source > $target
:action ui2cpp cpp ui
- :do ui2h { target = `sufreplace("",".h",source)` { filetype=h } }
- $source { filetype=ui }
+ :do ui2h { target = $BDIR/`sufreplace("",".h",source)` { filetype=h } }
+ $source { filetype=ui }
:sys echo "#include <klocale.h>" > $target
:sys uic -tr tr2i18n -impl `sufreplace("",".h",source)` $source > $(target).temp
:sys sed -e "s,tr2i18n( \"\" ),QString::null,g"
@@ -58,7 +56,7 @@ qt_includedir = $QTDIR/include
-e "s,image\([0-9][0-9]*\)_data,img\1_dbSelection_base,g"
$(target).temp >> $target
:sys rm -rf $(target).temp
- :sys echo "#include <"`sufreplace("",".moc",source)`">" >> $target
+ :sys echo "#include \""`sufreplace("",".moc",source)`"\"" >> $target
:route ui h
ui2h