Patchwork [2,of,5,stable,osx-packaging,v2] osx: add support for dumping built dmg into OUTPUTDIR

login
register
mail settings
Submitter Augie Fackler
Date April 27, 2016, 3:45 p.m.
Message ID <ced65aad425150aa6d01.1461771952@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/14802/
State Superseded
Commit e2a553ae1edc78480bcb36e45a8d66b18db1aa2d
Headers show

Comments

Augie Fackler - April 27, 2016, 3:45 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1461038242 14400
#      Mon Apr 18 23:57:22 2016 -0400
# Branch stable
# Node ID ced65aad425150aa6d012cae692fcc1ae20f0ddc
# Parent  1d2e15aa68f73659a3f45907e2e035c5a3dc053b
osx: add support for dumping built dmg into OUTPUTDIR
Yuya Nishihara - April 29, 2016, 8:03 a.m.
On Wed, 27 Apr 2016 11:45:52 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1461038242 14400
> #      Mon Apr 18 23:57:22 2016 -0400
> # Branch stable
> # Node ID ced65aad425150aa6d012cae692fcc1ae20f0ddc
> # Parent  1d2e15aa68f73659a3f45907e2e035c5a3dc053b
> osx: add support for dumping built dmg into OUTPUTDIR
> 
> diff --git a/Makefile b/Makefile
> --- a/Makefile

> +	OUTPUTDIR=$${OUTPUTDIR:=packages/osx}
> +	mkdir -p $$OUTPUTDIR
> +	N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov $$OUTPUTDIR/$$N.dmg

make executes /bin/sh per line, so this doesn't work. But the final "osx"
rule at the PATCH 5 has no such problem.

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -161,8 +161,9 @@  osx:
 	rm -rf dist/mercurial-*.mpkg
 	python -m bdist_mpkg.script_bdist_mpkg setup.py --
 	python contrib/fixpax.py dist/mercurial-*.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
-	mkdir -p packages/osx
-	N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov packages/osx/$$N.dmg
+	OUTPUTDIR=$${OUTPUTDIR:=packages/osx}
+	mkdir -p $$OUTPUTDIR
+	N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov $$OUTPUTDIR/$$N.dmg
 	rm -rf dist/mercurial-*.mpkg
 
 deb: