solenv/bin/concat-deps.c | 55 ++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 22 deletions(-)
New commits: commit eed17d1f23bbefd5aae24cb7e75ecb37c8f28b4a Author: Michael Stahl <[email protected]> Date: Wed Nov 7 18:11:37 2012 +0100 concat-deps: tweak boost handling to depend on unpacked target Change-Id: Iae93f7a81959a5d9c23e9bddb65e6154655374e6 diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index c6177ce..813c39d 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -113,7 +113,7 @@ int internal_boost = 0; static char* base_dir; -static char* out_dir; +static char* work_dir; #ifdef __GNUC__ #define clz __builtin_clz @@ -785,13 +785,13 @@ elide_dependency(const char* key, int key_len, } /* - * We collapse tens of internal boost headers to a single one, such + * We collapse tens of internal boost headers to the unpacked target, such * that you can re-compile / install boost and all is well. */ static void emit_single_boost_header(void) { -#define BOOST_HEADER "/inc/external/boost/bind.hpp" - fprintf(stdout, "%s" BOOST_HEADER " ", out_dir); +#define BOOST_TARGET "/UnpackedTarball/boost.done" + fprintf(stdout, "%s" BOOST_TARGET " ", work_dir); } static void emit_unpacked_target(char const*const token, char const*const end) @@ -1038,7 +1038,7 @@ const char *env_str; _usage(); return 1; } - if(get_var(&base_dir, "SRCDIR") || get_var(&out_dir, "OUTDIR")) + if(get_var(&base_dir, "SRCDIR") || get_var(&work_dir, "WORKDIR")) return 1; env_str = getenv("SYSTEM_BOOST"); commit a8f357cffdf7242b86e3b0e276034069e1be13c2 Author: Michael Stahl <[email protected]> Date: Wed Nov 7 17:55:54 2012 +0100 concat-deps: on Windows, compare paths case-insensitively Change-Id: I5e5d9b39cb0440644bf3ffb8dca4913dc123f672 diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index 44d83f1..c6177ce 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -97,9 +97,11 @@ #ifdef __windows #define FILE_O_RDONLY _O_RDONLY #define FILE_O_BINARY _O_BINARY +#define PATHNCMP strncasecmp /* MSVC converts paths to lower-case sometimes? */ #else /* not windaube */ #define FILE_O_RDONLY O_RDONLY #define FILE_O_BINARY 0 +#define PATHNCMP strncmp #endif /* not windaube */ #ifndef TRUE @@ -730,7 +732,7 @@ elide_dependency(const char* key, int key_len, #endif /* .hdl files are always matched by .hpp */ - if (key_len > 4 && !strncmp(key + key_len - 4, ".hdl", 4)) + if (key_len > 4 && !PATHNCMP(key + key_len - 4, ".hdl", 4)) return 1; /* boost brings a plague of header files */ @@ -746,13 +748,13 @@ elide_dependency(const char* key, int key_len, { if (0 == boost) { - if (!strncmp(key + i + 1, "solver/", 7)) + if (!PATHNCMP(key + i + 1, "solver/", 7)) { boost++; continue; } } - else if (!strncmp(key + i + 1, "inc/external/boost/", 19)) + else if (!PATHNCMP(key + i + 1, "inc/external/boost/", 19)) { if (boost_count) (*boost_count)++; @@ -761,7 +763,7 @@ elide_dependency(const char* key, int key_len, } if (0 == unpacked) { - if (!strncmp(key + i + 1, "workdir/", 8)) + if (!PATHNCMP(key + i + 1, "workdir/", 8)) { unpacked = 1; continue; @@ -769,7 +771,7 @@ elide_dependency(const char* key, int key_len, } else { - if (!strncmp(key + i + 1, "UnpackedTarball/", 16)) + if (!PATHNCMP(key + i + 1, "UnpackedTarball/", 16)) { if (unpacked_end) *unpacked_end = strchr(key + i + 17, '/'); commit eb94d42df886db5c1ff56e57ac5da5e012bdead3 Author: Michael Stahl <[email protected]> Date: Wed Nov 7 17:43:03 2012 +0100 concat-deps: bin pointless duplication Change-Id: I8aedf930bc007bf83f8111db9a5565668142321e diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index ddbaf24..44d83f1 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -846,16 +846,9 @@ static inline void print_fullpaths(char* line) end = token + 2; } } - else if(*token == ':' || *token == '\\' || *token == '/' || - *token == '$' || ':' == token[1]) - { - if(fwrite(token, token_len, 1, stdout) != 1) - abort(); - fputc(' ', stdout); - } else { - if(fwrite(token, end - token, 1, stdout) != 1) + if (fwrite(token, token_len, 1, stdout) != 1) abort(); fputc(' ', stdout); } commit c8a8f5e669973cbbc57fe1ed2f87548cd3313714 Author: Michael Stahl <[email protected]> Date: Wed Nov 7 17:38:30 2012 +0100 concat-deps: properly recognize colon that follows target Should fix cases where for weirdly formatted input files the target was mangled erroneously. Change-Id: I28d94a6c714b5f893ac873f84fe2022e96cf1327 diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index 843cad1..ddbaf24 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -809,18 +809,25 @@ static inline void print_fullpaths(char* line) char* end; int boost_count = 0; const char * unpacked_end = 0; /* end of UnpackedTarget match (if any) */ - int first = 1; /* for UnpackedTarget the first (target) is GenCxxObject! */ + /* for UnpackedTarget the target is GenC{,xx}Object, dont mangle! */ + int target_seen = 0; token = line; eat_space(&token); while (*token) { end = token; - while (*end && (' ' != *end) && ('\t' != *end)) { + /* hard to believe that in this day and age drive letters still exist */ + if (*end && (':' == *(end+1)) && + (('\\' == *(end+2)) || ('/' == *(end+2))) && isalpha(*end)) + { + end = end + 3; /* only one cross, err drive letter per filename */ + } + while (*end && (' ' != *end) && ('\t' != *end) && (':' != *end)) { ++end; } int token_len = end - token; - if (!first && + if (target_seen && elide_dependency(token, token_len, &boost_count, &unpacked_end)) { if (unpacked_end) @@ -852,9 +859,18 @@ static inline void print_fullpaths(char* line) abort(); fputc(' ', stdout); } - first = 0; token = end; eat_space(&token); + if (!target_seen) + { + if (':' == *token) + { + target_seen = 1; + fputc(':', stdout); + ++token; + eat_space(&token); + } + } } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
