Re: default.aap diff
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Adriaan de Groot wrote: > On Wednesday 01 October 2003 23:10, you wrote: > > The "-MG" option should not be necessary. When gcc runs into a header > > file that it can't find it will produce an error message. Aap > > recognizes the error and will attempt to produce that header file and > > retry generating dependencies. Clever eh? But perhaps it's so clever > > it doesn't work? > > Sortof. Consider this sequence of AAP output: > > > Aap: uic -tr i18n setup_base.ui > build-FreeBSD4_9_RC/setup_base.h > Aap: echo "#include <klocale.h>" > build-FreeBSD4_9_RC/setup_base.cc > Aap: uic -tr tr2i18n -impl setup_base.h setup_base.ui > build-FreeBSD4_9_RC/ > setup_base.cc.temp > Aap: 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" build-FreeBSD4_9_RC/setup_base.cc.temp >> > build-FreeBSD4_9_RC/setup_base.cc > Aap: rm -rf build-FreeBSD4_9_RC/setup_base.cc.temp > Aap: echo "#include \""setup_base.moc"\"" >> build-FreeBSD4_9_RC/setup_base.cc > Aap: g++ -I/usr/local/kde-3.2/include -I/usr/local/qt-3.2/include -I/usr/ > local/include -I. -MM build-FreeBSD4_9_RC/setup_base.cc > > build-FreeBSD4_9_RC/build-FreeBSD4_9_RC/setup_base.cc.aap > build-FreeBSD4_9_RC/setup_base.cc:102: setup_base.moc: No such file or > directory > Aap: Error in recipe "/home/adridg/aap/Exec-cvs/default.aap" line 148: :update > failed for "setup_base.moc" > > > You can see that first a .h file is created. Then a C++ file is > created, which contains the line #include "setup_base.moc". It _also_ > contains the line #include "setup_base.h", but that file already > exists in $BDIR (because my action to create the C++ file also > explicitly :does the action to create the .h file). I'm a little > worried about interactions between $BDIR and filenames #included in > generated files, but that's not something to deal with here. > > If I run aap -v, I see > > Aap: Start :update "setup_base.moc" > Aap: Attempt :update "build-FreeBSD4_9_RC/setup_base.moc" > Aap: 1 - updating target "build-FreeBSD4_9_RC/setup_base.moc" > Aap: 1 - Do not know how to build "build-FreeBSD4_9_RC/setup_base.moc" > Aap: :update "build-FreeBSD4_9_RC/setup_base.moc" failed > > wow, it's smart enough to know what to update, but somehow the update fails. > There is a :rule %.moc : %.h, but apparently it's not invoked. Well, I think this at least shows that adding "-MG" would not be the right solution, because files that setup_base.moc would include would otherwise go unnoticed. I don't know if there are any, but that's not really the issue. 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. You'll have to do a bit of debugging. Starting with target_update() probably. -- I AM THANKFUL... ...for the taxes that I pay because it means that I am employed. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf