X-Git-Url: https://perl5.git.perl.org/metaconfig.git/blobdiff_plain/39eb4e6d9e373d9bbd92609e65531a300430309e..89b0533fba6d4d87301c0967fb15672f2e8b3cda:/U/modified/Loc.U diff --git a/U/modified/Loc.U b/U/modified/Loc.U index 3137371..c399bd7 100644 --- a/U/modified/Loc.U +++ b/U/modified/Loc.U @@ -75,11 +75,14 @@ make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \ shar sleep smail sort submit tail tar tbl tee test touch tr troff \ uname uniq uuname vi zcat zip -?LINT:extern _exe ?V::pth loclist trylist ?F:./loc test_h ?T:thisthing thing xxx dir file say _test DJGPP ?LINT:change PATH +?LINT:extern _exe +?LINT:change _egrep +?LINT:change _ln +?LINT:change _make : find out where common programs are echo " " echo "Locating common programs..." >&4 @@ -109,8 +112,8 @@ for dir in \$*; do ?X: permission. A -r test would handle that, but since ./loc is ?X: also used to find executables (which are installed w/o read ?X: permission on SCO ODT 3.0, we can't include the -r test. -?X: If you need to use _exe (different from .exe) -?X: you need to set it on comand line: -D_exe=... +?X: If you need to use an _exe that is different from .exe +?X: you need to set it in Head.U. for thisthing in \$dir/\$thing; do : just loop through to pick last item done @@ -123,9 +126,10 @@ for dir in \$*; do elif test -f \$dir/\$thing.exe; then if test -n "$DJGPP"; then echo \$dir/\$thing.exe - else + elif test "$eunicefix" != ":"; then : on Eunice apparently echo \$dir/\$thing + exit 0 fi exit 0 fi @@ -275,7 +279,7 @@ for file in $trylist; do '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac - eval $file=$xxx + eval $file=$xxx$_exe eval _$file=$xxx case "$xxx" in /*) @@ -292,28 +296,44 @@ for file in $trylist; do esac done case "$egrep" in -*egrep*) +egrep) echo "Substituting grep for egrep." egrep=$grep + _egrep=$grep ;; esac @if ln case "$ln" in -*ln*) +ln) echo "Substituting cp for ln." ln=$cp + _ln=$cp ;; esac -case "$make$gmake" in -*make*) - ;; -*) +@end +case "$make" in +make) + case "$gmake" in + gmake) echo "I can't find make or gmake, and my life depends on it." >&4 echo "Go find a public domain implementation or fix your PATH setting!" >&4 exit 1 ;; + esac + ;; +esac +case "$gmake" in +gmake) ;; +*) # We can't have osname yet. + if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS + # Assume that gmake, if found, is definitely GNU make + # and prefer it over the system make. + echo "Substituting gmake for make." + make=$gmake + _make=$gmake + fi + ;; esac -@end case "$test" in test) echo "Hopefully test is built into your sh."