File: Makefile

package info (click to toggle)
w2do 2.3.1-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 224 kB
  • sloc: perl: 1,528; makefile: 45
file content (68 lines) | stat: -rw-r--r-- 2,096 bytes parent folder | download | duplicates (4)
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
# makefile for w2do, a simple text-based todo manager
# Copyright (C) 2008, 2009, 2010 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 settings; feel free to modify according to your situation:
SHELL   = /bin/sh
INSTALL = /usr/bin/install -c
POD2MAN = /usr/bin/pod2man
SRCS   := $(wildcard src/*.pl)
MAN1   := $(patsubst %.pl, %.1, $(SRCS))

# Installation directories; feel free to modify according to your taste and
# situation:
prefix  = /usr/local
bindir  = $(prefix)/bin
mandir  = $(prefix)/share/man
man1dir = $(mandir)/man1

# Additional information:
VERSION = 2.3.1

# Make rules;  please do not edit these unless you really know what you are
# doing:
.PHONY: all clean install uninstall

all: $(MAN1)

clean:
	-rm -f $(MAN1)

install: $(MAN1)
	@echo "Copying scripts..."
	$(INSTALL) -d $(bindir)
	$(INSTALL) -m 755 src/w2do.pl $(bindir)/w2do
	$(INSTALL) -m 755 src/w2html.pl $(bindir)/w2html
	$(INSTALL) -m 755 src/w2text.pl $(bindir)/w2text
	@echo "Copying man pages..."
	$(INSTALL) -d $(man1dir)
	$(INSTALL) -m 644 src/w2do.1 $(man1dir)
	$(INSTALL) -m 644 src/w2html.1 $(man1dir)
	$(INSTALL) -m 644 src/w2text.1 $(man1dir)

uninstall:
	@echo "Removing scripts..."
	rm -f $(bindir)/w2do
	rm -f $(bindir)/w2html
	rm -f $(bindir)/w2text
	@echo "Removing man pages..."
	rm -f $(man1dir)/w2do.1
	rm -f $(man1dir)/w2html.1
	rm -f $(man1dir)/w2text.1
	@echo "Removing empty directories..."
	-rmdir $(bindir) $(man1dir) $(mandir)

%.1: %.pl
	$(POD2MAN) --section=1 --release="Version $(VERSION)" $^ $@