File: Makefile

package info (click to toggle)
deheader 1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 488 kB
  • sloc: python: 1,191; ansic: 334; xml: 191; makefile: 71; sh: 15
file content (62 lines) | stat: -rw-r--r-- 1,472 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# makefile for `deheader'
#
INSTALL=install
prefix?=/usr/local
mandir?=share/man
target=$(DESTDIR)$(prefix)

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

SOURCES = README COPYING NEWS.adoc deheader deheader.xml Makefile control deheader-logo.png test

all: deheader.1

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

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

INSTALLABLES := deheader
MANPAGES := deheader.1

install:
	$(INSTALL) -d "$(target)/bin"
	$(INSTALL) -d "$(target)/share/doc/deheader"
	$(INSTALL) -d "$(target)/$(mandir)/man1"
	$(INSTALL) -m 755 $(INSTALLABLES) "$(target)/bin"
	$(INSTALL) -m 644 $(MANPAGES) "$(target)/$(mandir)/man1"

INSTALLED_BINARIES := $(INSTALLABLES:%="$(target)/bin/%")
INSTALLED_MANPAGES := $(MANPAGES:%="$(target)/$(mandir)/man1/%")

uninstall:
	rm -f $(INSTALLED_BINARIES)
	rm -f $(INSTALLED_MANPAGES)
	rmdir "$(target)/share/doc/deheader"

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

check:
	cd test; make --quiet check
checkfile:
	cd test; make --quiet checkfile

pylint:
	@pylint --score=n deheader

version:
	@echo $(VERS)

deheader-$(VERS).tar.gz: $(SOURCES) deheader.1
	tar --transform='s:^:deheader-$(VERS)/:' --show-transformed-names -cvzf deheader-$(VERS).tar.gz $(SOURCES) deheader.1

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

release: deheader-$(VERS).tar.gz deheader.html
	shipper version=$(VERS) | sh -e -x

refresh: deheader.html
	shipper -N -w version=$(VERS) | sh -e -x