diff --git a/bindings/Makefile.am b/bindings/Makefile.am index d6f3ff820..d930fc57b 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -103,9 +103,14 @@ endif ########################################## # Python binding +if ENABLE_PYTHON + +MOSTLYCLEANFILES+= hamlibpy_wrap.c Hamlib.py *.pyc +BUILT_SOURCES += hamlibpy_wrap.c Hamlib.py + python_ltlib = _Hamlib.la -pythondir = @pythondir@ +#pythondir = @pythondir@ nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version @@ -130,8 +135,11 @@ clean-py: distclean-py: uninstall-py: -########################################## _Hamlib_la_LTLIBRARIES = $(python_ltlib) + +endif + +########################################## lib_LTLIBRARIES = $(tcl_ltlib) # lib_LTLIBRARIES = @BINDING_LIB_TARGETS@ @@ -148,12 +156,11 @@ uninstall-local: @BINDING_UNINSTALL@ EXTRA_DIST = $(SWGFILES) \ Makefile.PL perltest.pl tcltest.tcl pytest.py -BUILT_SOURCES += hamlibperl_wrap.c hamlibpy_wrap.c Hamlib.py +BUILT_SOURCES += hamlibperl_wrap.c ## DISTCLEANFILES = Hamlib-pl.mk Hamlib-pl.mk.old DISTCLEANFILES = Hamlib-pl.mk.old -MOSTLYCLEANFILES+= hamlibperl_wrap.c Hamlib.pm Hamlib.bs \ - hamlibpy_wrap.c Hamlib.py *.pyc +MOSTLYCLEANFILES += hamlibperl_wrap.c Hamlib.pm Hamlib.bs noinst_SCRIPTS = perltest.pl tcltest.tcl pytest.py hamlibvb.bas diff --git a/configure.ac b/configure.ac index 5e7ecd03c..950e92e23 100644 --- a/configure.ac +++ b/configure.ac @@ -340,6 +340,7 @@ if test "${cf_with_python_binding}" = "yes" ; then BINDING_UNINSTALL="${BINDING_UNINSTALL} uninstall-py" BINDING_LIB_TARGETS="${BINDING_LIB_TARGETS} \$(python_ltlib)" fi +AM_CONDITIONAL(ENABLE_PYTHON, test x"${cf_with_python_binding}" = "xyes") dnl Backend list