Mercurial > hg > hg-fastimport
view 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 |
line wrap: on
line source
HG?= hg PYTHON?= python CHMOD?= chmod COMP?= xz COMP_SUFFIX?= .xz LS?= ls RM?= rm TAR?= tar TAR_SUFFIX?= .tar # This isn't very portable, but I generaly make releases from NetBSD CKSUM?= cksum -a SHA256 PGP?= netpgp PACKAGE= hg-fastimport PACKAGE_VER!= $(PYTHON) setup.py --version TARFILE= $(PACKAGE)-$(PACKAGE_VER)$(TAR_SUFFIX) DISTFILE= $(TARFILE)$(COMP_SUFFIX) DISTINFO= ${DISTFILE}.distinfo DISTINFOSIGN= ${DISTINFO}.asc .PHONY: help help: @echo "Commonly used make targets:" @echo " install-home - install with setup.py install --home=$$HOME ($(HOME))" @echo " clean - removes any targets created by setup.py" @echo " distclean - in addition to clean, removes distribution tarballs" @echo " dist - create a distribution tarball from hg repository" @echo " distinfo - in addition to dist, sign the distribution tarballs" .PHONY: all all: help .PHONY: install-home install-home: $(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force .PHONY: clean clean: $(RM) -rf build dist hg_fastimport.egg-info .PHONY: distclean distclean: clean $(RM) -f $(PACKAGE)*$(TAR_SUFFIX)* .PHONY: dist dist: distclean $(HG) archive $(TARFILE) $(COMP) $(TARFILE) @echo "created $(DISTFILE)" .PHONY: distinfo distinfo: dist $(RM) -f $(DISTINFO) $(DISTINFOSIGN) $(CKSUM) $(DISTFILE) >$(DISTINFO) ${PGP} --clearsign --output=$(DISTINFOSIGN) $(DISTINFO) $(CHMOD) 644 $(DISTINFOSIGN) $(LS) -l $(DISTFILE) $(DISTINFO) $(DISTINFOSIGN)
