forked from git-ftp/git-ftp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (40 loc) · 1.12 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
#! /usr/bin/make -f
SHELL=/bin/sh
DESTDIR?=/usr/local
prefix?=${DESTDIR}
# files that need mode 755
EXEC_FILES=git-ftp
# files that need mode 644
MAN_FILE=man1/git-ftp.1
all:
@echo "usage: make install -> installs git-ftp only"
@echo " make install-man -> installs man pages only"
@echo " make install-all -> installs git-ftp and man pages"
@echo " make uninstall"
@echo " make uninstall-man"
@echo " make uninstall-all"
@echo " make clean"
install:
install -d -m 0755 $(prefix)/bin
install -m 0755 $(EXEC_FILES) $(prefix)/bin
install-man:
install -d -m 0755 $(prefix)/man
cd man && \
make man && \
install -d -m 0755 $(prefix)/man/man1 && \
install -m 0644 $(MAN_FILE) $(prefix)/man/man1 && \
mandb $(prefix)/man/man1
install-all: install install-man
uninstall:
test -d $(prefix)/bin && \
cd $(prefix)/bin && \
rm -f $(EXEC_FILES)
uninstall-man:
test -d $(prefix)/man && \
cd $(prefix)/man && \
rm -f $(MAN_FILE)
mandb -f $(prefix)/man/$(MAN_FILE)
rmdir --ignore-fail-on-non-empty $(prefix)/man/man1
uninstall-all: uninstall uninstall-man
clean:
cd man && make clean