build: don't use -s flag for `which`
authorKevin Bullock <>
Fri, 29 Aug 2014 12:06:31 +0200
changeset 22308 246b6a9c8d8fed0f5f161018c9e153d66753c3e5
parent 22307 63ed188e3fc7df134ca472b1503fd6800472e708
child 22309 a65697c3f20e674499b8fa259af5a5b417dc72e1
push id1
push dateWed, 18 Mar 2015 16:34:57 +0000
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.
--- a/Makefile
+++ b/Makefile
@@ -130,17 +130,17 @@ i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n
         # work on a temporary copy for never having a half completed target
 	cp $@ $@.tmp
 	msgmerge --no-location --update $@.tmp $^
 	mv -f $@.tmp $@
 # Packaging targets
-	@which -s bdist_mpkg || \
+	@which bdist_mpkg >/dev/null || \
 	   (echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
 	mkdir -p packages/osx
 	rm -rf dist/mercurial-*.mpkg
 	mv dist/mercurial*macosx*.zip packages/osx
 	mkdir -p packages/fedora