ooo-build r15374 - in trunk: . bin
- From: jholesovsky svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15374 - in trunk: . bin
- Date: Thu, 19 Feb 2009 15:54:16 +0000 (UTC)
Author: jholesovsky
Date: Thu Feb 19 15:54:16 2009
New Revision: 15374
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15374&view=rev
Log:
2009-02-18 Jan Holesovsky <kendy suse cz>
* bin/split-library.pl: Tool to help you to split a library into more
ones.
* bin/create-gitignores.pl: Ignore .svn.
Added:
trunk/bin/split-library.pl (contents, props changed)
Modified:
trunk/ChangeLog
trunk/bin/create-gitignores.sh
Modified: trunk/bin/create-gitignores.sh
==============================================================================
--- trunk/bin/create-gitignores.sh (original)
+++ trunk/bin/create-gitignores.sh Thu Feb 19 15:54:16 2009
@@ -22,6 +22,7 @@
unxlng*.pro
unxlngi6
localize.sdf
+.svn
/solver
*.orig
autom4te.cache/
Added: trunk/bin/split-library.pl
==============================================================================
--- (empty file)
+++ trunk/bin/split-library.pl Thu Feb 19 15:54:16 2009
@@ -0,0 +1,62 @@
+#!/usr/bin/perl -w
+
+# Tool to help you to split a library into more ones. Choose one or more
+# objects (let's say <blah>.o) that you need in the library, and:
+#
+# cd unxlng*.pro/slo
+# for I in *.o ; do nm $I > ../symbols/${I/.o/.txt} ; done
+# cd ../symbols
+# [add the <blah>.txt's you need in the library to %closure (see below the escherex.txt as example)]
+# ./split-library.pl
+#
+# Result: On stdout, you see all the objects you need in the same library
+
+%undefined = ();
+%where_defined = ();
+
+sub read_symbols( $ )
+{
+ my ( $fname ) = @_;
+
+ my @undefined = ();
+
+ open FILE, "<$fname" || die "Cannot open $fname.\n";
+ while ( <FILE> ) {
+ if ( / [BTV] (.*)/ ) {
+ $where_defined{$1} = $fname;
+ }
+ elsif ( / U (.*)/ ) {
+ push @undefined, $1;
+ }
+ }
+ close FILE;
+
+ $undefined{$fname} = \ undefined;
+}
+
+my @files = split /\n/, `ls *.txt`;
+foreach $file ( @files ) {
+ read_symbols( $file ) if ( !( $file =~ /^\s*$/ ) );
+}
+
+%closure = ();
+
+$closure{'escherex.txt'} = 1;
+$closure{'eschesdo.txt'} = 1;
+
+my $something_added = 0;
+do {
+ $something_added = 0;
+ foreach $file ( keys %closure ) {
+ my $undef_ref = $undefined{$file};
+
+ foreach $undef ( @$undef_ref ) {
+ my $where = $where_defined{$undef};
+ if ( defined( $where ) && !defined( $closure{$where} ) ) {
+ $closure{$where} = 1;
+ $something_added = 1;
+ print "$where\n";
+ }
+ }
+ }
+} while ( $something_added );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]