D5269: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Thu Nov 29 07:10:35 EST 2018


yuja added a comment.


  > +which(1) could exit nonzero, but that's fine because we'll still end
  >  +up without a valid executable, so we don't need to check $? here.
  
  True, but the exit code is printed as `[1]`.
  
  > +  $ GMAKE=`which gmake`
  >  +  $ if [ -n "$GMAKE" -a -x $GMAKE ] ; then
  >  +  >     MAKE=$GMAKE
  
  Can you try this?
  
    if which gmake >/dev/null 2>&1; then
        MAKE=gmake
    else
        MAKE=make
    fi
  
  If `which gmake` exits with 0, `MAKE=gmake` should work.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5269

To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list