File: Makefile

package info (click to toggle)
djbdoc2man 1.1-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 96 kB
  • ctags: 8
  • sloc: python: 152; makefile: 84
file content (39 lines) | stat: -rw-r--r-- 970 bytes parent folder | download
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
VERSION=1.1
NAME=djbdoc2man
ROOT=/usr/local
BINDIR=$(ROOT)/bin
MANDIR=$(ROOT)/man
DOCDIR=$(ROOT)/doc

all: $(NAME) $(NAME).1

$(NAME): $(NAME).in
	cat $(NAME).in | sed \
	  -e s/"%NAME%"/"$(NAME)"/ \
	  -e s/"%VERSION%"/"$(VERSION)"/ \
	  > $(NAME)
	chmod +x $(NAME)
	
$(NAME).1: $(NAME)
	help2man -n "man-page generator for DJB software" -N ./$(NAME) > $(NAME).1

clean:
	$(RM) `cat .cvsignore`

install: all
	install -D $(NAME) $(BINDIR)/$(NAME)
	install -m 0644 -D $(NAME).1 $(MANDIR)/man1/$(NAME).1
	install -m 0644 -D README $(DOCDIR)/$(NAME)/README
	install -m 0644 -D CHANGES $(DOCDIR)/$(NAME)/CHANGES
	install -m 0644 -D doc/manual.txt $(DOCDIR)/$(NAME)/manual.txt

uninstall:
	$(RM) $(BINDIR)/$(NAME)
	$(RM) $(MANDIR)/man1/$(NAME).1
	$(RM) -r $(DOCDIR)/$(NAME) 

dist: all
	mkdir -p .dist/${NAME}-${VERSION}
	cp -rf * .dist/${NAME}-${VERSION}
	tar cvfz ${NAME}-${VERSION}.tar.gz -C .dist ${NAME}-${VERSION} --exclude CVS --exclude-from=.cvsignore
	rm -rf .dist