Remove autoconf, leave only CMake

This commit is contained in:
Alexey Sokolov
2020-05-01 22:49:06 +01:00
parent ff7758b573
commit dd42fcd209
27 changed files with 24 additions and 2840 deletions

View File

@@ -1,37 +0,0 @@
all:
VPATH := $(srcdir)
ifneq "$(V)" ""
VERBOSE=1
endif
ifeq "$(VERBOSE)" ""
Q=@
E=@echo
C=-s
else
Q=
E=@\#
C=
endif
.SECONDARY:
all: modpython/modpython_biglib.cpp modpython/znc_core.py modpython/pyfunctions.cpp modpython/swigpyrun.h
modpython/swigpyrun.h:
@mkdir -p modpython
$(Q)$(SWIG) -python -py3 -c++ -shadow -external-runtime $@
modpython/modpython_biglib.cpp: modpython/modpython.i modpython/module.h modpython/cstring.i
$(E) Generating ZNC API for python...
@mkdir -p modpython .depend
$(Q)$(SWIG) -python -py3 -c++ -shadow -outdir modpython -I$(srcdir) -I$(srcdir)/../include -I../include -MD -MF .depend/modpython.swig.dep -w362,315,401 -o $@ $<
modpython/znc_core.py: modpython/modpython_biglib.cpp
modpython/pyfunctions.cpp: modpython/codegen.pl modpython/functions.in
@mkdir -p modpython
$(Q)$(PERL) $^ $@
-include .depend/modpython.swig.dep

View File

@@ -1,88 +0,0 @@
# vim: filetype=make
ifeq "$(PYTHON_ON)" "yes"
PYTHONCOMMON := $(PY_CFLAGS)
PYTHONCOMMON += -DSWIG_TYPE_TABLE=znc
# Could someone fix all of these in swig / python, please?
PYTHONCOMMON += -Wno-missing-field-initializers -Wno-unused -Wno-shadow
PYTHONCOMMON += -Wno-missing-declarations -Wno-uninitialized -Wno-switch-enum
PYTHONCOMMON += -Wno-redundant-decls
modpythonCXXFLAGS := $(PYTHONCOMMON) -I.
modpythonLDFLAGS := $(PY_LDFLAGS)
ifeq "${ISCYGWIN}" "1"
PYCEXT_EXT := dll
PYDEPONMOD := ./modpython.so
else
PYCEXT_EXT := so
PYDEPONMOD :=
endif
PYTHONHOOK := modpython_install
CLEAN += modpython/_znc_core.$(PYCEXT_EXT)
CLEAN += modpython/_znc_core.o modpython/compiler.o
ifneq "$(SWIG)" ""
# Only delete these files if we can regenerate them
CLEAN += modpython/modpython_biglib.cpp modpython/znc_core.py
CLEAN += modpython/swigpyrun.h modpython/pyfunctions.cpp
endif
ifneq "$(srcdir)" "."
# Copied from source for out-of-tree builds
CLEAN += modpython/znc.py
endif
else
FILES := $(shell echo $(FILES) | sed -e "s/modpython//")
endif
.PHONY: modpython_install modpython_all
install: $(PYTHONHOOK)
ifeq "$(PYTHON_ON)" "yes"
all: modpython_all
endif
modpython_all: modpython/_znc_core.$(PYCEXT_EXT)
modpython/_znc_core.o: modpython/modpython_biglib.cpp Makefile
@mkdir -p modpython
@mkdir -p .depend
$(E) Building ZNC python bindings library...
$(Q)$(CXX) $(MODFLAGS) -I$(srcdir) -MD -MF .depend/modpython.library.dep $(PYTHONCOMMON) -o $@ $< -c
modpython/_znc_core.$(PYCEXT_EXT): modpython/_znc_core.o Makefile modpython.so
$(E) Linking ZNC python bindings library...
$(Q)$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -o $@ $< $(PY_LDFLAGS) $(PYDEPONMOD) $(LIBS)
ifneq "$(SWIG)" ""
include $(srcdir)/modpython/Makefile.gen
else
modpython/swigpyrun.h modpython/znc_core.py modpython/pyfunctions.cpp: modpython/modpython_biglib.cpp
modpython/modpython_biglib.cpp: modpython/generated.tar.gz
@mkdir -p modpython
$(E) Unpacking ZNC python bindings...
$(Q)tar -xf $^ -C modpython
endif
modpython.o: modpython/pyfunctions.cpp modpython/swigpyrun.h
modpython/compiler.o: modpython/compiler.cpp Makefile
@mkdir -p modpython
@mkdir -p .depend
$(E) Building optimizer for python files...
$(Q)$(CXX) $(PYTHONCOMMON) -o $@ $< -c -MD -MF .depend/modpython.compiler.dep
modpython/compiler: modpython/compiler.o Makefile
$(E) Linking optimizer for python files...
$(Q)$(CXX) -o $@ $< $(PY_LDFLAGS)
modpython_install: install_datadir modpython_all
-for i in $(srcdir)/*.py; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(MODDIR); \
done
mkdir -p $(DESTDIR)$(MODDIR)/modpython
$(INSTALL_PROGRAM) modpython/_znc_core.$(PYCEXT_EXT) $(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) $(srcdir)/modpython/znc.py $(DESTDIR)$(MODDIR)/modpython