File: Makefile

package info (click to toggle)
git-ftp 1.5.1+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 272 kB
  • sloc: sh: 2,545; makefile: 76
file content (52 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (2)
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