Bläddra i källkod

[build] Add support for local configuration files

Include config/local/$file in config/$file where it makes sense and
create empty local configs during build if not present.

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
tags/v1.20.1
Piotr Jaroszyński 14 år sedan
förälder
incheckning
46d6ec7d77

+ 0
- 1
src/.gitignore Visa fil

@@ -2,4 +2,3 @@
2 2
 .echocheck
3 3
 TAGS*
4 4
 bin*
5
-config-local.h

+ 8
- 1
src/Makefile.housekeeping Visa fil

@@ -468,7 +468,7 @@ define src_template
468 468
 	@$(RM) $(2)
469 469
 	@$(TOUCH) $(2)
470 470
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
471
-		-Wno-error -MM $(1) -MG -MP | \
471
+		-Wno-error -M $(1) -MG -MP | \
472 472
 		sed 's/\.o\s*:/_DEPS =/' >> $(2)
473 473
 	@$(ECHO_E) '\n$$(BIN)/$(4).o :' \
474 474
 		 '$(1) $$(MAKEDEPS) $$(POST_O_DEPS) $$($(4)_DEPS)' \
@@ -921,6 +921,13 @@ $(ICCFIX) : util/iccfix.c $(MAKEDEPS)
921 921
 	$(Q)$(HOST_CC) -idirafter include -O2 -o $@ $<
922 922
 CLEANUP += $(ICCFIX)
923 923
 
924
+###############################################################################
925
+#
926
+# Local configs
927
+#
928
+config/local/%.h :
929
+	$(Q)touch $@
930
+
924 931
 ###############################################################################
925 932
 #
926 933
 # Auto-incrementing build serial number.  Append "bs" to your list of

+ 2
- 0
src/config/console.h Visa fil

@@ -20,4 +20,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
20 20
 //#define	CONSOLE_BTEXT		/* Who knows what this does? */
21 21
 //#define	CONSOLE_PC_KBD		/* Direct access to PC keyboard */
22 22
 
23
+#include <config/local/console.h>
24
+
23 25
 #endif /* CONFIG_CONSOLE_H */

+ 2
- 0
src/config/general.h Visa fil

@@ -145,4 +145,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
145 145
 #undef	GDBUDP			/* Remote GDB debugging over UDP
146 146
 				 * (both may be set) */
147 147
 
148
+#include <config/local/general.h>
149
+
148 150
 #endif /* CONFIG_GENERAL_H */

+ 2
- 0
src/config/ioapi.h Visa fil

@@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
14 14
 //#undef	PCIAPI_PCBIOS		/* Access via PCI BIOS */
15 15
 //#define	PCIAPI_DIRECT		/* Direct access via Type 1 accesses */
16 16
 
17
+#include <config/local/ioapi.h>
18
+
17 19
 #endif /* CONFIG_IOAPI_H */

+ 2
- 0
src/config/isa.h Visa fil

@@ -12,4 +12,6 @@
12 12
 #undef	ISA_PROBE_ADDRS		/* e.g. 0x200, 0x300 */
13 13
 #undef	ISA_PROBE_ONLY		/* Do not probe any other addresses */
14 14
 
15
+#include <config/local/isa.h>
16
+
15 17
 #endif /* CONFIG_ISA_H */

+ 1
- 0
src/config/local/.gitignore Visa fil

@@ -0,0 +1 @@
1
+*

+ 2
- 0
src/config/nap.h Visa fil

@@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
14 14
 //#undef		NAP_PCBIOS
15 15
 //#define		NAP_NULL
16 16
 
17
+#include <config/local/nap.h>
18
+
17 19
 #endif /* CONFIG_NAP_H */

+ 2
- 0
src/config/serial.h Visa fil

@@ -32,4 +32,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
32 32
 #define	COMSTOP		1		/* Stop bits */
33 33
 #endif
34 34
 
35
+#include <config/local/serial.h>
36
+
35 37
 #endif /* CONFIG_SERIAL_H */

+ 2
- 0
src/config/timer.h Visa fil

@@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
14 14
 //#undef		TIMER_PCBIOS
15 15
 //#define		TIMER_RDTSC
16 16
 
17
+#include <config/local/timer.h>
18
+
17 19
 #endif /* CONFIG_TIMER_H */

+ 2
- 0
src/config/umalloc.h Visa fil

@@ -11,4 +11,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
11 11
 
12 12
 #include <config/defaults.h>
13 13
 
14
+#include <config/local/umalloc.h>
15
+
14 16
 #endif /* CONFIG_UMALLOC_H */

Laddar…
Avbryt
Spara