-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
39 lines (31 loc) · 872 Bytes
/
GNUmakefile
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
include mk/compat.mk
include mk/util.mk
-include Config.mk
include mk/build.mk
prefix ?= /usr/local
bindir ?= $(prefix)/bin
mandir ?= $(prefix)/share/man
man1dir ?= $(mandir)/man1
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
RM = rm -f
CTAGS = ctags
install: all
$(Q) $(INSTALL) -d -m755 '$(DESTDIR)$(bindir)'
$(Q) $(INSTALL) -d -m755 '$(DESTDIR)$(man1dir)'
$(E) INSTALL '$(DESTDIR)$(bindir)/tally'
$(Q) $(INSTALL_PROGRAM) tally '$(DESTDIR)$(bindir)'
$(E) INSTALL '$(DESTDIR)$(man1dir)/tally.1'
$(Q) $(INSTALL_DATA) tally.1 '$(DESTDIR)$(man1dir)'
uninstall:
$(RM) '$(DESTDIR)$(bindir)/tally'
$(RM) '$(DESTDIR)$(man1dir)/tally.1'
tags: src/tally.c src/parse.[ch] src/languages.[ch]
$(CTAGS) -f $@ $^
clean:
$(RM) $(CLEANFILES)
$(RM) -r $(CLEANDIRS)
.DEFAULT_GOAL = all
.PHONY: install uninstall clean
.DELETE_ON_ERROR: