Removed "all" target from "install"
[clive-utils.git] / Makefile
blob9fdef4741c84d8969cbf02845e2c44ac3394f69e
1 # GNU Makefile
3 SHELL = /bin/sh
5 prefix = $(HOME)
6 bindir = $(prefix)/bin
7 datarootdir = $(prefix)/share
8 datadir = $(datarootdir)
9 mandir = $(datarootdir)/man
10 man1dir = $(mandir)/man1
12 INSTALL = install
13 RM = rm -f
14 PERL = perl
15 POD2MAN = pod2man
16 AWK = awk
17 TR = tr
19 WITH_MAN = yes
21 RELEASE_scan := \
22 $(shell sh -c "$(AWK) '/constant VERSION/ {print \$$5}' clivescan | \
23 $(TR) -d '[\";]'")
25 RELEASE_feed := \
26 $(shell sh -c "$(AWK) '/constant VERSION/ {print \$$5}' clivefeed | \
27 $(TR) -d '[\";]'")
29 RELEASE_pass := \
30 $(shell sh -c "$(AWK) '/constant VERSION/ {print \$$5}' clivepass | \
31 $(TR) -d '[\";]'")
33 .PHONY: all
34 all: man
36 .PHONY: install uninstall
37 install:
38 $(INSTALL) -d $(DESTDIR)$(bindir)
39 $(INSTALL) -c clivescan $(DESTDIR)$(bindir)/clivescan
40 $(INSTALL) -c clivefeed $(DESTDIR)$(bindir)/clivefeed
41 $(INSTALL) -c clivepass $(DESTDIR)$(bindir)/clivepass
42 ifeq ($(WITH_MAN),yes)
43 $(INSTALL) -d $(DESTDIR)$(man1dir)
44 $(INSTALL) -c -m 444 clivescan.1 $(DESTDIR)$(man1dir)/clivescan.1
45 $(INSTALL) -c -m 444 clivefeed.1 $(DESTDIR)$(man1dir)/clivefeed.1
46 $(INSTALL) -c -m 444 clivepass.1 $(DESTDIR)$(man1dir)/clivepass.1
47 endif
49 uninstall:
50 $(RM) $(DESTDIR)$(bindir)/clivescan
51 $(RM) $(DESTDIR)$(bindir)/clivefeed
52 $(RM) $(DESTDIR)$(bindir)/clivepass
53 ifeq ($(WITH_MAN),yes)
54 $(RM) $(DESTDIR)$(man1dir)/clivescan.1
55 $(RM) $(DESTDIR)$(man1dir)/clivefeed.1
56 $(RM) $(DESTDIR)$(man1dir)/clivepass.1
57 endif
59 .PHONY: man clean
60 man:
61 $(POD2MAN) -c "clivescan manual" -n clivescan \
62 -s 1 -r $(RELEASE_scan) clivescan clivescan.1
63 $(POD2MAN) -c "clivefeed manual" -n clivefeed \
64 -s 1 -r $(RELEASE_feed) clivefeed clivefeed.1
65 $(POD2MAN) -c "clivepass manual" -n clivepass \
66 -s 1 -r $(RELEASE_pass) clivescan clivepass.1
68 clean:
69 @$(RM) clivescan.1 clivefeed.1 clivepass.1 2>/dev/null