-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (65 loc) · 1.93 KB
/
Makefile
File metadata and controls
82 lines (65 loc) · 1.93 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
SHELL = /bin/sh
# root for installation
prefix = /usr/local
exec_prefix = ${prefix}
# executables
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
# data
datarootdir = ${prefix}/share
datadir = ${datarootdir}
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
# misc
includedir = ${prefix}/include
oldincludedir = /usr/include
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
infodir = ${datarootdir}/info
libdir = ${exec_prefix}/lib
localedir = ${datarootdir}/locale
mandir = ${datarootdir}/man
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
manext = .1
srcdir = .
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
LN_S = ln -s
SED_INPLACE = sed -i
INSTALL_DIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
.PHONY: all
all: doc
.PHONY: doc
doc: mcexplore.1
.PHONY: install
install: $(INSTALL_DIRS) doc $(DESTDIR)$(bindir)/mcexplore $(DESTDIR)$(man1dir)/mcexplore.1
.PHONY: html
html: mcexplore.1.html
mcexplore.1: mcexplore.py
argparse-manpage \
--pyfile $< \
--function getParser \
--author 'DMBuce <https://github.com/DMBuce> and similardilemma' \
--author-email 'https://github.com/similardilemma' \
--project-name mcexplore \
--url https://github.com/dmbuce/mcexplore \
> mcexplore.1
$(SED_INPLACE) '1s/.*/.TH MCEXPLORE "1" $(shell date +%F) "\\ \\\&" "\\ \\\&"/' mcexplore.1
$(DESTDIR)$(bindir)/mcexplore: mcexplore.py
$(INSTALL) -m755 $< $@
$(DESTDIR)$(man1dir)/mcexplore.1: mcexplore.1
$(INSTALL_DATA) $< $@
$(INSTALL_DIRS):
$(INSTALL) -d $@
%.html: %
groff -mandoc -Thtml < $< > $@