Skip to content

Commit

Permalink
[build] Add support for local configuration files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pjaroszynski authored and Michael Brown committed Mar 26, 2010
1 parent 80d1ac7 commit 46d6ec7
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/.gitignore
Expand Up @@ -2,4 +2,3 @@
.echocheck
TAGS*
bin*
config-local.h
9 changes: 8 additions & 1 deletion src/Makefile.housekeeping
Expand Up @@ -468,7 +468,7 @@ define src_template
@$(RM) $(2)
@$(TOUCH) $(2)
@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
-Wno-error -MM $(1) -MG -MP | \
-Wno-error -M $(1) -MG -MP | \
sed 's/\.o\s*:/_DEPS =/' >> $(2)
@$(ECHO_E) '\n$$(BIN)/$(4).o :' \
'$(1) $$(MAKEDEPS) $$(POST_O_DEPS) $$($(4)_DEPS)' \
Expand Down Expand Up @@ -921,6 +921,13 @@ $(ICCFIX) : util/iccfix.c $(MAKEDEPS)
$(Q)$(HOST_CC) -idirafter include -O2 -o $@ $<
CLEANUP += $(ICCFIX)

###############################################################################
#
# Local configs
#
config/local/%.h :
$(Q)touch $@

###############################################################################
#
# Auto-incrementing build serial number. Append "bs" to your list of
Expand Down
2 changes: 2 additions & 0 deletions src/config/console.h
Expand Up @@ -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 */
2 changes: 2 additions & 0 deletions src/config/general.h
Expand Up @@ -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 */
2 changes: 2 additions & 0 deletions src/config/ioapi.h
Expand Up @@ -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 */
2 changes: 2 additions & 0 deletions src/config/isa.h
Expand Up @@ -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 */
1 change: 1 addition & 0 deletions src/config/local/.gitignore
@@ -0,0 +1 @@
*
2 changes: 2 additions & 0 deletions src/config/nap.h
Expand Up @@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
//#undef NAP_PCBIOS
//#define NAP_NULL

#include <config/local/nap.h>

#endif /* CONFIG_NAP_H */
2 changes: 2 additions & 0 deletions src/config/serial.h
Expand Up @@ -32,4 +32,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define COMSTOP 1 /* Stop bits */
#endif

#include <config/local/serial.h>

#endif /* CONFIG_SERIAL_H */
2 changes: 2 additions & 0 deletions src/config/timer.h
Expand Up @@ -14,4 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
//#undef TIMER_PCBIOS
//#define TIMER_RDTSC

#include <config/local/timer.h>

#endif /* CONFIG_TIMER_H */
2 changes: 2 additions & 0 deletions src/config/umalloc.h
Expand Up @@ -11,4 +11,6 @@ FILE_LICENCE ( GPL2_OR_LATER );

#include <config/defaults.h>

#include <config/local/umalloc.h>

#endif /* CONFIG_UMALLOC_H */

0 comments on commit 46d6ec7

Please sign in to comment.