Change detail of `C_EXP_HDR` for CModule clients
This macro is used to define the root directory for exported C header files.
Previously, when native-compiling, the default setting, if not otherwise
overridden by the master makefile, was <cexport$dir>.Interface.h
. This is
at odds with the cross-compiling case, which defaults to the equivalent
string, but without the h
subdirectory, for obvious reasons.
Only one component, DHCP, currently overrides C_EXP_HDR
, although more will
be joining it in the near future. The macro is used internally within rules
defined by CModule
, but a few components also use it within rules in their
master makefiles.
We hereby change the default value to omit the h
subdirectory, and permit
master makefiles to specify an override value which also omits it (in future
it wil be deprecated to include it, and its use will be phased out). There
are two reasons for this:
-
It assists with cross-compilation, since the override can then be expressed identically for both native and cross builds.
-
It permits the
.exphdr.h
suffix rule to be re-used when one or more headers need to be exported to a subdirectory ofC_EXP_HDR
, so long as the headers are present at an equivalent subdirectory in the component source tree, and that subdirectory is onVPATH
. This is because$<
is set up to include the element ofVPATH
that matched the rule - but this needs to go before the.h
, not after it.
To prepare for this MR, the following must all be merged: