Mercurial > hg > hg-fastimport
comparison Makefile @ 82:0a4367911035
Add a Makefile with some useful targets such as distinfo
So I can make signed tarballs for distribution.
The install-home target is taken from the evolve extension.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Mon, 18 Jan 2021 23:37:52 +0000 |
| parents | |
| children | b18c5670f6c0 |
comparison
equal
deleted
inserted
replaced
| 81:fec9b2b96c5f | 82:0a4367911035 |
|---|---|
| 1 HG?= hg | |
| 2 PYTHON?= python | |
| 3 | |
| 4 CHMOD?= chmod | |
| 5 COMP?= xz | |
| 6 COMP_SUFFIX?= .xz | |
| 7 LS?= ls | |
| 8 RM?= rm | |
| 9 TAR?= tar | |
| 10 TAR_SUFFIX?= .tar | |
| 11 | |
| 12 # This isn't very portable, but I generaly make releases from NetBSD | |
| 13 CKSUM?= cksum -a SHA256 | |
| 14 PGP?= netpgp | |
| 15 | |
| 16 PACKAGE= hg-fastimport | |
| 17 PACKAGE_VER!= $(PYTHON) setup.py --version | |
| 18 | |
| 19 TARFILE= $(PACKAGE)-$(PACKAGE_VER)$(TAR_SUFFIX) | |
| 20 DISTFILE= $(TARFILE)$(COMP_SUFFIX) | |
| 21 DISTINFO= ${DISTFILE}.distinfo | |
| 22 DISTINFOSIGN= ${DISTINFO}.asc | |
| 23 | |
| 24 .PHONY: help | |
| 25 help: | |
| 26 @echo "Commonly used make targets:" | |
| 27 @echo " install-home - install with setup.py install --home=$$HOME ($(HOME))" | |
| 28 @echo " clean - removes any targets created by setup.py" | |
| 29 @echo " distclean - in addition to clean, removes distribution tarballs" | |
| 30 @echo " dist - create a distribution tarball from hg repository" | |
| 31 @echo " distinfo - in addition to dist, sign the distribution tarballs" | |
| 32 | |
| 33 .PHONY: all | |
| 34 all: help | |
| 35 | |
| 36 .PHONY: install-home | |
| 37 install-home: | |
| 38 $(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force | |
| 39 | |
| 40 .PHONY: clean | |
| 41 clean: | |
| 42 $(RM) -rf build dist hg_fastimport.egg-info | |
| 43 | |
| 44 .PHONY: distclean | |
| 45 distclean: clean | |
| 46 $(RM) -f $(PACKAGE)*$(TAR_SUFFIX)* | |
| 47 | |
| 48 .PHONY: dist | |
| 49 dist: distclean | |
| 50 $(HG) archive $(TARFILE) | |
| 51 $(COMP) $(TARFILE) | |
| 52 @echo "created $(DISTFILE)" | |
| 53 | |
| 54 .PHONY: distinfo | |
| 55 distinfo: dist | |
| 56 $(RM) -f $(DISTINFO) $(DISTINFOSIGN) | |
| 57 $(CKSUM) $(DISTFILE) >$(DISTINFO) | |
| 58 ${PGP} --clearsign --output=$(DISTINFOSIGN) $(DISTINFO) | |
| 59 $(CHMOD) 644 $(DISTINFOSIGN) | |
| 60 $(LS) -l $(DISTFILE) $(DISTINFO) $(DISTINFOSIGN) |
