summaryrefslogblamecommitdiff
path: root/Makefile
blob: 06ef51edaecb50070b450f9f94b468e22caa5e19 (plain) (tree)












































                                                                                            
#
# makefile for `deheader'
#
VERS=$(shell sed <deheader -n -e '/version\s*=\s*"\(.*\)"/s//\1/p')

SOURCES = README COPYING NEWS deheader deheader.xml deheader.1 Makefile control deheader.png

all: deheader.1

deheader.1: deheader.xml
	xmlto man deheader.xml

deheader.html: deheader.xml
	xmlto html-nochunks deheader.xml

clean:
	rm -f *~ *.1 *.html test/*.o MANIFEST SHIPPER.*

regress:
	@echo "Testing deheader: no output is good news."
	@deheader test >/tmp/regress
	@diff -u test/regress.chk /tmp/regress
	@rm /tmp/regress 
makeregress:
	@deheader test >test/regress.chk

pychecker:
	@ln -f deheader deheader.py
	@-pychecker --only --limit 50 deheader.py
	@rm -f deheader.py*

version:
	@echo $(VERS)

deheader-$(VERS).tar.gz: $(SOURCES)
	@ls $(SOURCES) | sed s:^:deheader-$(VERS)/: >MANIFEST
	@(cd ..; ln -s deheader deheader-$(VERS))
	(cd ..; tar -czf deheader/deheader-$(VERS).tar.gz `cat deheader/MANIFEST`)
	@ls -l deheader-$(VERS).tar.gz
	@(cd ..; rm deheader-$(VERS))

dist: deheader-$(VERS).tar.gz

release: deheader-$(VERS).tar.gz deheader.html
	shipper -u -m -t; make clean