scons icon indicating copy to clipboard operation
scons copied to clipboard

#include macro ignored as a dependency

Open bdbaddog opened this issue 7 years ago • 2 comments

This issue was originally created at: 2017-03-06 00:28:29. This issue was reported by: stephendhill.

stephendhill said at 2017-03-06 00:28:29

#include macro, appears to be ignored as a dependency. E.g.

#define TESTPOINT_STEERING_FILE "sys_testpoint_all_sets.h"
#include TESTPOINT_STEERING_FILE

if sys_testpoint_all_sets.h is modified and we perform a build, nothing is rebuilt.

bdbaddog said at 2017-03-06 15:21:11

This is a known issue.

Please bring your issues to the users mailing list prior to filing a bug per the bug policy.

https://scons.org/bugs.html

There is a new scanner for c/C++ files in the work which may work for this use case.

You might try using the code in this pull request and see if it resolves your issue. Please bring discussion of this to the users mailing list.

bdbaddog avatar Jan 02 '18 15:01 bdbaddog

See also #344 - these look like dupes.

mwichmann avatar Mar 26 '21 12:03 mwichmann

The CConditionalScanner does work for this case. It does not, at the moment at least, work for the case where the macro is defined on the command line (that is, comes from CPPDEFINES) - that case is also mentioned in the related issue #344. In order to close this issue out, do we need to document how to select the conditional scanner?

mwichmann avatar Jul 19 '22 16:07 mwichmann