summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-02-24 09:02:28 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2005-02-24 09:02:28 +0000
commit4fa1b26d49f048c1ea262c57c6aadab8f59817a5 (patch)
tree75caa678ae86269052b9781a4b399c1aebd7f7cd
parent71afeead9f419f547b81c7440124efe7d27960fe (diff)
downloadmultiarch-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
-rwxr-xr-xcheck-multiarch-files15
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