diff options
author | Michael Brown <mcb30@ipxe.org> | 2014-08-19 16:17:25 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2014-08-20 12:36:44 +0100 |
commit | c801cb29d64764fa8082ec2ab17dd12f74b3143f (patch) | |
tree | dde1548393981062a33054083daddfecbd2a0c9b /src/config/general.h | |
parent | 3953ddd2acf72fb30cd70bb65476dd86b6799708 (diff) | |
download | ipxe-c801cb29d64764fa8082ec2ab17dd12f74b3143f.tar.gz |
[build] Allow for named configurations at build time
Allow named configurations to be specified via the CONFIG=... build
parameter. For headers in config/*.h which support named
configurations, the following files will be included when building
with CONFIG=<name>:
- config/defaults/<platform>.h (e.g. config/defaults/pcbios.h)
- config/<header>.h
- config/<name>/<header>.h (only if the directory config/<name> exists)
- config/local/<header>.h (autocreated if necessary)
- config/local/<name>/<header>.h (autocreated if necessary)
This mechanism allows for predefined named configurations to be
checked in to the source tree, as a directory config/<name> containing
all of the required header files.
The mechanism also allows for users to define multiple local
configurations, by creating header files in the directory
config/local/<name>.
Note that the config/*.h files which are used only to configure
internal iPXE APIs (e.g. config/ioapi.h) cannot be modified via a
named configuration. This avoids rebuilding the entire iPXE codebase
whenever switching to a different named configuration.
Inspired-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config/general.h')
-rw-r--r-- | src/config/general.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config/general.h b/src/config/general.h index 72cfc3b86..539203457 100644 --- a/src/config/general.h +++ b/src/config/general.h @@ -182,6 +182,9 @@ FILE_LICENCE ( GPL2_OR_LATER ); #undef GDBUDP /* Remote GDB debugging over UDP * (both may be set) */ +#include <config/named.h> +#include NAMED_CONFIG(general.h) #include <config/local/general.h> +#include LOCAL_NAMED_CONFIG(general.h) #endif /* CONFIG_GENERAL_H */ |