[PATCH 1 of 6 STABLE V2] make: turn ubuntu docker into template

Yuya Nishihara yuya at tcha.org
Fri Apr 29 05:39:12 EDT 2016


On Wed, 27 Apr 2016 11:12:04 -0700, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean at farley.io>
> # Date 1461738797 25200
> #      Tue Apr 26 23:33:17 2016 -0700
> # Branch stable
> # Node ID f2e879f9f08606a580dfb55e9ac1c6d8d9caf649
> # Parent  87d4a6c5567e81386b8c2209d95060d5bf72e064
> # EXP-Topic docker-ppa
> make: turn ubuntu docker into template

The series looks okay to me. I expect Augie will decide on taking this or not.

> -docker-ubuntu-trusty:
> -	mkdir -p packages/ubuntu-trusty
> -	contrib/dockerdeb ubuntu trusty
> +docker-ubuntu-gen:
> +	sed "s/__CODENAME__/$(CODENAME)/" contrib/docker/ubuntu-template > contrib/docker/ubuntu-$(CODENAME)
> +
> +docker-ubuntu-trusty: CODENAME=trusty
> +docker-ubuntu-trusty: docker-ubuntu-gen
> +	contrib/dockerdeb ubuntu $(CODENAME)

The make way would be to depend on real files, but I don't care much about it
since our Makefile is full of phony rules.

contrib/docker/ubuntu-%: contrib/docker/ubuntu.template
	sed "s/__CODENAME__/$*/" $< > $@

docker-ubuntu-trusty: contrib/docker/ubuntu-trusty
	contrib/dockerdeb ubuntu trusty


More information about the Mercurial-devel mailing list