From 4fa1b26d49f048c1ea262c57c6aadab8f59817a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20Beauchesne?= Date: Thu, 24 Feb 2005 09:02:28 +0000 Subject: only check for multiarch files in the usual development directories, new heuristics --- check-multiarch-files | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'check-multiarch-files') 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 () { } # consume all inputs + exit 1 +} + while () { 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 () { 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 -- cgit v1.2.1