mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 20:13:32 +01:00
Allow creation of a run.sh script, to be used from outside the make context. Signed-off-by: Jan Lindemann <jan@janware.com>
23 lines
480 B
Makefile
23 lines
480 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:
|
|
|
|
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
|