-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
39 lines (29 loc) · 1001 Bytes
/
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
38
39
# oc-inject
.POSIX:
include config.mk
SRC = oc-inject
all: options oc-inject oc-inject.1
# XXX no build options
options:
oc-inject.1: oc-inject.1.md
pandoc --standalone --to man oc-inject.1.md -o oc-inject.1
clean:
rm -f oc-inject-$(VERSION).tar.gz
dist: clean
mkdir -p oc-inject-$(VERSION)
cp -R LICENSE README.md TODO.md oc-inject.1.md oc-inject.1\
Makefile oc-inject.spec config.mk $(SRC)\
oc-inject-$(VERSION)
tar -cf - oc-inject-$(VERSION) | gzip >oc-inject-$(VERSION).tar.gz
rm -rf oc-inject-$(VERSION)
install: oc-inject oc-inject.1
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f oc-inject $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/oc-inject
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" <oc-inject.1 >$(DESTDIR)$(MANPREFIX)/man1/oc-inject.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/oc-inject.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/oc-inject
rm -f $(DESTDIR)$(MANPREFIX)/man1/oc-inject.1
.PHONY: all options clean dist install uninstall