From 97e72521285a2ff2189334cb43d0a8f385d73e4a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 11 Aug 2018 10:40:26 +0200 Subject: [PATCH] fix build order: peerinfo logic depending on transport must be in peerinfo-tool --- src/peerinfo-tool/Makefile.am | 23 +++++++++++++++++++ .../plugin_rest_peerinfo.c | 0 src/peerinfo/Makefile.am | 23 +------------------ 3 files changed, 24 insertions(+), 22 deletions(-) rename src/{peerinfo => peerinfo-tool}/plugin_rest_peerinfo.c (100%) diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am index 648957a05..6f9a3360c 100644 --- a/src/peerinfo-tool/Makefile.am +++ b/src/peerinfo-tool/Makefile.am @@ -10,6 +10,8 @@ if USE_COVERAGE XLIB = -lgcov endif +plugindir = $(libdir)/gnunet + bin_PROGRAMS = \ gnunet-peerinfo @@ -24,6 +26,27 @@ gnunet_peerinfo_LDADD = \ $(top_builddir)/src/statistics/libgnunetstatistics.la \ $(top_builddir)/src/util/libgnunetutil.la +if HAVE_MHD +if HAVE_JSON +plugin_LTLIBRARIES = \ + libgnunet_plugin_rest_peerinfo.la +endif +endif + + +libgnunet_plugin_rest_peerinfo_la_SOURCES = \ + plugin_rest_peerinfo.c +libgnunet_plugin_rest_peerinfo_la_LIBADD = \ + $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ + $(top_builddir)/src/transport/libgnunettransport.la \ + $(top_builddir)/src/rest/libgnunetrest.la \ + $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ + $(LTLIBINTL) -ljansson -lmicrohttpd +libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \ + $(GN_PLUGIN_LDFLAGS) + + + if HAVE_PYTHON check_SCRIPTS = \ test_gnunet_peerinfo.py diff --git a/src/peerinfo/plugin_rest_peerinfo.c b/src/peerinfo-tool/plugin_rest_peerinfo.c similarity index 100% rename from src/peerinfo/plugin_rest_peerinfo.c rename to src/peerinfo-tool/plugin_rest_peerinfo.c diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am index 5e96250b1..926b9ae94 100644 --- a/src/peerinfo/Makefile.am +++ b/src/peerinfo/Makefile.am @@ -5,8 +5,6 @@ pkgcfgdir= $(pkgdatadir)/config.d/ libexecdir= $(pkglibdir)/libexec/ -plugindir = $(libdir)/gnunet - pkgcfg_DATA = \ peerinfo.conf @@ -28,7 +26,6 @@ libgnunetpeerinfo_la_LIBADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/json/libgnunetjson.la \ - $(top_builddir)/src/transport/libgnunettransport.la \ $(XLIB) \ $(LTLIBINTL) libgnunetpeerinfo_la_LDFLAGS = \ @@ -39,30 +36,12 @@ libgnunetpeerinfo_la_LDFLAGS = \ libexec_PROGRAMS = \ gnunet-service-peerinfo -if HAVE_MHD -if HAVE_JSON -plugin_LTLIBRARIES = \ - libgnunet_plugin_rest_peerinfo.la -endif -endif - gnunet_service_peerinfo_SOURCES = \ - gnunet-service-peerinfo.c + gnunet-service-peerinfo.c gnunet_service_peerinfo_LDADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/statistics/libgnunetstatistics.la \ $(top_builddir)/src/util/libgnunetutil.la - - -libgnunet_plugin_rest_peerinfo_la_SOURCES = \ - plugin_rest_peerinfo.c -libgnunet_plugin_rest_peerinfo_la_LIBADD = \ - libgnunetpeerinfo.la \ - $(top_builddir)/src/rest/libgnunetrest.la \ - $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ - $(LTLIBINTL) -ljansson -lmicrohttpd -libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \ - $(GN_PLUGIN_LDFLAGS) if HAVE_BENCHMARKS PEERINFO_BENCHMARKS = \ -- 2.25.1