forked from jhradilek/rng2vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (67 loc) · 2.28 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
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
# A makefile for rng2vim
# Copyright (C) 2013 Jaromir Hradilek
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA-
# BILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
# General information:
NAME = rng2vim
VERSION = 0.1.0
# General settings; change the shell or the path to the install executable:
SHELL = /bin/sh
INSTALL = /usr/bin/install -c
POD2MAN = /usr/bin/pod2man
SRCS = rng2vim.pl
MANS = rng2vim.1
DOCS = AUTHORS COPYING INSTALL.markdown README.markdown
# Installation directories; change these directories to suite your needs:
prefix = /usr/local
bindir = $(prefix)/bin
mandir = $(prefix)/share/man/man1
docdir = $(prefix)/share/doc/$(NAME)-$(VERSION)
# The following are the make rules; please, do not edit these rules unless
# you really know what you are doing:
.PHONY: all
all: $(MANS)
.PHONY: install
install: $(SRCS) $(MANS) $(DOCS)
@echo "Copying executables..."
$(INSTALL) -d $(bindir)
$(INSTALL) -m 755 rng2vim.pl $(bindir)/rng2vim
@echo "Copying manual pages..."
$(INSTALL) -d $(mandir)
$(INSTALL) -m 644 rng2vim.1 $(mandir)
@echo "Copying documentation..."
$(INSTALL) -d $(docdir)
$(INSTALL) -m 644 AUTHORS $(docdir)
$(INSTALL) -m 644 COPYING $(docdir)
$(INSTALL) -m 644 INSTALL.markdown $(docdir)
$(INSTALL) -m 644 README.markdown $(docdir)
-$(INSTALL) -m 644 ChangeLog $(docdir)
.PHONY: uninstall
uninstall:
@echo "Removing executables..."
-rm -f $(bindir)/rng2vim
-rmdir $(bindir)
@echo "Removing manual pages..."
-rm -f $(mandir)/rng2vim.1
-rmdir $(mandir)
@echo "Removing documentation..."
-rm -f $(docdir)/AUTHORS
-rm -f $(docdir)/COPYING
-rm -f $(docdir)/INSTALL.markdown
-rm -f $(docdir)/README.markdown
-rm -f $(docdir)/ChangeLog
-rmdir $(docdir)
.PHONY: clean
clean:
-rm -f $(MANS)
%.1: %.pod
$(POD2MAN) --section=1 --release="$(VERSION)" $^ $@