forked from git-ftp/git-ftp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 1.04 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
#! /usr/bin/make -f
SHELL=/bin/sh
prefix ?=/usr/local
bindir ?=${prefix}/bin
mandir ?=${prefix}/man/man1
# files that need mode 755
EXEC_FILES=git-ftp
# files that need mode 644
MAN_FILE=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 $(bindir)
install -m 0755 $(EXEC_FILES) $(bindir)
install-man:
mkdir -p $(mandir)
cd man && \
make man && \
install -m 0644 $(MAN_FILE) $(mandir)
ifneq "$(shell uname -s)" "Darwin"
mandb $(mandir)
endif
install-all: install install-man
uninstall:
test -d $(bindir) && \
cd $(bindir) && \
rm -f $(EXEC_FILES)
uninstall-man:
test -d $(mandir) && rm -rf $(mandir)
ifneq "$(shell uname -s)" "Darwin"
mandb -f $(mandir)/$(MAN_FILE)
endif
uninstall-all: uninstall uninstall-man
clean:
cd man && make clean