]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Rebuild the file in doc/misc only when in maintainer mode
authorOndřej Surý <ondrej@isc.org>
Mon, 22 Jun 2020 11:03:07 +0000 (13:03 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 22 Jun 2020 12:08:53 +0000 (14:08 +0200)
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.

doc/misc/Makefile.am

index 04790912cb684fa213e8e8943366f0cb6fdceb77..674c65247c844e9e49cb69160a8ed16ec4d8bef1 100644 (file)
@@ -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