]> git.phdru.name Git - phdru.name/cgi-bin/blog-ru/search-tags.git/blob - Makefile
Build(Makefile): Add a target to fix permissions
[phdru.name/cgi-bin/blog-ru/search-tags.git] / Makefile
1 .SUFFIXES: # Clear the suffix list
2
3 PYTHON=python3
4 VENVDIR=../../../../.search-tags-venv
5
6 .PHONY: all
7 all:
8         @echo Nothing to do for \`all\'
9
10 .PHONY: clean-venv
11 clean-venv:
12         rm -rf $(VENVDIR)
13
14 .PHONY: venv
15 venv:
16         @if [ -d $(VENVDIR) ] ; then \
17                 echo "venv already exists."; \
18                 echo "To recreate it, remove it first with \`make clean-venv'."; \
19         else \
20                 sudo apt-get install -y python3-pip python3-wheel python3-virtualenv; \
21                 $(PYTHON) -m virtualenv $(VENVDIR); \
22                 $(VENVDIR)/bin/python -m pip install -U --compile pip wheel; \
23                 $(VENVDIR)/bin/python -m pip install -U --compile -r requirements.txt; \
24                 echo "The venv has been created in the $(VENVDIR) directory"; \
25         fi
26
27 .PHONY: perms
28 perms:
29         chmod -R u=rwX,go=rX . && \
30         chmod -R go= .git .gitignore html_output/.gitignore \
31                 devscripts parser/Makefile ChangeLog Makefile \
32                 requirements.txt version && \
33         exec find .git/objects -type f -exec chmod a=r '{}' \+