libtool updates
Adriaan de Groot <adridg-FlD2LfDziEhmR6Xm/[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
find attached three things: a diff to libtool.aap that makes :ltlib commands work for me. a qt.aap module that adds some Qt support, and an example recipe for a shared libtool library. I see that .h file install doesn't work with it right now, I'll sort that out tomorrow. -- 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
(text/plain, 2.2 KB)
# Qt (tm) module for the A-A-P build system.
#
# Written by Adriaan de Groot. Copyright is assigned to
# Bram Moolenaar and Stichting NlNet Labs. Released under
# the GPL, version 2. There should be a file named COPYING
# in the main A-A-P directory with the complete text of
# this license.
@if not _top.get("did_import_qtmod"):
QTDIR=`os.environ.get("QTDIR")`
@if not QTDIR:
QTDIR=/usr/local/qt-3.2
qtdir_source="Default QTDIR"
@else:
qtdir_source="Environment QTDIR"
@if not os.path.isdir(QTDIR):
:print $qtdir_source ($QTDIR) is not a directory.
@raise UserError,"Bad QTDIR"
moc=$QTDIR/bin/moc
@if not os.path.isfile(moc):
:print moc ($moc) is not executable.
@raise UserError, "Bad moc"
qt_includedir=$QTDIR/include
# Filetypes in Qt & KDE
:filetype
suffix ui ui # designer files
suffix moc moc # moc files
declare h # header files, just to be complete
# 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
:rule %.moc : %.h
:do h2moc $source
# Designer files
:action ui2h h ui
:print $source -> $target
:sys uic -tr i18n $source > $target
:do h2mocspecial $target
:action ui2cpp cpp ui
:do ui2h { target = `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"
-e "s,tr2i18n( \"\"\, \"\" ),QString::null,g"
-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
:route ui h
ui2h
:route ui cpp object,ltobject
ui2cpp `sufreplace("",".cc",source)`
compile
:route ui h moc
ui2h `sufreplace("",".h",source)`
h2moc
:rule {sourceexists} %.cc : %.ui
:do ui2cpp { target = $(target[0]) } $source
:rule {sourceexists} %.h { filetype=h } : %.ui
:do ui2h { target = $(target[0]) } $source
_top.did_import_qtmod=1
libtool.aap.diff
(text/x-diff, 2.5 KB)
Index: libtool.aap
===================================================================
RCS file: /cvsroot/a-a-p/Exec/modules/libtool.aap,v
retrieving revision 1.1
diff -u -3 -p -r1.1 libtool.aap
--- libtool.aap 1 Oct 2003 17:17:34 -0000 1.1
+++ libtool.aap 1 Oct 2003 21:48:39 -0000
@@ -7,9 +7,9 @@
# this license.
# Last Change: 2003 Oct 01
-_top.LTLIBSUF=.la
-_top.LTLIBPRE=lib
-_top.LTLIBOBJSUF=.lo
+_top.LTSUF=.la
+_top.LTPRE=lib
+_top.LTOBJSUF=.lo
# Spend some time searching for the libtool program.
# This is very shellscript-ish, since I don't know
@@ -35,6 +35,7 @@ _top.LTLIBOBJSUF=.lo
@if not libtool_ver:
:error Cannot find a proper libtool version (>= 1.5)
+
# Initially, there is nothing to install.
_top.INSTALL_LTLIB=""
@@ -55,7 +56,7 @@ _top.INSTALL_LTLIB=""
:do $act {target = $target} $source
@else:
:buildcheck $OPTIMIZE $?DEBUG
- :sys $LIBTOOL --mode=compile --tag=CXX
+ :sys $libtool --mode=compile --tag=CXX
$CXX $CPPFLAGS $?DEFINE $?INCLUDE `cflags_normal()` $CXXFLAGS
-c -o $target $source
@@ -73,7 +74,7 @@ _top.INSTALL_LTLIB=""
:do $act {target = $target} $source
@else:
:buildcheck $OPTIMIZE $?DEBUG
- :sys $LIBTOOL --mode=compile --tag=C
+ :sys $libtool --mode=compile --tag=C
$CC $CPPFLAGS $?DEFINE $?INCLUDE `cflags_normal()` $CFLAGS
-c -o $target $source
:route c ltobject
@@ -82,7 +83,7 @@ _top.INSTALL_LTLIB=""
# It may be useful to use { filetype= } in :ltlib commands,
# so that buildltlib can use the correct tag.
:action buildltlib default
- :sys $libtool --silent --mode=link --tag=CXX
+ :sys $libtool --mode=link --tag=CXX
$CXX $?LDFLAGS $?LTLIBS $?LIBS -o $target $source
@@ -90,7 +91,7 @@ _top.INSTALL_LTLIB=""
# attribute to select to build a program with libtool or without.
:action build ltexe default
:sys $libtool --silent --mode=link --tag=CXX g++ -o $target
- $source $LDFLAGS $LIBS $LTLIBS
+ $source $LDFLAGS $?LIBS $?LTLIBS
@@ -111,12 +112,12 @@ _top.INSTALL_LTLIB=""
:action ltbuild default
# $LTLIBS is set, use libtool for linking
- :sys $LIBTOOL --mode=link --tag=C
+ :sys $libtool --mode=link --tag=C
$ld $LDFLAGS `cflags_normal()` -o $target $source
$?LTLIBS $?LIBS
:action ltbuild_cxx default
# $LTLIBS is set, use libtool for linking
- :sys $LIBTOOL --mode=link --tag=CXX
+ :sys $libtool --mode=link --tag=CXX
$ld $LDFLAGS `cflags_normal()` -o $target $source
$?LTLIBS $?LIBS
main.aap
(text/plain, 762 B)
@if not _top.get("top_srcdir"):
@_top["top_srcdir"]=os.path.abspath("../..")
:import libtool
:import qt
:import kde
INCLUDE=-I$m_kde.kde_includedir -I$m_qt.qt_includedir -I/usr/local/include
:ltlib libkpilot.la
{ var_LTLIBS=-rpath $m_kde.KDEDIR } :
options.cc
uiDialog.cc
plugin.cc
syncAction.cc
kpilotlink.cc
pilotRecord.cc
pilotDatabase.cc
pilotLocalDatabase.cc
pilotSerialDatabase.cc
pilotMemo.cc
pilotAddress.cc
pilotDateEntry.cc
pilotTodoEntry.cc
kpilotinclude_HEADERS = kpilotlink.h
uiDialog.h
plugin.h
syncAction.h
pilotRecord.h
pilotDatabase.h
pilotLocalDatabase.h
pilotSerialDatabase.h
:attr { installdir=$(m_kde.kde_includedir)/kpilot } $kpilotinclude_HEADERS
_top.INSTALL_HEADERS += $kpilotinclude_HEADERS