From 071f9c3aa2c2215feaa56a8ff59557dd00b27f37 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 27 Mar 2008 22:01:38 +0000 Subject: [PATCH] Build configurations shouldn't be done in svn controlled files, so I finally created a solution to avoid that: Header files that contain configuration settings (and nothing else) go to build/config_headers. To change settings, create a directory build/user_config_headers (which is ignored by svn), copy the respective header there and modify it at your leisure. Currently only tracing_config.h has been moved to the new location, but more files will follow eventually. It is also recommended to move optional macro definitions in Jamfile (as for BFS) to a config header instead; the build system will then automatically rebuild on changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24611 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../private/kernel => build/config_headers}/tracing_config.h | 0 build/jam/BuildSetup | 4 ++++ build/jam/OverriddenJamRules | 3 ++- headers/private/kernel/tracing.h | 2 +- src/kits/app/Message.cpp | 2 +- src/system/kernel/arch/x86/arch_interrupts.S | 3 ++- src/system/libroot/posix/malloc/wrapper.cpp | 4 ++-- src/system/runtime_loader/elf.cpp | 3 ++- 8 files changed, 14 insertions(+), 7 deletions(-) rename {headers/private/kernel => build/config_headers}/tracing_config.h (100%) diff --git a/headers/private/kernel/tracing_config.h b/build/config_headers/tracing_config.h similarity index 100% rename from headers/private/kernel/tracing_config.h rename to build/config_headers/tracing_config.h diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index c121f67b69..1f9cc57a4b 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -113,6 +113,10 @@ HAIKU_BONE_COMPATIBLE_PLATFORMS = haiku bone dano haiku_host ; HAIKU_DANO_COMPATIBLE_PLATFORMS = haiku dano haiku_host ; HAIKU_HAIKU_COMPATIBLE_PLATFORMS = haiku haiku_host ; +# configuration header directories +HAIKU_CONFIG_HEADERS = [ FDirName $(HAIKU_TOP) build user_config_headers ] + [ FDirName $(HAIKU_TOP) build config_headers ] ; + #pragma mark - diff --git a/build/jam/OverriddenJamRules b/build/jam/OverriddenJamRules index 1712f81b69..c6ad7ce3cf 100644 --- a/build/jam/OverriddenJamRules +++ b/build/jam/OverriddenJamRules @@ -69,7 +69,8 @@ rule Object # yacc, lex, etc) are located in $(LOCATE_TARGET), possibly # different from $(SEARCH_SOURCE). - headers = $(SEARCH_SOURCE) $(SUBDIRHDRS) $(HDRS) ; + headers = $(HAIKU_CONFIG_HEADERS) $(SEARCH_SOURCE) $(SUBDIRHDRS) + $(HDRS) ; sysHeaders = $(SUBDIRSYSHDRS) $(SYSHDRS) ; defines = $(DEFINES) ; diff --git a/headers/private/kernel/tracing.h b/headers/private/kernel/tracing.h index c31b15c1d3..3d0f8be8c5 100644 --- a/headers/private/kernel/tracing.h +++ b/headers/private/kernel/tracing.h @@ -7,7 +7,7 @@ #include -#include +#include "tracing_config.h" struct trace_entry { diff --git a/src/kits/app/Message.cpp b/src/kits/app/Message.cpp index 9bccbb6731..55efb1ddad 100644 --- a/src/kits/app/Message.cpp +++ b/src/kits/app/Message.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include "tracing_config.h" // kernel tracing configuration #define DEBUG_FUNCTION_ENTER //debug_printf("thread: 0x%x; this: 0x%08x; header: 0x%08x; fields: 0x%08x; data: 0x%08x; line: %04ld; func: %s\n", find_thread(NULL), this, fHeader, fFields, fData, __LINE__, __PRETTY_FUNCTION__); diff --git a/src/system/kernel/arch/x86/arch_interrupts.S b/src/system/kernel/arch/x86/arch_interrupts.S index 185e4e0431..ace4dd59db 100644 --- a/src/system/kernel/arch/x86/arch_interrupts.S +++ b/src/system/kernel/arch/x86/arch_interrupts.S @@ -12,7 +12,8 @@ #include #include #include -#include + +#include "tracing_config.h" #include "asm_offsets.h" #include "syscall_numbers.h" diff --git a/src/system/libroot/posix/malloc/wrapper.cpp b/src/system/libroot/posix/malloc/wrapper.cpp index db4832b442..99ce9e64a1 100644 --- a/src/system/libroot/posix/malloc/wrapper.cpp +++ b/src/system/libroot/posix/malloc/wrapper.cpp @@ -24,13 +24,13 @@ #include "processheap.h" #include "arch-specific.h" -#include - #include #include #include +#include "tracing_config.h" + using namespace BPrivate; diff --git a/src/system/runtime_loader/elf.cpp b/src/system/runtime_loader/elf.cpp index 5480882fa6..56fc78ca2a 100644 --- a/src/system/runtime_loader/elf.cpp +++ b/src/system/runtime_loader/elf.cpp @@ -24,10 +24,11 @@ #include #include #include -#include #include #include +#include "tracing_config.h" + //#define TRACE_RLD #ifdef TRACE_RLD