mirror of
https://github.com/znc/znc.git
synced 2026-07-06 18:01:21 +02:00
Remove autoconf, leave only CMake
This commit is contained in:
@@ -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: modperl/modperl_biglib.cpp modperl/ZNC.pm modperl/perlfunctions.cpp modperl/swigperlrun.h
|
||||
|
||||
modperl/swigperlrun.h:
|
||||
@mkdir -p modperl
|
||||
$(Q)$(SWIG) -perl5 -c++ -shadow -external-runtime $@
|
||||
|
||||
modperl/modperl_biglib.cpp: modperl/modperl.i modperl/module.h modperl/CString.i
|
||||
$(E) Generating ZNC API for Perl...
|
||||
@mkdir -p modperl .depend
|
||||
$(Q)$(SWIG) -perl5 -c++ -shadow -outdir modperl -I$(srcdir) -I$(srcdir)/../include -I../include -I$(srcdir)/modperl/include -MD -MF .depend/modperl.swig.dep -w362,315,401,402 -o $@ $<
|
||||
|
||||
modperl/ZNC.pm: modperl/modperl_biglib.cpp
|
||||
|
||||
modperl/perlfunctions.cpp: modperl/codegen.pl modperl/functions.in
|
||||
@mkdir -p modperl
|
||||
$(Q)$(PERL) $^ $@
|
||||
|
||||
-include .depend/modperl.swig.dep
|
||||
@@ -1,78 +0,0 @@
|
||||
# vim: filetype=make
|
||||
|
||||
ifeq "$(PERL_ON)" "yes"
|
||||
# We execute this now so that we see the 'beauty' of these flags in make's output
|
||||
PERL_CXX := $(shell $(PERL) -MExtUtils::Embed -e perl_inc)
|
||||
PERL_LD := $(shell $(PERL) -MExtUtils::Embed -e ldopts)
|
||||
# Perl API is ugly, casting string literals to char* and redeclaring functions :(
|
||||
PERL_CXX += -Wno-write-strings -Wno-redundant-decls -Wno-missing-declarations
|
||||
PERL_CXX += -Wno-type-limits -Wno-sign-compare -Wno-strict-overflow -Wno-unused-value
|
||||
# perl 5.20 will fix this warning: https://rt.perl.org/Public/Bug/Display.html?id=120670
|
||||
PERL_CXX += -Wno-reserved-user-defined-literal -Wno-literal-suffix
|
||||
# This is for SWIG
|
||||
PERL_CXX += -DSWIG_TYPE_TABLE=znc
|
||||
PERLCEXT_EXT := $(shell $(PERL) -MConfig -e'print $$Config::Config{dlext}')
|
||||
modperlCXXFLAGS := $(PERL_CXX) -Wno-unused-function
|
||||
modperlLDFLAGS := $(PERL_LD)
|
||||
# Find additional headers for out-of-tree build
|
||||
modperlCXXFLAGS += -I.
|
||||
|
||||
ifeq "$(ISCYGWIN)" "1"
|
||||
PERLDEPONMOD := modperl.so
|
||||
else
|
||||
PERLDEPONMOD :=
|
||||
endif
|
||||
|
||||
PERLHOOK := modperl_install
|
||||
CLEAN += modperl/ZNC.$(PERLCEXT_EXT) modperl/ZNC.o modperl/gen
|
||||
ifneq "$(SWIG)" ""
|
||||
# Only delete these files if we can regenerate them
|
||||
CLEAN += modperl/ZNC.pm modperl/swigperlrun.h modperl/modperl_biglib.cpp modperl/perlfunctions.cpp
|
||||
endif
|
||||
|
||||
all: modperl_all
|
||||
|
||||
else
|
||||
FILES := $(shell echo $(FILES) | sed -e "s/modperl//")
|
||||
endif
|
||||
|
||||
.PHONY: modperl_install modperl_all
|
||||
|
||||
install: $(PERLHOOK)
|
||||
|
||||
modperl_all: modperl/ZNC.$(PERLCEXT_EXT) modperl/swigperlrun.h modperl/perlfunctions.cpp
|
||||
|
||||
modperl/ZNC.$(PERLCEXT_EXT): modperl/ZNC.o Makefile modperl.so
|
||||
$(E) Linking ZNC Perl bindings library...
|
||||
$(Q)$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -o $@ $< $(PERL_LD) $(PERLDEPONMOD) $(LIBS)
|
||||
|
||||
modperl/ZNC.o: modperl/modperl_biglib.cpp Makefile
|
||||
@mkdir -p modperl
|
||||
@mkdir -p .depend
|
||||
$(E) Building ZNC Perl bindings library...
|
||||
$(Q)$(CXX) $(MODFLAGS) -I$(srcdir) -MD -MF .depend/modperl.library.dep $(PERL_CXX) -Wno-unused-variable -Wno-shadow -o $@ $< -c
|
||||
|
||||
ifneq "$(SWIG)" ""
|
||||
include $(srcdir)/modperl/Makefile.gen
|
||||
else
|
||||
modperl/swigperlrun.h modperl/ZNC.pm modperl/perlfunctions.cpp: modperl/modperl_biglib.cpp
|
||||
modperl/modperl_biglib.cpp: modperl/generated.tar.gz
|
||||
@mkdir -p modperl
|
||||
$(E) Unpacking ZNC Perl bindings...
|
||||
$(Q)tar -xf $^ -C modperl
|
||||
endif
|
||||
|
||||
modperl.o: modperl/perlfunctions.cpp modperl/swigperlrun.h
|
||||
|
||||
modperl_install: install_datadir modperl_all
|
||||
for i in $(wildcard $(srcdir)/*.pm); do \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(MODDIR); \
|
||||
done
|
||||
mkdir -p $(DESTDIR)$(MODDIR)/modperl
|
||||
$(INSTALL_PROGRAM) modperl/ZNC.$(PERLCEXT_EXT) $(DESTDIR)$(MODDIR)/modperl
|
||||
if test -e modperl/ZNC.pm ; then \
|
||||
$(INSTALL_DATA) modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl || exit 1 ; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl || exit 1 ; \
|
||||
fi
|
||||
$(INSTALL_DATA) $(srcdir)/modperl/startup.pl $(DESTDIR)$(MODDIR)/modperl
|
||||
Reference in New Issue
Block a user