Automatic dependency checking problems
Thore Karlsen <sid-m3MN3Z/L/[email protected]> Thu, 06 May 2004 11:56:43 -0500
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Organization | I've resigned. |
| Message-ID | <[email protected]> |
I'm having some issues with this.
First: I'm running AAP under cygwin, but I'm compiling with MSVC. This
means that gcc can be found, so AAP will default to using that to
generate the dependencies. This doesn't work, for a couple of reasons:
1. gcc doesn't understand the MSVC compiler flags.
2. The dependency files use .o for object files, not .obj which is the
standard suffix for the windows platform.
It would be good if I could tell AAP not to try to use gcc for
dependency checking, regardless of whether it's found or not. There
doesn't seem to be a good way to do this.
There is also a problem with the built-in dependency checking function,
aap_depend_c. It doesn't automatically look in the directory of a source
file for the header file. If the directory structure is like this:
main.aap
Project/main.cpp
Project/main.h
main.h will not be listed as a dependency, because main.h can't be found
in the list of directories aap_depend_c searches. It should
automatically search the Project directory, because that's what C/C++
compilers do.
I've worked around the above problems by adding this to my recipe:
:action depend {recursive} c,cpp
@srcpath = os.path.dirname(var2list(source)[0])
@aap_depend_c(globals(), source, target,
@ flags = "-I%s %s" % (srcpath, _no.INCLUDE))
However, it would be nice if there was a cleaner way.
--
Be seeing you.
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3