X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Makefile;h=7954baadd7749d2b5b3e88c253a909345aa1f580;hb=07016d6aaed52fda5bc9a362801df7e6d53fe2d1;hp=d802c5af8ab2434dd0271babb8d87691628adb8f;hpb=1cf62397a41f5344590c41655caf07c4c37561e6;p=phdru.name%2Fcgi-bin%2Fblog-ru%2Fsearch-tags.git diff --git a/Makefile b/Makefile index d802c5a..7954baa 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,33 @@ -# Makefile. -# -# __author__ = "Oleg Broytman " -# __copyright__ = "Copyright (C) 2014 PhiloSoft Design" +.SUFFIXES: # Clear the suffix list -%.py: %.tmpl - cheetah compile --nobackup $< && compyle $@ +PYTHON=python3 +VENVDIR=../../../../.search-tags-venv -search_tags.py: search_tags.tmpl +.PHONY: all +all: + @echo Nothing to do for \`all\' + +.PHONY: clean-venv +clean-venv: + rm -rf $(VENVDIR) + +.PHONY: venv +venv: + @if [ -d $(VENVDIR) ] ; then \ + echo "venv already exists."; \ + echo "To recreate it, remove it first with \`make clean-venv'."; \ + else \ + sudo apt-get install -y python3-pip python3-wheel python3-virtualenv; \ + $(PYTHON) -m virtualenv $(VENVDIR); \ + $(VENVDIR)/bin/python -m pip install -U --compile pip wheel; \ + $(VENVDIR)/bin/python -m pip install -U --compile -r requirements.txt; \ + echo "The venv has been created in the $(VENVDIR) directory"; \ + fi + +.PHONY: perms +perms: + chmod -R u=rwX,go=rX . && \ + chmod -R go= .git .gitignore html_output/.gitignore \ + devscripts parser/Makefile ChangeLog Makefile \ + requirements.txt version && \ + exec find .git/objects -type f -exec chmod a=r '{}' \+