[PATCH] build: don't use -s flag for `which`

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Aug 29 05:10:46 CDT 2014


# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1409306791 -7200
#      Fri Aug 29 12:06:31 2014 +0200
# Node ID c506e2bdaee21615f111b2fff06c63215890403e
# Parent  926bc0d3b595caf37c5d70833a347eb43285de2f
build: don't use -s flag for `which`

`which -s` is a BSDism that doesn't exist on other versions of
`which`. That means that even on Mac OS X, `make osx` breaks if you have
another utils package installed (e.g. debianutils installed thru
fink). Redirect output to /dev/null instead.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -135,7 +135,7 @@ i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n
 # Packaging targets
 
 osx:
-	@which -s bdist_mpkg || \
+	@which bdist_mpkg >/dev/null || \
 	   (echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
 	bdist_mpkg setup.py
 	mkdir -p packages/osx


More information about the Mercurial-devel mailing list