-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from RaumZeit/dev_refactor_swig
SWIG: Update autoconf build process for swig wrappers
- Loading branch information
Showing
25 changed files
with
803 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# the subdirectories of the interface | ||
if ENABLE_SWIG | ||
SUBDIRS = @PERL_INTERFACE@ @PYTHON2_INTERFACE@ @PYTHON3_INTERFACE@ | ||
|
||
SUBDIRS = Python Perl | ||
SOURCES = \ | ||
RNAblueprint.i | ||
|
||
endif | ||
EXTRA_DIST = \ | ||
RNAblueprint.i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# ignore files that are created by SWIG | ||
RNAblueprint.pm | ||
RNAblueprint_wrap.* | ||
auto | ||
version.i | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,95 @@ | ||
# this is: interfaces/Perl/Makefile.am | ||
if ENABLE_PERL5 | ||
perlextdir = $(PERL_EXT_LIB) | ||
include ../generic.mk | ||
|
||
|
||
PERL_MODULE = $(SWIG_module_name).pm | ||
|
||
perlextdir = $(prefix)$(PERL_ARCH_RELATIVE_INSTALL_DIR)/auto/RNAblueprint | ||
perlext_LTLIBRARIES = RNAblueprint.la | ||
|
||
RNAblueprint_la_SOURCES = $(top_srcdir)/interfaces/RNAblueprint.i | ||
nodist_RNAblueprint_la_SOURCES = RNAblueprint_wrap.cxx $(SWIG_SOURCES) | ||
nodist_perlext_SCRIPTS = RNAblueprint.pm | ||
LANG_SPECIFIC_INTERFACE_FILES = \ | ||
$(builddir)/version.i | ||
|
||
RNAblueprint_la_CPPFLAGS = -I$(top_srcdir)/lib $(PERL_EXT_CPPFLAGS) $(SWIG_PERL_CPPFLAGS) $(PERLXS_CFLAGS) $(BOOST_CPPFLAGS) | ||
RNAblueprint_la_LIBADD = $(LDADD) $(top_srcdir)/lib/libRNAblueprint.la $(PERLXS_LIBS) $(BOOST_GRAPH_LIBS) | ||
RNAblueprint_la_LDFLAGS = -avoid-version -module -shared -export-dynamic $(PERLXS_LDFLAGS) $(BOOST_GRAPH_LDFLAGS) | ||
INTERFACE_FILES = $(SWIG_src) \ | ||
$(LANG_SPECIFIC_INTERFACE_FILES) | ||
|
||
RNAblueprint_wrap.cxx: $(top_srcdir)/interfaces/RNAblueprint.i | ||
$(SWIG) -I${top_srcdir}/lib -includeall -o RNAblueprint_wrap.cxx -perl ${top_srcdir}/interfaces/RNAblueprint.i | ||
RNAblueprint_la_SOURCES = $(INTERFACE_FILES) \ | ||
$(SWIG_wrapper) | ||
|
||
RNAblueprint.pm: RNAblueprint_wrap.cxx | ||
perlmoddir = $(prefix)$(PERL_LIB_RELATIVE_INSTALL_DIR) | ||
nobase_dist_perlmod_DATA = \ | ||
$(PERL_MODULE) | ||
|
||
clean-local: | ||
rm -rf RNAblueprint_wrap.cxx RNAblueprint.pm | ||
RNAblueprint_la_CPPFLAGS = -I$(PERL_EXT_INC) -I$(top_srcdir)/lib $(BOOST_CPPFLAGS) | ||
RNAblueprint_la_CXXFLAGS = -Wno-unused-label -Wno-unused-variable | ||
|
||
RNAblueprint_la_LIBADD = \ | ||
$(LDADD) \ | ||
$(top_builddir)/lib/libRNAblueprint_conv.la \ | ||
$(BOOST_GRAPH_LIBS) \ | ||
-lstdc++ | ||
|
||
RNAblueprint_la_LDFLAGS = \ | ||
-avoid-version \ | ||
-module \ | ||
-shared \ | ||
-export-dynamic \ | ||
-shrext \ | ||
$(BOOST_GRAPH_LDFLAGS) \ | ||
$(PERL_SO) | ||
|
||
EXTRA_DIST = \ | ||
$(SWIG_wrapper) \ | ||
$(PERL_MODULE) \ | ||
$(LANG_SPECIFIC_INTERFACE_FILES) | ||
|
||
## | ||
## SWIG interface wrapper code generation | ||
## | ||
|
||
if ENABLE_SWIG | ||
|
||
$(SWIG_wrapper) $(PERL_MODULE): $(INTERFACE_FILES) | ||
$(swig_verbose)$(SWIG) -I$(top_srcdir)/src \ | ||
-I$(srcdir) -I$(builddir) \ | ||
-includeall \ | ||
-perl5 -proxy -const -c++ \ | ||
-module RNAblueprint -o $(SWIG_wrapper) \ | ||
$(SWIG_main_src) | ||
|
||
endif | ||
|
||
## | ||
## copy shared library for perl-tests | ||
## | ||
|
||
auto/RNAblueprint/RNAblueprint$(PERL_SO): RNAblueprint.la | ||
$(AM_V_GEN)( $(MKDIR_P) auto/RNAblueprint ) && \ | ||
( \ | ||
$(LIBTOOL) --config > libtoolconfig.tmp && \ | ||
( . ./libtoolconfig.tmp; cp "$$objdir/RNAblueprint$(PERL_SO)" auto/RNAblueprint ) && \ | ||
rm -f libtoolconfig.tmp \ | ||
) | ||
|
||
all-local: auto/RNAblueprint/RNAblueprint$(PERL_SO) | ||
|
||
clean-local: | ||
-rm -rf auto | ||
|
||
## Remove the .la file - RNAblueprint.la is never linked against (it's a module) | ||
## and Perl doesn't use libltdl. Note that the library gets installed by | ||
## install-data, so that's where we need to hook. | ||
install-data-hook: | ||
rm -f $(DESTDIR)$(perlextdir)/RNAblueprint.la | ||
|
||
## Because we don't install the .la file, "make uninstall" doesn't work and | ||
## we need to remove the file ourselves. | ||
uninstall-local: | ||
eval `grep '^dlname=' $(perlext_LTLIBRARIES)` ; \ | ||
rm -f $(DESTDIR)$(perlextdir)/"$$dlname" | ||
|
||
## remove all generated content | ||
maintainer-clean-local: | ||
-rm -f $(SWIG_wrapper) $(PERL_MODULE) | ||
|
||
distclean-local: | ||
-rm -f $(SWIG_wrapper) $(PERL_MODULE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
%{ | ||
/** @file version.i.in | ||
* @brief Set $RNAblueprint::VERSION to the bindings version | ||
*/ | ||
%} | ||
|
||
%perlcode %{ | ||
our $VERSION = '@PACKAGE_VERSION@'; | ||
sub VERSION () { $VERSION }; | ||
%} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
RNAblueprint/ | ||
RNAblueprint_wrap.* | ||
RNAblueprint.py | ||
version.i | ||
*.so |
Oops, something went wrong.