jw-pkg/make/py-run.mk
Jan Lindemann ac54a7bca6
make: Make target "test" depend on target "all"

Every directory should have a test target, and the test target should depend on all so that all files are generated that might be needed for testing. This commit fixes some missing targets, and adds some missing dependencies.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-02 19:52:35 +02:00

24 lines
533 B
Makefile

include $(JWBDIR)/make/defs.mk
include $(JWBDIR)/make/py-defs.mk
#include $(JWBDIR)/make/scripts-targets.mk
#include $(JWBDIR)/make/rules.mk
EXE ?= $(firstword $(wildcard main.py runme.py test.py *.py))
EXE_ARGS ?=
all:
install:
clean:
distclean:
test: all
run:
$(PYTHON) $(EXE) $(EXE_ARGS)
run.sh:
echo -e "#!/bin/bash\n\nexport PYTHONPATH=$(PYTHONPATH)\nset -x\nexec $(PYTHON) $(EXE)" '"$$@"' > $@.tmp
chmod 755 $@.tmp
mv $@.tmp $@
clean-run-sh:
rm -f run.sh
clean: clean-run-sh