From 66e1416bb445a5b7b6fc0cc3fb753cd252195ca8 Mon Sep 17 00:00:00 2001 From: tg Date: Mon, 14 Jul 2008 14:59:20 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=A2=20handle=20perls=20without=20$^O=20be?= =?UTF-8?q?tter=20=E2=80=A2=20allow=20user=20to=20specify=20$PERL=20enviro?= =?UTF-8?q?nment=20variable=20containing=20path=20to=20the=20=20=20perl5?= =?UTF-8?q?=20interpreter=20to=20use,=20for=20Elias=20Pipping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Build.sh b/Build.sh index 7078ae6..322216c 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.341 2008/07/14 14:40:47 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.342 2008/07/14 14:59:20 tg Exp $' #- # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI @@ -1265,12 +1265,14 @@ cat >>test.sh <<-EOF fgrep MIRBSD '$srcdir/check.t' print "This shell is actually:\\n\\t\$KSH_VERSION" print 'test.sh built for mksh $dstversion' - perl=perl5 - \$perl -e print >/dev/null 2>&1 || perl=perl - perlos=\$(\$perl -e 'print "\$^O";') || exit 1 - print "Perl interpreter '\$perl' running on '\$perlos'" - [[ -n \$perlos ]] || exit 1 - exec \$perl '$srcdir/check.pl' -s '$srcdir/check.t' \\ + cstr='\$os = defined \$^O ? \$^O : "unknown"; print \$os;' + for perli in \$PERL perl5 perl no; do + [[ \$perli = no ]] && exit 1 + perlos=\$(\$perli -e "\$cstr") || continue + print "Perl interpreter '\$perli' running on '\$perlos'" + [[ -n \$perlos ]] && break + done + exec \$perli '$srcdir/check.pl' -s '$srcdir/check.t' \\ -p '$curdir/mksh' -C \${check_categories#,} \$*$tsts EOF chmod 755 test.sh