summaryrefslogtreecommitdiffstats
path: root/kernel/dependencies.pl
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/dependencies.pl')
-rw-r--r--kernel/dependencies.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/dependencies.pl b/kernel/dependencies.pl
new file mode 100644
index 000000000..10663b56b
--- /dev/null
+++ b/kernel/dependencies.pl
@@ -0,0 +1,12 @@
+use strict;
+
+use MDK::Common;
+use list_modules;
+
+my $depfile = shift @ARGV;
+load_dependencies($depfile);
+print STDERR "Loaded dependencies from $depfile\n";
+
+my @modules = uniq(map { dependencies_closure($_) } @ARGV);
+print join " ", map { "$_.o" } @modules;
+print "\n";