[gPXE-devel] [PATCH] [config] Local config support.
Piotr Jaroszyński
p.jaroszynski at gmail.com
Mon Mar 22 18:19:00 EDT 2010
Include config/local/$file in config/$file where it makes sense and
create empty local configs during build if not present.
---
src/.gitignore | 1 -
src/Makefile.housekeeping | 19 +++++++++++++++++++
src/config/.gitignore | 1 +
src/config/console.h | 2 ++
src/config/general.h | 2 ++
src/config/ioapi.h | 2 ++
src/config/isa.h | 2 ++
src/config/nap.h | 2 ++
src/config/serial.h | 2 ++
src/config/timer.h | 2 ++
src/config/umalloc.h | 2 ++
11 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/src/.gitignore b/src/.gitignore
index 413f814..cc8e33e 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -2,4 +2,3 @@
.echocheck
TAGS*
bin*
-config-local.h
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 7e7ad76..9a74ce5 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -923,6 +923,25 @@ CLEANUP += $(ICCFIX)
###############################################################################
#
+# Local configs
+#
+LOCAL_CONFIGS = console.h general.h ioapi.h isa.h nap.h serial.h timer.h \
+ umalloc.h
+
+ifeq ($(wildcard config/local),)
+$(shell $(MKDIR) config/local)
+endif
+
+$(shell \
+for lc in $(LOCAL_CONFIGS) ; do \
+ if ! test -f config/local/$$lc ; then \
+ touch config/local/$$lc ; \
+ fi ; \
+done \
+)
+
+###############################################################################
+#
# Auto-incrementing build serial number. Append "bs" to your list of
# build targets to get a serial number printed at the end of the
# build. Enable -DBUILD_SERIAL in order to see it when the code runs.
diff --git a/src/config/.gitignore b/src/config/.gitignore
index 8e94f32..5a61a26 100644
--- a/src/config/.gitignore
+++ b/src/config/.gitignore
@@ -1 +1,2 @@
.buildserial.*
+local/
diff --git a/src/config/console.h b/src/config/console.h
index be3242d..586e371 100644
--- a/src/config/console.h
+++ b/src/config/console.h
@@ -20,4 +20,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
//#define CONSOLE_BTEXT /* Who knows what this does? */
//#define CONSOLE_PC_KBD /* Direct access to PC keyboard */
+#include <config/local/console.h>
+
#endif /* CONFIG_CONSOLE_H */
diff --git a/src/config/general.h b/src/config/general.h
index 0a9e625..bfab5b6 100644
--- a/src/config/general.h
+++ b/src/config/general.h
@@ -145,4 +145,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#undef GDBUDP /* Remote GDB debugging over UDP
* (both may be set) */
+#include <config/local/general.h>
+
#endif /* CONFIG_GENERAL_H */
diff --git a/src/config/ioapi.h b/src/config/ioapi.h
index 8ddd557..ce19c6d 100644
--- a/src/config/ioapi.h
+++ b/src/config/ioapi.h
@@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
//#undef PCIAPI_PCBIOS /* Access via PCI BIOS */
//#define PCIAPI_DIRECT /* Direct access via Type 1 accesses */
+#include <config/local/ioapi.h>
+
#endif /* CONFIG_IOAPI_H */
diff --git a/src/config/isa.h b/src/config/isa.h
index 523be1c..e2a0505 100644
--- a/src/config/isa.h
+++ b/src/config/isa.h
@@ -12,4 +12,6 @@
#undef ISA_PROBE_ADDRS /* e.g. 0x200, 0x300 */
#undef ISA_PROBE_ONLY /* Do not probe any other addresses */
+#include <config/local/isa.h>
+
#endif /* CONFIG_ISA_H */
diff --git a/src/config/nap.h b/src/config/nap.h
index 1b98135..187af42 100644
--- a/src/config/nap.h
+++ b/src/config/nap.h
@@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
//#undef NAP_PCBIOS
//#define NAP_NULL
+#include <config/local/nap.h>
+
#endif /* CONFIG_NAP_H */
diff --git a/src/config/serial.h b/src/config/serial.h
index 44272d1..8bb9311 100644
--- a/src/config/serial.h
+++ b/src/config/serial.h
@@ -32,4 +32,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define COMSTOP 1 /* Stop bits */
#endif
+#include <config/local/serial.h>
+
#endif /* CONFIG_SERIAL_H */
diff --git a/src/config/timer.h b/src/config/timer.h
index cc6a93d..abd6698 100644
--- a/src/config/timer.h
+++ b/src/config/timer.h
@@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
//#undef TIMER_PCBIOS
//#define TIMER_RDTSC
+#include <config/local/timer.h>
+
#endif /* CONFIG_TIMER_H */
diff --git a/src/config/umalloc.h b/src/config/umalloc.h
index 65febf1..245c6b4 100644
--- a/src/config/umalloc.h
+++ b/src/config/umalloc.h
@@ -11,4 +11,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <config/defaults.h>
+#include <config/local/umalloc.h>
+
#endif /* CONFIG_UMALLOC_H */
--
1.7.0.2
More information about the gPXE-devel
mailing list