mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
make: Add py-defs.mk py-mod.mk py-run.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
00af05abf1
commit
d49340917b
5 changed files with 91 additions and 0 deletions
30
make/py-mod.mk
Normal file
30
make/py-mod.mk
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
include $(MODDIR)/make/py-defs.mk
|
||||
include $(MODDIR)/make/dirs.mk
|
||||
|
||||
all: $(PY_PYC)
|
||||
install: install-dirs.done install-reg.done
|
||||
clean: py.clean
|
||||
distclean:
|
||||
|
||||
py.clean:
|
||||
rm -f *.done *.pyc
|
||||
if [ ! -s __init__.py ]; then /bin/bash $(MOD_SCRIPT_DIR)/scm.sh clean -f __init__.py; fi
|
||||
|
||||
install-dirs.done:
|
||||
$(INSTALL) -d -m $(PYMODDIRMODE) -o $(PYMODDIROWNER) -g $(PYMODDIRGROUP) $(PY_INSTALL_DIR)
|
||||
touch $@
|
||||
|
||||
install-reg.done: install-dirs.done $(PY_INSTALLED_REG)
|
||||
touch $@
|
||||
|
||||
%.pyc: %.py
|
||||
python -c "import py_compile; py_compile.compile(\"$<\")"
|
||||
|
||||
$(PY_INSTALL_DIR)/%.py: %.py
|
||||
$(INSTALL) -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
||||
|
||||
$(PY_INSTALL_DIR)/%.pyc: %.pyc
|
||||
$(INSTALL) -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
||||
|
||||
__init__.py:
|
||||
touch $@
|
||||
Loading…
Add table
Add a link
Reference in a new issue