diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2005-02-24 09:02:28 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2005-02-24 09:02:28 +0000 |
commit | 4fa1b26d49f048c1ea262c57c6aadab8f59817a5 (patch) | |
tree | 75caa678ae86269052b9781a4b399c1aebd7f7cd /check-multiarch-files | |
parent | 71afeead9f419f547b81c7440124efe7d27960fe (diff) | |
download | multiarch-utils-4fa1b26d49f048c1ea262c57c6aadab8f59817a5.tar multiarch-utils-4fa1b26d49f048c1ea262c57c6aadab8f59817a5.tar.gz multiarch-utils-4fa1b26d49f048c1ea262c57c6aadab8f59817a5.tar.bz2 multiarch-utils-4fa1b26d49f048c1ea262c57c6aadab8f59817a5.tar.xz multiarch-utils-4fa1b26d49f048c1ea262c57c6aadab8f59817a5.zip |
only check for multiarch files in the usual development directories, new
heuristics
Diffstat (limited to 'check-multiarch-files')
-rwxr-xr-x | check-multiarch-files | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/check-multiarch-files b/check-multiarch-files index bb4bac7..c9fadab 100755 --- a/check-multiarch-files +++ b/check-multiarch-files @@ -11,14 +11,21 @@ use strict; use MDK::Common; +my $RPM_BUILD_ROOT = (shift); + +if (! -d $RPM_BUILD_ROOT ) { + while (<STDIN>) { } # consume all inputs + exit 1 +} + while (<STDIN>) { chomp; # File must be located in the usual development directories -f $_ or next; - /\/usr(\/X11R6)?\/(bin|include)\// or next; - /\/multiarch-.+-\w+\// and next; - /\/include\/asm/ and next; + m,^$RPM_BUILD_ROOT/usr(/X11R6)?/(bin|include)/, or next; + m,/multiarch-.+-\w+/, and next; + m,/include/asm, and next; my $multiarch = 0; my $multiarch_type; @@ -33,7 +40,7 @@ while (<STDIN>) { my $options; foreach (cat_($_)) { foreach my $opt (qw(cflags libs ldflags cppflags libdir libtool)) { - $options .= " --$opt" if /(\[--$opt\]|--$opt\s+([\#\[]|display))/; + $options .= " --$opt" if /(\[--$opt\]|--$opt\s+([\#\[]|display|print))/; } } # run the script to find out any libdir dependent flags |