source: tags/ms_r16q2/SOURCE_TOOLS/gen_dep.pl

Last change on this file was 8574, checked in by westram, 12 years ago
  • [8567] failed on WCs where shared libs were up-to-date, but not yet present in $ARBHOME/lib
    • link libs directly in $ARBHOME/lib
  • no longer create 'SHARED.a' in shared-library-dirs
  • unit tests caused build of 'SHARED.so' (instead of 'libSHARED.so'). Every library existed twice.
    • changed test-target-names for shared libaries (e.g. ARBDB/ARBDB.test → ARBDB/libARBDB.test)
    • added failing stopper targets to main-Makefile and shared-lib-Makefiles
  • changed all dependencies to shared libs
  • fixed dependency scripts to perform correct translations from lib/libUNIT.so ↔ UNIT/UNIT.(dummy|a). omg :/
  • updated predefined RESTRICT_LIB entries in UNIT_TESTER/Makefile.setup.template
    • check whether RESTRICT_LIB uses obsolete test-names (e.g. ARBDB instead of libARBDB) and fail if.
  • Property svn:executable set to *
File size: 866 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    if ($base =~ /^lib\/lib/) { $base = $'.'/'.$'; }
39
40    print "$base.$suffix:";
41    foreach (@depends_on) {
42      print " $_.$suffix";
43    }
44    print "\n";
45  }
46}
47main();
48
Note: See TracBrowser for help on using the repository browser.