solenv/bin/concat-deps.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
New commits: commit f893618745f8ca12533a6bcedbc224e4b9ee3479 Author: Michael Stahl <mst...@redhat.com> Date: Wed Oct 24 14:33:43 2012 +0200 concat-deps: fix breakage introduced by eliding: The call to elide_dependency in _process was broken because it checked the full line, which ends with " : " usually, breaking the build with LO customised GNU make on cygwin. (regression from 140281898f21f707582f395918e5234bdb67e435) Also handle empty lines following '\' better while at it. Change-Id: Iadc6349e5b6930945e46e244bcbee37a632e0d71 diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index ccc117f..d2d9d50 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -811,6 +811,17 @@ static inline void print_fullpaths(char* line) } } +static inline char * eat_space_at_end(char * end) +{ + assert('\0' == *end); + char * real_end = end - 1; + while (' ' == *real_end || '\t' == *real_end || '\n' == *real_end + || ':' == *real_end) + { /* eat colon and whitespace at end */ + --real_end; + } + return real_end; +} static int _process(struct hash* dep_hash, char* fn) { @@ -866,8 +877,8 @@ off_t size; * these are the one for which we want to filter * duplicate out */ - int key_len = cursor_out - base; - if(!elide_dependency(base,key_len - 1, NULL) && + int key_len = eat_space_at_end(cursor_out) - base; + if(!elide_dependency(base,key_len + 1, NULL) && hash_store(dep_hash, base, key_len)) { /* DO NOT modify base after it has been added @@ -882,6 +893,7 @@ off_t size; print_fullpaths(base); putc('\n', stdout); } + last_ns = ' '; // cannot hurt to reset it } cursor += 1; base = cursor_out = cursor; @@ -892,6 +904,7 @@ off_t size; * i.e not a complete rule yet */ *cursor_out++ = *cursor++; + continuation = 0; // cancel current one (empty lines!) } } else @@ -910,7 +923,9 @@ off_t size; { if(last_ns == ':') { - if(hash_store(dep_hash, base, (int)(cursor_out - base))) + int key_len = eat_space_at_end(cursor_out) - base; + if (!elide_dependency(base,key_len + 1, NULL) && + hash_store(dep_hash, base, key_len)) { puts(base); putc('\n', stdout); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits