source: tags/svn.1.5.4/SOURCE_TOOLS/gen_dep.pl

Last change on this file was 7819, checked in by westram, 13 years ago

merge from dev [7774] [7778] [7779] [7780] [7781] [7782] [7783] [7784] [7785] [7786] [7787] [7788] [7789] [7790] [7791] [7792] [7793] [7794] [7795] [7796] [7817]

  • fixes/improvements to build ARB on multicores
    • made dependencies between targets explicit (let make resolve them)
    • fixed several failures caused by async calls ('dep_graph', 'up', tests)
    • try to make 'perl' 1st ("big target")
  • other changes
    • ctags (bug in 5.8; tag-order)
    • removed obsolete things from Makefiles
    • added SOURCE_TOOLS/remake_after_change.pl (call from ARB subdirs, knows what to do)
    • tests use own ARB_PID (no clash with running ARB)
  • Property svn:executable set to *
File size: 813 bytes
Line 
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6sub get_depends($) {
7  my ($lib) = @_;
8  my @depends = ();
9
10  my $cmd = './needed_libs.pl -D -U -n '.$lib;
11  # print "cmd=$cmd\n";
12
13  open(DEPENDS,$cmd.'|') || die "failed to execute '$cmd' (exitcode=$?)";
14  foreach (<DEPENDS>) {
15    chomp;
16    my @d = split(/ /,$_);
17    foreach (@d) { push @depends, $_; }
18  }
19  close(DEPENDS);
20
21  return @depends;
22}
23
24sub main() {
25  my $args = scalar(@ARGV);
26  if ($args!=1) {
27    die "Usage: gen_dep.pl suffix\nFilter to create dep.*-files\n";
28  }
29
30  my $suffix = shift @ARGV;
31  foreach my $lib (<>) {
32    chomp($lib);
33
34    my @depends_on = get_depends($lib);
35
36    my $base = $lib;
37    $base =~ s/\.(a|o|so)$//;
38
39    print "$base.$suffix:";
40    foreach (@depends_on) {
41      print " $_.$suffix";
42    }
43    print "\n";
44  }
45}
46main();
47
Note: See TracBrowser for help on using the repository browser.