Weird :update targets
Adriaan de Groot <adridg-FlD2LfDziEhmR6Xm/[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
On Monday 06 October 2003 22:14, you wrote:
> So, the main question is why ":update setup_base.moc" did not find the
> rule. One thing to consider is that Aap doesn't have a clue where
> setup_base.moc would be located, it could be anywhere in the include
> search path. It attempts using the build directory, I assume that's
> correct. The setup_base.h file is in the same directory. So why
> doesn't Aap figure out that the rule from "%.h" to "%.moc" can be used?
> I have no idea.
As I pointed out elsewhere in this thread, the sequence of :updates that AAP
tries is rather odd: for instance, it tries
Aap: Attempt :update "/mnt/src/kde-HEAD/kdepim/kpilot/lib/usr/local/kde-3.2/
include/usr/local/qt-3.2/include/usr/local/includebuild-FreeBSD4_9_RC/
null-factory.moc"
Now I've traced this back to aap_update(), where line 626
sp = optiondict.get("searchpath")
I supposed to get the search path. This is supposed to yield a string that can
be split into a dictlist with string2dictlist(), but instead it yields that
long and weird string (with all my includes concatenated together). And that
leads to aap_sysdepend(), where searchpath is constructed based on the value
of $INCLUDE. And lo, there's a space missing, it seems.
Patch attached. It certainly causes AAP to search in the relevant directories.
It also solves most of my generated source files problems; I still need a
:rule {sourceexists} $BDIR/%.h : %.ui
:do ui2h $source
but can I add that to a module without causing problems? Will that use the
value of $BDIR at the moment the module is imported, or the value of $BDIR at
the moment the rule is checked for applicability?
Also attached, a comment typo fix (ick, how pedantic) for DoBuild.py.
--
pub 1024D/FEA2A3FE 2002-06-18 Adriaan de Groot <[email protected]>
If the door is ajar, can we fill it with door-jamb?
Commands.diff
(text/x-diff, 918 B)
Index: Commands.py
===================================================================
RCS file: /cvsroot/a-a-p/Exec/Commands.py,v
retrieving revision 1.108
diff -u -3 -p -r1.108 Commands.py
--- Commands.py 3 Oct 2003 18:59:24 -0000 1.108
+++ Commands.py 9 Oct 2003 20:13:13 -0000
@@ -607,6 +607,7 @@ def aap_update(line_nr, recdict, arg):
if attrdict:
option_error(rpstack, attrdict, ":update")
+
if len(argdictlist) == 0:
recipe_error(rpstack, _("Missing argument for :update"))
@@ -1855,7 +1856,7 @@ def aap_sysdepend(line_nr, recdict, arg)
if not i:
searchpath = '.'
else:
- searchpath = re.sub('^-I|[ "]-I', "", i) + " ."
+ searchpath = re.sub('^-I|[ "]-I', " ", i) + " ."
# Also look in the directory of the source file, because most C
# compilers will do this (e.g., compiling "test/foo.c" which contains
DoBuild.diff
(text/x-diff, 629 B)
Index: DoBuild.py
===================================================================
RCS file: /cvsroot/a-a-p/Exec/DoBuild.py,v
retrieving revision 1.75
diff -u -3 -p -r1.75 DoBuild.py
--- DoBuild.py 22 Sep 2003 17:36:56 -0000 1.75
+++ DoBuild.py 9 Oct 2003 20:14:09 -0000
@@ -374,7 +374,7 @@ def target_update_inlist(work, recdict,
if res == updated_ERROR:
# We continue any way. If another name is successful it's OK, if
- # not than remember this error.
+ # not then remember this error.
done = build_done_ERROR
# Did not find a name that could be updated.