]> granicus.if.org Git - pdns/commitdiff
Remove dnsdist from auth tarball
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 14 Jan 2016 10:08:47 +0000 (11:08 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 14 Jan 2016 10:08:47 +0000 (11:08 +0100)
This ensures any files _only_ needed for dnsdist are not distributed,
that dnsdist (htmlfiles.h specifically) cannot be built from the tarball.

But still allow building dnsdist from the repository root.

configure.ac
pdns/Makefile.am

index 6f827490ee499ae29d935239f5750d604648583d..ed0f732b55265ffc1590a5d6b28b3b8e47eb6a12 100644 (file)
@@ -322,6 +322,10 @@ PDNS_ENABLE_COVERAGE
 PDNS_ENABLE_SANITIZERS
 PDNS_ENABLE_MALLOC_TRACE
 
+# Test if the pdns/dnsdistdist/html directory exists, so `make dnsdist` from the
+# repo root can still work.
+AM_CONDITIONAL([HAVE_DNSDISTDISTHTML], [test -d $srcdir/pdns/dnsdistdist/html])
+
 AC_SUBST(LIBS)
 
 AC_SUBST([AM_CPPFLAGS],
index 389bfbb5f9a8d5e3ee279a463c061943f5a1f77d..22f2dc5e56b73041f70f33ee8786dfa876747dcd 100644 (file)
@@ -52,7 +52,7 @@ EXTRA_DIST = \
 
 BUILT_SOURCES = \
        bind-dnssec.schema.sqlite3.sql.h \
-       bindparser.h htmlfiles.h 
+       bindparser.h
 
 CLEANFILES = \
        *.gcda \
@@ -99,7 +99,6 @@ EXTRA_PROGRAMS = \
        calidns \
        dnsbulktest \
        dnsdemog \
-       dnsdist \
        dnsgram \
        dnsreplay \
        dnsscan \
@@ -611,7 +610,11 @@ dnstcpbench_LDADD = \
        $(MBEDTLS_LIBS) \
        $(BOOST_PROGRAM_OPTIONS_LIBS)
 
-dnsdist_SOURCES = \
+if HAVE_DNSDISTDISTHTML
+BUILT_SOURCES += htmlfiles.h
+EXTRA_PROGRAMS += dnsdist
+
+nodist_dnsdist_SOURCES = \
        base32.cc \
        base64.hh \
        dns.cc \
@@ -652,6 +655,10 @@ dnsdist_LDADD = \
        $(YAHTTP_LIBS) \
        $(LIBSODIUM_LIBS)
 
+htmlfiles.h: $(srcdir)/dnsdistdist/html/*
+       $(srcdir)/dnsdistdist/incfiles $(srcdir)/dnsdistdist > $@
+endif
+
 nsec3dig_SOURCES = \
        base32.cc \
        base64.cc base64.hh \
@@ -1226,9 +1233,6 @@ endif
 dnslabeltext.cc: dnslabeltext.rl
        $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
 
-htmlfiles.h: $(srcdir)/dnsdistdist/html/*
-       $(srcdir)/dnsdistdist/incfiles $(srcdir)/dnsdistdist > $@
-
 bind-dnssec.schema.sqlite3.sql.h: bind-dnssec.schema.sqlite3.sql
        ( echo 'static char sqlCreate[] __attribute__((unused))=' ; sed 's/$$/"/g' $< | sed 's/^/"/g'  ; echo ';' ) > $@