From: Pieter Lexis Date: Thu, 31 Mar 2016 06:13:13 +0000 (+0200) Subject: make dnspcap2protobuf buildable without `make all` X-Git-Tag: dnsdist-1.0.0-beta1~14^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a1cf612e62a1e9b224cefb567aa028d8b44b0f0;p=thirdparty%2Fpdns.git make dnspcap2protobuf buildable without `make all` --- diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 055de8d35e..90b1a4b30a 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -61,7 +61,8 @@ CLEANFILES = \ *.gcov \ backends/gsql/gsqlbackend.gcda \ backends/gsql/gsqlbackend.gcno \ - backends/gsql/gsqlbackend.gcov + backends/gsql/gsqlbackend.gcov \ + dnsmessage.pb.cc dnsmessage.pb.h noinst_SCRIPTS = pdns.init sysconf_DATA = pdns.conf-dist @@ -121,10 +122,6 @@ EXTRA_PROGRAMS = \ tsig-tests \ zone2ldap -if HAVE_PROTOBUF -EXTRA_PROGRAMS += dnspcap2protobuf -endif - pdns_server_SOURCES = \ arguments.cc arguments.hh \ auth-carbon.cc \ @@ -1010,10 +1007,16 @@ dnsdemog_LDFLAGS = \ dnsdemog_LDADD = \ $(OPENSSL_LIBS) +if HAVE_PROTOBUF +if HAVE_PROTOC +EXTRA_PROGRAMS += dnspcap2protobuf + dnsmessage.pb.cc: dnsmessage.proto - protoc --cpp_out=./ $< + $(AM_V_GEN)$(PROTOC) --cpp_out=./ $< + +BUILT_SOURCES += dnsmessage.pb.cc +dnspcap2protobuf.$(OBJEXT): dnsmessage.pb.cc -if HAVE_PROTOBUF dnspcap2protobuf_SOURCES = \ base32.cc \ base64.cc base64.hh \ @@ -1034,7 +1037,7 @@ dnspcap2protobuf_SOURCES = \ unix_utility.cc \ utility.hh -nodist_dnspcap2protobuf_SOURCES=dnsmessage.pb.cc dnsmessage.pb.h +nodist_dnspcap2protobuf_SOURCES=dnsmessage.pb.cc dnsmessage.pb.h dnspcap2protobuf_LDFLAGS = \ $(AM_LDFLAGS) \ @@ -1046,6 +1049,7 @@ dnspcap2protobuf_LDADD = \ $(PROTOBUF_LIBS) \ $(BOOST_PROGRAM_OPTIONS_LIBS) endif +endif testrunner_SOURCES = \ arguments.cc \