forked from Ajatt-Tools/transformers_ocr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (25 loc) · 768 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
29
30
31
32
33
34
PROG = transformers_ocr
SHORT_PROG = trocr
PREFIX ?= /usr
VPATH = src
EXEC_FILES := $(wildcard $(VPATH)/*.py)
EXEC_INSTALL := $(patsubst $(VPATH)/%.py,$(PREFIX)/bin/%,$(EXEC_FILES))
.PHONY: all
all:
@echo -e "\033[1;32mThis program doesn't need to be built. Run \"make install\".\033[0m"
$(PREFIX)/bin/%: $(VPATH)/%.py
install -Dm755 $< $@
$(PREFIX)/bin/$(SHORT_PROG): $(PREFIX)/bin/$(PROG)
ln -srf -- $< $@
.PHONY: install
install: $(EXEC_INSTALL) $(PREFIX)/bin/$(SHORT_PROG)
@echo -e '\033[1;32mInstalling the program...\033[0m'
.PHONY: uninstall
uninstall:
@echo -e '\033[1;32mUninstalling the program...\033[0m'
rm -- $(PREFIX)/bin/$(SHORT_PROG)
rm -- $(EXEC_INSTALL)
.PHONY: clean
clean:
@echo -e '\033[1;32mCleaning up...\033[0m'
rm -rf -- out