Patchwork build: don't use -s flag for `which`

login
register
mail settings
Submitter Kevin Bullock
Date Aug. 29, 2014, 10:10 a.m.
Message ID <c506e2bdaee21615f111.1409307046@billings.local>
Download mbox | patch
Permalink /patch/5621/
State Accepted
Headers show

Comments

Kevin Bullock - Aug. 29, 2014, 10:10 a.m.
# HG changeset patch
# User Kevin Bullock <kbullock@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.
Matt Mackall - Aug. 29, 2014, 3:16 p.m.
On Fri, 2014-08-29 at 12:10 +0200, Kevin Bullock wrote:
> # HG changeset patch
> # User Kevin Bullock <kbullock@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`

Queued for default, thanks.

Patch

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