summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-10-02 13:15:46 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-10-02 13:15:46 +0100
commita4bda322a9a8e2d1fe7909771cf8fbd47904ced2 (patch)
tree5dacdb6790aef3ac2a269129bee3175fa56e1ffc /tools
parent72b20fbd4549d406becd95c102c462b751032de1 (diff)
downloadnetsurf-a4bda322a9a8e2d1fe7909771cf8fbd47904ced2.tar.gz
linktrace: It'd help if I'd added the tool
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/linktrace-to-depfile.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/linktrace-to-depfile.pl b/tools/linktrace-to-depfile.pl
new file mode 100644
index 000000000..8607baa1e
--- /dev/null
+++ b/tools/linktrace-to-depfile.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Cwd qw(abs_path);
+
+my %deps;
+
+while (my $line = <>) {
+ chomp $line;
+ if ($line =~ /\(([^)]+)/) {
+ $deps{abs_path($1)} = 1;
+ }
+}
+
+my @deps = keys %deps;
+
+print join("\t\\\n\t", @deps), "\n";
+