summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-10-11 18:45:38 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-10-12 17:47:36 +0100
commit140281898f21f707582f395918e5234bdb67e435 (patch)
treef6445e34c872c22357a6a5e2616f8931170ceeb9
parent20c0339311df0a14229c2786ecf6440bd8c1fd61 (diff)
elide all dependencies on .hdl files, they're ~all duplicated by .hpp
Also - verified that codemaker touches both .hdl and .hpp regardless of whether the contents changed in anyway under gbuild. Change-Id: I391e9cf952c61a6c59087cd7cd0ddc8c54a14df3
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.hxx2
-rw-r--r--solenv/bin/concat-deps.c43
2 files changed, 36 insertions, 9 deletions
diff --git a/avmedia/source/gstreamer/gstframegrabber.hxx b/avmedia/source/gstreamer/gstframegrabber.hxx
index 0b87c7430862..e5ce553a3779 100644
--- a/avmedia/source/gstreamer/gstframegrabber.hxx
+++ b/avmedia/source/gstreamer/gstframegrabber.hxx
@@ -21,7 +21,7 @@
#define _FRAMEGRABBER_HXX
#include "gstplayer.hxx"
-#include "com/sun/star/media/XFrameGrabber.hdl"
+#include <com/sun/star/media/XFrameGrabber.hpp>
#include <cppuhelper/implbase2.hxx>
namespace avmedia { namespace gstreamer {
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 5180f46a6a78..11571ee5c756 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -710,11 +710,34 @@ static inline void eat_space(char ** token)
}
}
+/*
+ * Prune LibreOffice specific duplicate dependencies to improve
+ * gnumake startup time, and shrink the disk-space footprint.
+ */
+static inline int elide_dependency(const char* key, int key_len)
+{
+#if 0
+ {
+ int i;
+ fprintf (stderr, "elide?!: '");
+ for (i = 0; i < key_len; i++) {
+ fprintf (stderr, "%c", key[i]);
+ }
+ fprintf (stderr, "'\n");
+ }
+#endif
+
+ /* .hdl files are always matched by .hpp */
+ if (key_len > 4 && !strncmp(key + key_len - 4, ".hdl", 4))
+ return 1;
+ return 0;
+}
+
/* prefix paths to absolute */
static inline void print_fullpaths(char* line)
{
-char* token;
-char* end;
+ char* token;
+ char* end;
token = line;
eat_space(&token);
@@ -724,15 +747,16 @@ char* end;
while (*end && (' ' != *end) && ('\t' != *end)) {
++end;
}
- if(*token == ':' || *token == '\\' || *token == '/' || *token == '$'
- || ':' == token[1])
+ int token_len = end - token;
+ if(elide_dependency(token, token_len))
+ ; /* don't output it */
+ else if(*token == ':' || *token == '\\' || *token == '/' ||
+ *token == '$' || ':' == token[1])
{
- fwrite(token, end - token, 1, stdout);
+ fwrite(token, token_len, 1, stdout);
}
else
{
- fputs(base_dir_var, stdout);
- fputc('/', stdout);
fwrite(token, end - token, 1, stdout);
}
fputc(' ', stdout);
@@ -741,6 +765,7 @@ char* end;
}
}
+
static int _process(struct hash* dep_hash, char* fn)
{
int rc;
@@ -795,7 +820,9 @@ off_t size;
* these are the one for which we want to filter
* duplicate out
*/
- if(hash_store(dep_hash, base, (int)(cursor_out - base)))
+ int key_len = cursor_out - base;
+ if(!elide_dependency(base,key_len - 1) &&
+ hash_store(dep_hash, base, key_len))
{
/* DO NOT modify base after it has been added
as key by hash_store */