-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
37 lines (30 loc) · 1.03 KB
/
Makefile
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
# Makefile for repo-make.
DESTDIR=
PREFIX=/usr/local
MANDIR=$(PREFIX)/share/man
BINDIR=$(PREFIX)/bin
VERSION=$(shell sed -rn 's/.*\$$VERSION = .(.+?).;$$/\1/p' repo-make)
.PHONY: all install uninstall clean dist
all: repo-make.1 repo-make.conf.5
repo-make.1: repo-make; pod2man $< $@
repo-make.conf.5: repo-make.conf.pod; pod2man $< $@
install: all
mkdir -p $(DESTDIR)$(MANDIR)/man1
gzip -c repo-make.1 > $(DESTDIR)$(MANDIR)/man1/repo-make.1.gz
mkdir -p $(DESTDIR)$(MANDIR)/man5
gzip -c repo-make.conf.5 > $(DESTDIR)$(MANDIR)/man5/repo-make.conf.5.gz
install -D -m 755 repo-make $(DESTDIR)$(BINDIR)/repo-make
uninstall:
rm -f $(DESTDIR)$(BINDIR)/repo-make
rm -f $(DESTDIR)$(MANDIR)/man1/repo-make.1.gz
rm -f $(DESTDIR)$(MANDIR)/man5/repo-make.conf.5.gz
clean:
@rm -f repo-make.1
@rm -f repo-make.conf.5
@rm -f repo-make-*.tar.xz
@rm -rf src/ pkg/
dist: clean
@tar --transform="s#^#repo-make-$(VERSION)/#" \
--owner=0 --group=0 \
-vcJf repo-make-$(VERSION).tar.xz *
@echo "Distribution archive 'repo-make-$(VERSION).tar.xz' generated"