Newer
Older
NewLang / Makefile
SHELL=/bin/bash

build: clean_pycache
	python3 -m zipapp src -p "/usr/bin/env python3" -c -m "main:main" -o NewLang

clean_pycache:
	test ! -d src/__pycache__ || rm -r src/__pycache__

clean: clean_pycache clean_build
	test ! -e NewLang || rm NewLang

_build:
	mkdir -p _build

_build/.stamp_venv: _build
	python3 -m venv _build/venv
	source _build/venv/bin/activate && pip install -r requirements.txt
	touch _build/.stamp_venv

tidy: _build/.stamp_venv
	source _build/venv/bin/activate && black src

clean_build:
	rm -rf _build/

venv_bash: _build/.stamp_venv
	source _build/venv/bin/activate && bash