tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: default TOOLDIR



apb%cequrux.com@localhost wrote:
> > - Should we also check
> > ${guess_TOOLDIR}/obj/bin/${toolprefix}make and
> > ${guess_TOOLDIR}/obj.${MACHINE}/bin/${toolprefix}make
> > in try_set_TOOLDIR()?
> 
> If you think that will help, sure.
This patch seems to work fine on Cygwin,
but is there any better expression?
(I'm not familiar with sh scripts)
---
--- /usr/src/build.sh.0 2008年08月24日 00:20:40.000000000 +0900
+++ /usr/src/build.sh 2008年10月25日 01:46:50.000000000 +0900
@@ -901,11 +901,15 @@
 )-$(
 echo "${uname_p}" | sed -e 's/([^)]*)//g' -e 's/ /_/g'
 )"
- local guess_TOOLDIR="${TOP_objdir}/tooldir.${host_ostype}"
+ guess_TOOLDIRs="${TOP_objdir}/tooldir.${host_ostype} 
${TOP_objdir}/obj/tooldir.${host_ostype} 
${TOP_objdir}/obj.${MACHINE}/tooldir.${host_ostype}"
 
 # Look for a suitable ${toolprefix}make, nbmake, bmake, or make.
- guess_make="${guess_TOOLDIR}/bin/${toolprefix}make"
- [ -x "${guess_make}" ] || guess_make=""
+ for dir in ${guess_TOOLDIRs}; do
+ if [ -x "${dir}/bin/${toolprefix}make" ]; then
+ guess_make="${dir}/bin/${toolprefix}make"
+ break
+ fi
+ done
 : ${guess_make:=$(find_in_PATH ${toolprefix}make '')}
 : ${guess_make:=$(find_in_PATH nbmake '')}
 : ${guess_make:=$(find_in_PATH bmake '')}
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /