From dd3a2b38973ac0ee571d707a453369f76b1dc7e3 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 1 Sep 2011 02:55:13 +0700 Subject: [PATCH] Install .py files along with .pyc (cherry picked from commit 5e73af632ab1f6e6112fdd983c9c8866fe1a0a9d) --- modules/modpython/Makefile.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/modpython/Makefile.inc b/modules/modpython/Makefile.inc index 4826cb81..665454de 100644 --- a/modules/modpython/Makefile.inc +++ b/modules/modpython/Makefile.inc @@ -59,10 +59,15 @@ modpython/compiler: modpython/compiler.cpp Makefile $(Q)$(CXX) $(PYTHONCOMMON) -o $@ $< $(PY_LDFLAGS) modpython_install: install_datadir modpython_all - -for i in *.pyc; do \ + -for i in *.pyc $(srcdir)/*.py; do \ $(INSTALL_DATA) $$i $(DESTDIR)$(MODDIR); \ done mkdir -p $(DESTDIR)$(MODDIR)/modpython $(INSTALL_PROGRAM) modpython/_znc_core.so $(DESTDIR)$(MODDIR)/modpython $(INSTALL_DATA) modpython/znc_core.pyc $(DESTDIR)$(MODDIR)/modpython + if test -r modpython/znc_core.py;\ + then $(INSTALL_DATA) modpython/znc_core.py $(DESTDIR)$(MODDIR)/modpython;\ + else $(INSTALL_DATA) $(srcdir)/modpython/znc_core.py $(DESTDIR)$(MODDIR)/modpython;\ + fi $(INSTALL_DATA) modpython/znc.pyc $(DESTDIR)$(MODDIR)/modpython + $(INSTALL_DATA) $(srcdir)/modpython/znc.py $(DESTDIR)$(MODDIR)/modpython