[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: $(shell) in Makefiles, kdoctools/ and kwin4/
From: Adriaan de Groot <adridg () cs ! kun ! nl>
Date: 2003-07-14 19:28:47
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 14 July 2003 20:33, Dirk Mueller wrote:
> Hmm, the kwin4 case is unecessary, removed. The kdelibs one is more
> difficult. I would prefer if meinproc would have a commandline option to
> specify the path and the build system should set that one instead of
> KDELIBS_UNINSTALLED environment variable.
Like this? Not tested very extensively, but it seems to do the trick. I can
imagine that when meinproc was meant to be pretty sleek, this was not an
option - to use kcmdlineargs and the like. As it stands, I now need to do
some build tricks to get meinproc to run during a totally clean build,
because of its dependence on libkdeui, which isn't in its rpath.
The only thing I might worry about is that SRCDIR is a global QString variable
- - what was the story about static QStrings being evil?
- --
pub 1024D/FEA2A3FE 2002-06-18 Adriaan de Groot <groot@kde.org>
Key fingerprint = 934E 31AA 80A7 723F 54F9 50ED 76AC EE01 FEA2 A3FE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE/EwRwdqzuAf6io/4RAkvzAJoCEaYDd+U+QqIkiX0a0JLadxjfPwCgogVu
yEOrr+si732F6HcocVPtDYw=
=TUQ4
-----END PGP SIGNATURE-----
["meinproc.patch" (text/x-diff)]
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdelibs/kdoctools/Makefile.am,v
retrieving revision 1.55
diff -u -3 -p -r1.55 Makefile.am
--- Makefile.am 4 Apr 2003 13:36:37 -0000 1.55
+++ Makefile.am 14 Jul 2003 19:27:26 -0000
@@ -1,7 +1,6 @@
INCLUDES= -I$(top_srcdir) -I$(top_srcdir)/kioslave -I$(top_srcdir)/kioslave/bzip2 \
$(all_includes) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS) AM_LDFLAGS = $(KDE_RPATH) \
$(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries)
-AM_CPPFLAGS = -DSRCDIR="\"$(shell (cd $(top_srcdir)/kdoctools && pwd))\""
noinst_LTLIBRARIES = libkbzipfilter_dummy.la
@@ -27,7 +26,7 @@ kdelnkdir = $(kde_servicesdir)
bin_PROGRAMS = meinproc xml2man
meinproc_LDADD = xslt_pure.o libkbzipfilter_dummy.la $(LIBXSLT_LIBS) $(LIBXML_LIBS)
-meinproc_SOURCES = meinproc.cpp
+meinproc_SOURCES = meinproc.cpp
xml2man_LDADD = xslt_pure.o $(LIBXSLT_LIBS) $(LIBXML_LIBS) libkbzipfilter_dummy.la
xml2man_SOURCES = xml2man.cpp
Index: configure.in.in
===================================================================
RCS file: /home/kde/kdelibs/kdoctools/configure.in.in,v
retrieving revision 1.38
diff -u -3 -p -r1.38 configure.in.in
--- configure.in.in 16 Sep 2002 10:10:38 -0000 1.38
+++ configure.in.in 14 Jul 2003 19:27:27 -0000
@@ -74,7 +74,7 @@ fi
KDOCTOOLS_CHECK_BZIP2
if test -n "$HELP_SUBDIR"; then
- MEINPROC='KDELIBS_UNINSTALLED=yes $(top_builddir)/kdoctools/meinproc'
+ MEINPROC='$(top_builddir)/kdoctools/meinproc --srcdir=$(top_srcdir)/kdoctools'
MEINPROC_DEP='$(top_builddir)/kdoctools/meinproc'
KDE_XSL_STYLESHEET='$(top_srcdir)/kdoctools/customization/kde-chunk.xsl'
else
Index: meinproc.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdoctools/meinproc.cpp,v
retrieving revision 1.27
diff -u -3 -p -r1.27 meinproc.cpp
--- meinproc.cpp 5 Dec 2002 11:46:25 -0000 1.27
+++ meinproc.cpp 14 Jul 2003 19:27:27 -0000
@@ -76,6 +76,7 @@ static KCmdLineOptions options[] =
{ "htdig", I18N_NOOP( "create a ht://dig compatible index" ), 0 },
{ "check", I18N_NOOP( "check the document for validity" ), 0 },
{ "cache <file>", I18N_NOOP( "create a cache file for the document" ), 0},
+ { "srcdir <dir>", I18N_NOOP( "set the srcdir, for kdelibs" ), 0},
{ "+xml", I18N_NOOP("The file to transform"), 0},
{ 0, 0, 0 } // End of options.
};
@@ -100,6 +101,8 @@ int main(int argc, char **argv) {
fillInstance(ins);
+ SRCDIR=QString::null;
+
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if ( args->count() != 1 ) {
args->usage();
@@ -126,6 +129,10 @@ int main(int argc, char **argv) {
return ( 2 );
}
+ if ( args->isSet( "srcdir" ) ) {
+ SRCDIR = args->getOption("srcdir") ;
+ kdError() << "Set srcdir " << SRCDIR << endl;
+ }
if ( args->isSet( "check" ) ) {
char pwd_buffer[250];
QFileInfo file( QFile::decodeName(args->arg( 0 )) );
Index: xslt.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdoctools/xslt.cpp,v
retrieving revision 1.64
diff -u -3 -p -r1.64 xslt.cpp
--- xslt.cpp 2 Jul 2003 00:58:37 -0000 1.64
+++ xslt.cpp 14 Jul 2003 19:27:29 -0000
@@ -26,6 +26,8 @@
#include <bzip2/kbzip2filter.h>
#include <klibloader.h>
+QString SRCDIR=QString::null;
+
#if !defined( SIMPLE_XSLT )
extern HelpProtocol *slave;
#define INFO( x ) if (slave) slave->infoMessage(x);
@@ -269,13 +271,13 @@ QString splitOut(const QString &parsed,
void fillInstance(KInstance &ins) {
QString catalogs;
- if ( !getenv( "KDELIBS_UNINSTALLED" ) ) {
+ if ( SRCDIR.isEmpty() ) {
catalogs += ins.dirs()->findResource("data", \
"ksgmltools2/customization/catalog"); catalogs += ':';
catalogs += ins.dirs()->findResource("data", \
"ksgmltools2/docbook/xml-dtd-4.2/docbook.cat");
ins.dirs()->addResourceType("dtd", KStandardDirs::kde_default("data") + \
"ksgmltools2"); } else {
- catalogs += SRCDIR "/customization/catalog:" SRCDIR \
"/docbook/xml-dtd-4.2/docbook.cat"; + catalogs += SRCDIR \
+"/customization/catalog:" + SRCDIR + "/docbook/xml-dtd-4.2/docbook.cat"; \
ins.dirs()->addResourceDir("dtd", SRCDIR); }
Index: xslt.h
===================================================================
RCS file: /home/kde/kdelibs/kdoctools/xslt.h,v
retrieving revision 1.11
diff -u -3 -p -r1.11 xslt.h
--- xslt.h 3 Jan 2002 10:21:26 -0000 1.11
+++ xslt.h 14 Jul 2003 19:27:29 -0000
@@ -13,6 +13,7 @@ QCString fromUnicode( const QString &dat
void replaceCharsetHeader( QString &output );
extern bool warnings_exist;
+extern QString SRCDIR;
/**
* Compares two files and returns true if @param newer exists and is newer than
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic