Browse Source

[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 years ago
parent
commit
46d6ec7d77

+ 0
- 1
src/.gitignore View File

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

+ 8
- 1
src/Makefile.housekeeping View File

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

+ 2
- 0
src/config/console.h View File

20
 //#define	CONSOLE_BTEXT		/* Who knows what this does? */
20
 //#define	CONSOLE_BTEXT		/* Who knows what this does? */
21
 //#define	CONSOLE_PC_KBD		/* Direct access to PC keyboard */
21
 //#define	CONSOLE_PC_KBD		/* Direct access to PC keyboard */
22
 
22
 
23
+#include <config/local/console.h>
24
+
23
 #endif /* CONFIG_CONSOLE_H */
25
 #endif /* CONFIG_CONSOLE_H */

+ 2
- 0
src/config/general.h View File

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

+ 2
- 0
src/config/ioapi.h View File

14
 //#undef	PCIAPI_PCBIOS		/* Access via PCI BIOS */
14
 //#undef	PCIAPI_PCBIOS		/* Access via PCI BIOS */
15
 //#define	PCIAPI_DIRECT		/* Direct access via Type 1 accesses */
15
 //#define	PCIAPI_DIRECT		/* Direct access via Type 1 accesses */
16
 
16
 
17
+#include <config/local/ioapi.h>
18
+
17
 #endif /* CONFIG_IOAPI_H */
19
 #endif /* CONFIG_IOAPI_H */

+ 2
- 0
src/config/isa.h View File

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

+ 1
- 0
src/config/local/.gitignore View File

1
+*

+ 2
- 0
src/config/nap.h View File

14
 //#undef		NAP_PCBIOS
14
 //#undef		NAP_PCBIOS
15
 //#define		NAP_NULL
15
 //#define		NAP_NULL
16
 
16
 
17
+#include <config/local/nap.h>
18
+
17
 #endif /* CONFIG_NAP_H */
19
 #endif /* CONFIG_NAP_H */

+ 2
- 0
src/config/serial.h View File

32
 #define	COMSTOP		1		/* Stop bits */
32
 #define	COMSTOP		1		/* Stop bits */
33
 #endif
33
 #endif
34
 
34
 
35
+#include <config/local/serial.h>
36
+
35
 #endif /* CONFIG_SERIAL_H */
37
 #endif /* CONFIG_SERIAL_H */

+ 2
- 0
src/config/timer.h View File

14
 //#undef		TIMER_PCBIOS
14
 //#undef		TIMER_PCBIOS
15
 //#define		TIMER_RDTSC
15
 //#define		TIMER_RDTSC
16
 
16
 
17
+#include <config/local/timer.h>
18
+
17
 #endif /* CONFIG_TIMER_H */
19
 #endif /* CONFIG_TIMER_H */

+ 2
- 0
src/config/umalloc.h View File

11
 
11
 
12
 #include <config/defaults.h>
12
 #include <config/defaults.h>
13
 
13
 
14
+#include <config/local/umalloc.h>
15
+
14
 #endif /* CONFIG_UMALLOC_H */
16
 #endif /* CONFIG_UMALLOC_H */

Loading…
Cancel
Save