[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [NEWPATCH] KConfigXT && $cxxsuffix
From: Adriaan de Groot <adridg () cs ! kun ! nl>
Date: 2004-01-15 13:09:07
Message-ID: 200401151409.09290.adridg () cs ! kun ! nl
[Download RAW message or body]
[Man, do I feel Neil-ish for hammering on this subject like this.]
If ..
1) a user uses the default KDE build system of autotools and am_edit,
2) _and_ has $cxxsuffix set to something other than .cpp (koffice, konqueror,
kpilot all do that),
3) _and_ wants to use KConfigXT / kconfig_compiler,
he or she is screwed, because kconfig_compiler produces a .cpp file, while
am_edit builds a Makefile expecting the output to have $cxxsuffix.
The attached patch to am_edit makes kconfig_compiler respect $cxxsuffix by
moving the output file. And fixes a typo in a comment.
It is important for this patch to be in 3.2 because otherwise apps with a
"different" $cxxsuffix cannot use KConfigXT at all in 3.2. Also apps pledged
to compatibility with 3.2 (kdepim, basically) cannot use it.
Of course, there are two workarounds:
1) Announce that auto* and am_edit are officially deprecated for 3.2 and only
unsermake use is supported.
2) Announce that all KDE apps must use .cpp as $cxxsuffix and shuffle stuff
around on the CVS server.
--
pub 1024D/FEA2A3FE 2002-06-18 Adriaan de Groot <groot@kde.org>
If the door is ajar, can we fill it with door-jamb?
["am_edit.diff" (text/x-diff)]
Index: am_edit
===================================================================
RCS file: /home/kde/kde-common/admin/am_edit,v
retrieving revision 1.406
diff -u -3 -p -r1.406 am_edit
--- am_edit 29 Oct 2003 22:45:50 -0000 1.406
+++ am_edit 15 Jan 2004 11:58:44 -0000
@@ -269,7 +269,7 @@ sub processMakefile ($)
tag_CLOSURE();
tag_NMCHECK();
tag_UIFILES(); # Sorts out ui rules
- tag_KCFGFILES(); # Sourt out kcfg rules
+ tag_KCFGFILES(); # Sorts out kcfg rules
tag_METASOURCES (); # Sorts out the moc rules
if ($sources_changed{$program}) {
my $lookup = $program . '_SOURCES\s*=[ \t]*(.*)';
@@ -1425,10 +1425,14 @@ sub tag_KCFGFILES ()
$kcfg = "$program.kcfg";
findKcfgFile("$source.kcfgc");
+ my $fixsuffix = "";
+ $fixsuffix = "else mv $source.cpp $source.$cxxsuffix ; "
+ unless "cpp" eq $cxxsuffix;
+
my $dep_lines = "$source.$cxxsuffix: $source.h\n";
$dep_lines .= "$source.h: $sourcedir$kcfg $sourcedir$source.kcfgc \
\$(KCFG_DEPENDENCIES)\n";
$dep_lines .= "\t\$(KCONFIG_COMPILER) $sourcedir$kcfg \
$sourcedir$source.kcfgc; ret=\$\$?; \\\n";
- $dep_lines .= "\tif test \"\$\$ret\" != 0; then rm -f $source.h ; exit \$\$ret ; \
fi\n\n"; + $dep_lines .= "\tif test \"\$\$ret\" != 0; then rm -f $source.h ; exit \
\$\$ret ; $fixsuffix fi\n\n";
$rule_adds{"$source.$cxxsuffix"} = $dep_lines;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic