summaryrefslogtreecommitdiffstats
path: root/check-multiarch-files
diff options
context:
space:
mode:
Diffstat (limited to 'check-multiarch-files')
-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