-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
28 lines (25 loc) · 815 Bytes
/
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
PREFIX ?= /usr/local
MANPREFIX ?= "$(PREFIX)/share/man/man1"
SCRIPTS = $(wildcard bin/git-*)
MAN_PAGES = $(wildcard man/git-*.1)
.PHONY: install uninstall
install:
@mkdir -p $(DESTDIR)$(MANPREFIX)
@mkdir -p $(DESTDIR)$(PREFIX)/bin
@$(foreach BIN, $(SCRIPTS), \
echo "Installing `basename $(BIN)` -> $(DESTDIR)$(PREFIX)/bin"; \
cp -f $(BIN) $(DESTDIR)$(PREFIX)/$(BIN); \
)
@$(foreach MAN, $(MAN_PAGES), \
echo "Installing `basename $(MAN)` -> $(DESTDIR)$(MANPREFIX)"; \
cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/`basename $(MAN)`; \
)
uninstall:
@$(foreach BIN, $(SCRIPTS), \
echo "Removing $(DESTDIR)$(PREFIX)/$(BIN)"; \
rm -f $(DESTDIR)$(PREFIX)/$(BIN); \
)
@$(foreach MAN, $(MAN_PAGES), \
echo "Removing $(DESTDIR)$(MANPREFIX)/$(MAN)"; \
rm -f $(DESTDIR)$(MANPREFIX)/`basename $(MAN)`; \
)