From a53586f4efe26b8875107d04001f4ecec760c343 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sat, 26 Jan 2013 21:19:13 +0100 Subject: gbuild: do not copy boost headers around - do not use gb_UnpackedTarball_copy_header_files for boost - adapt the optimization in concat-deps.c for new path - use boost_headers in all LinkTargets that require it - add explicit include paths to mysqlc, mysqlcppconn, libvisio, liborcus Change-Id: I0c43e73ed43cc9d2e6bce8faf55e992d655a0bb9 --- solenv/bin/concat-deps.c | 56 +++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) (limited to 'solenv/bin') diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index 19e4c9ad7f77..2a0889de4e6b 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -717,8 +717,7 @@ static inline void eat_space(char ** token) * gnumake startup time, and shrink the disk-space footprint. */ static inline int -elide_dependency(const char* key, int key_len, - int *boost_count, const char **unpacked_end) +elide_dependency(const char* key, int key_len, const char **unpacked_end) { #if 0 { @@ -733,30 +732,12 @@ elide_dependency(const char* key, int key_len, /* boost brings a plague of header files */ int i; - int boost = 0; int unpacked = 0; /* walk down path elements */ for (i = 0; i < key_len - 1; i++) { if (key[i] == '/') { - if (internal_boost) - { - if (0 == boost) - { - if (!PATHNCMP(key + i + 1, "solver/", 7)) - { - boost++; - continue; - } - } - else if (!PATHNCMP(key + i + 1, "inc/external/boost/", 19)) - { - if (boost_count) - (*boost_count)++; - return 1; - } - } if (0 == unpacked) { if (!PATHNCMP(key + i + 1, "workdir/", 8)) @@ -826,23 +807,30 @@ static inline void print_fullpaths(char* line) } int token_len = end - token; if (target_seen && - elide_dependency(token, token_len, &boost_count, &unpacked_end)) + elide_dependency(token, token_len, &unpacked_end)) { if (unpacked_end) { - emit_unpacked_target(token, unpacked_end); + if (internal_boost && !PATHNCMP(unpacked_end - 5, "boost", 5)) + { + ++boost_count; + if (boost_count == 1) + emit_single_boost_header(); + else + { + /* don't output, and swallow trailing \\\n if any */ + token = end; + eat_space(&token); + if (token[0] == '\\' && token[1] == '\n') + end = token + 2; + } + } + else + { + emit_unpacked_target(token, unpacked_end); + } unpacked_end = 0; } - else if (boost_count == 1) - emit_single_boost_header(); - else - { - /* don't output, and swallow trailing \\\n if any */ - token = end; - eat_space(&token); - if (token[0] == '\\' && token[1] == '\n') - end = token + 2; - } } else { @@ -938,7 +926,7 @@ off_t size; * duplicate out */ int key_len = eat_space_at_end(cursor_out) - base; - if (!elide_dependency(base,key_len + 1, NULL, NULL) + if (!elide_dependency(base,key_len + 1, NULL) && hash_store(dep_hash, base, key_len)) { /* DO NOT modify base after it has been added @@ -984,7 +972,7 @@ off_t size; if(last_ns == ':') { int key_len = eat_space_at_end(cursor_out) - base; - if (!elide_dependency(base,key_len + 1, NULL, NULL) && + if (!elide_dependency(base,key_len + 1, NULL) && hash_store(dep_hash, base, key_len)) { puts(base); -- cgit