From: Ondřej Surý Date: Mon, 22 Jun 2020 11:03:07 +0000 (+0200) Subject: Rebuild the file in doc/misc only when in maintainer mode X-Git-Tag: v9.17.3~44^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1093533ef00ac97f177a9c9ab2c4566c4e8022f;p=thirdparty%2Fbind9.git Rebuild the file in doc/misc only when in maintainer mode The files in doc/misc requires all the BIND 9 libraries to be built before the documentation can be built. One of the extra automake features is maintainer mode that allows to conditionally build and clean files that require special tools. Make use of the automake maintainer mode to not rebuild the files in doc/misc under normal circumstances. --- diff --git a/doc/misc/Makefile.am b/doc/misc/Makefile.am index 04790912cb6..674c65247c8 100644 --- a/doc/misc/Makefile.am +++ b/doc/misc/Makefile.am @@ -1,20 +1,7 @@ include $(top_srcdir)/Makefile.top include $(top_srcdir)/Makefile.docs -noinst_PROGRAMS = cfg_test - -cfg_test_CFLAGS = \ - $(AM_CFLAGS) \ - $(LIBISC_CFLAGS) \ - $(LIBDNS_CFLAGS) \ - $(LIBISCCFG_CFLAGS) - -cfg_test_LDADD = \ - $(LIBISC_LIBS) \ - $(LIBDNS_LIBS) \ - $(LIBISCCFG_LIBS) - -BUILT_SOURCES = \ +OPTIONS_FILES = \ options \ options.active \ master.zoneopt \ @@ -51,15 +38,33 @@ BUILT_SOURCES = \ managed-keys.grammar.rst \ trusted-keys.grammar.rst -EXTRA_DIST = \ - $(BUILT_SOURCES) \ +EXTRA_DIST = \ + $(OPTIONS_FILES) \ format-options.pl \ rst-grammars.pl \ rst-options.pl \ rst-zoneopt.pl \ sort-options.pl -MAINTAINERCLEANFILES = $(BUILT_SOURCES) +if MAINTAINER_MODE + +MAINTAINERCLEANFILES = $(OPTIONS_FILES) + +noinst_PROGRAMS = cfg_test + +cfg_test_CFLAGS = \ + $(AM_CFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) + +cfg_test_LDADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBISCCFG_LIBS) + +BUILT_SOURCES = \ + $(OPTIONS_FILES) options: cfg_test $(AM_V_CFG_TEST)$(builddir)/cfg_test --named --grammar | $(PERL) $(srcdir)/sort-options.pl | $(PERL) $(srcdir)/format-options.pl --strip-not-configured > $@ @@ -165,3 +170,5 @@ managed-keys.grammar.rst: options.active trusted-keys.grammar.rst: options.active $(AM_V_RST_GRAMMARS)$(PERL) $(srcdir)/rst-grammars.pl options.active trusted-keys > $@ + +endif