[build2] Trigger compile of sources when their header dependencies change
Moldmann Max (DC-MA/ENG52-NA)
Max.Moldmann at boschrexroth-us.com
Mon Apr 17 17:53:43 UTC 2017
Hi Boris,
Ok. Everything is working now.
I removed the -M* option, then I had to use absolute path names instead of relative include folder names (for the "-I<dir>" parameters). Somehow can the GCC preprocessor live with relative include directories only when the -MMD option is given. Using relative names was one way to reduce the length of the build command line when compiling a project with a huge amount of module directories (see http://stackoverflow.com/questions/3205027/maximum-length-of-command-line-string).
Thanks,
Max
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Monday, April 17, 2017 12:09 PM
To: Moldmann Max (DC-MA/ENG52-NA) <Max.Moldmann at boschrexroth-us.com>
Cc: users at build2.org
Subject: Re: [build2] Trigger compile of sources when their header dependencies change
Hi Max,
Moldmann Max (DC-MA/ENG52-NA) <Max.Moldmann at boschrexroth-us.com> writes:
> Unfortunately the way many projects are using the include directive
> they depend on the -MMD option to compile correctly.
How so? -MMD has nothing to do with compilation, it only controls what ends up being written into the .d output. And since build2 takes care of that, you shouldn't pass any -M* options yourself.
> The pathnames in the resulting .o.d file are absolute using Windows
> style backslashes. By the way can build2 work with relative path names
> here - this e.g. makes compare jobs easier?
No, relative paths are used to detect non-existent headers to support auto-generated source code.
Boris
More information about the users
mailing list