From: Quentin Young Date: Fri, 18 May 2018 19:10:31 +0000 (+0000) Subject: doc: fix distclean X-Git-Tag: frr-6.1-dev~423^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F2260%2Fhead;p=mirror%2Ffrr.git doc: fix distclean Apparently Automake has some undocumented logic somewhere that makes it so any Makefile generated from an Automake Makefile.am is removed from its secret list of things to delete that it deletes when performing a recursive distclean before actually performing the recursive distclean and since the secret list is automatically generated from the list of things that Autoconf should generate in configure.ac we can't remove the Makefile from that list or it will break Automake's list of things to automatically generate that it generates from Autoconf's list of things to automatically generate. Thus, to prevent Automake from deleting Makefiles and then immediately trying to use the Makefiles it just deleted to delete said Makefiles, we must remove ourselves from the secret list, which is accomplished by changing the file extension to '.am' instead of '.in'. Signed-off-by: Quentin Young --- diff --git a/doc/Makefile.am b/doc/Makefile.am index 19561c031d..79c0a493a5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -140,7 +140,7 @@ EXTRA_DIST = frr-sphinx.mk \ manpages/index.rst \ manpages/isisd.rst \ manpages/ldpd.rst \ - manpages/Makefile \ + manpages/Makefile.am \ manpages/mtracebis.rst \ manpages/nhrpd.rst \ manpages/ospf6d.rst \ @@ -182,7 +182,7 @@ EXTRA_DIST = frr-sphinx.mk \ developer/index.rst \ developer/ldpd-basic-test-setup.md \ developer/library.rst \ - developer/Makefile \ + developer/Makefile.in \ developer/memtypes.rst \ developer/modules.rst \ developer/next-hop-tracking.rst \ @@ -205,7 +205,7 @@ EXTRA_DIST = frr-sphinx.mk \ user/ipv6.rst \ user/isisd.rst \ user/kernel.rst \ - user/Makefile \ + user/Makefile.am \ user/nhrpd.rst \ user/ospf6d.rst \ user/ospfd.rst \ diff --git a/doc/developer/.gitignore b/doc/developer/.gitignore index 2e7d8573f1..81c60dc0a3 100644 --- a/doc/developer/.gitignore +++ b/doc/developer/.gitignore @@ -1,3 +1,2 @@ /_templates /_build -!/Makefile.in diff --git a/doc/developer/Makefile.am b/doc/developer/Makefile.am new file mode 100644 index 0000000000..76758f9242 --- /dev/null +++ b/doc/developer/Makefile.am @@ -0,0 +1,8 @@ +# This is necessary to support VPATH builds. +srcdir = @srcdir@ +VPATH = @srcdir@ + +# This variable is used as the documentation source location in frr-sphinx.mk +SOURCESDIR = @srcdir@ + +include @srcdir@/../frr-sphinx.mk diff --git a/doc/developer/Makefile.in b/doc/developer/Makefile.in deleted file mode 100644 index 76758f9242..0000000000 --- a/doc/developer/Makefile.in +++ /dev/null @@ -1,8 +0,0 @@ -# This is necessary to support VPATH builds. -srcdir = @srcdir@ -VPATH = @srcdir@ - -# This variable is used as the documentation source location in frr-sphinx.mk -SOURCESDIR = @srcdir@ - -include @srcdir@/../frr-sphinx.mk diff --git a/doc/manpages/.gitignore b/doc/manpages/.gitignore index 2e7d8573f1..81c60dc0a3 100644 --- a/doc/manpages/.gitignore +++ b/doc/manpages/.gitignore @@ -1,3 +1,2 @@ /_templates /_build -!/Makefile.in diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am new file mode 100644 index 0000000000..009c723823 --- /dev/null +++ b/doc/manpages/Makefile.am @@ -0,0 +1,48 @@ +# This is necessary to support VPATH builds. +srcdir = @srcdir@ +VPATH = @srcdir@ + +# This variable is used as the documentation source location in frr-sphinx.mk +SOURCESDIR = @srcdir@ + +include @srcdir@/../frr-sphinx.mk + +# ----------------------------------------------------------------------------- +# Automake requires that 3rd-party Makefiles recognize these targets. +# ----------------------------------------------------------------------------- +# install +# install-data +# install-exec +# uninstall +# install-dvi +# install-html +# install-info +# install-ps +# install-pdf +# installdirs +# check +# installcheck +# mostlyclean +# clean +# distclean +# maintainer-clean +# dvi +# pdf +# ps +# info +# html +# tags +# ctags + +# These targets are automatically generated by Sphinx but conflict with +# implicitly defined Automake rules, so we manually override them to nothing. +# The other option is deleting the Sphinx-generated rules, which suppresses the +# warning but kinda screws up the symmetry between Makefiles. +info: ; +html: ; + +all: man + +install-data: man + +install: install-data diff --git a/doc/manpages/Makefile.in b/doc/manpages/Makefile.in deleted file mode 100644 index f28746cee6..0000000000 --- a/doc/manpages/Makefile.in +++ /dev/null @@ -1,55 +0,0 @@ -# This is necessary to support VPATH builds. -srcdir = @srcdir@ -VPATH = @srcdir@ - -# This variable is used as the documentation source location in frr-sphinx.mk -SOURCESDIR = @srcdir@ - -include @srcdir@/../frr-sphinx.mk - -# ----------------------------------------------------------------------------- -# Automake requires that 3rd-party Makefiles recognize these targets. -# ----------------------------------------------------------------------------- -# install -# install-data -# install-exec -# uninstall -# install-dvi -# install-html -# install-info -# install-ps -# install-pdf -# installdirs -# check -# installcheck -# mostlyclean -# clean -# distclean -# maintainer-clean -# dvi -# pdf -# ps -# info -# html -# tags -# ctags - -# ignore these targets -EMPTY_AUTOMAKE_TARGETS = dvi pdf ps tags ctags distdir installdirs check installcheck install-dvi install-ps install-html install-pdf install-info install-exec -.PHONY: $(EMPTY_AUTOMAKE_TARGETS) -$(EMPTY_AUTOMAKE_TARGETS): - -# These targets are automatically generated by Sphinx but conflict with -# implicitly defined Automake rules, so we manually override them to nothing. -# The other option is deleting the Sphinx-generated rules, which suppresses the -# warning but kinda screws up the symmetry between Makefiles. -info: ; -html: ; - -all: man - -install-data: man - -install: install-data - -mostlyclean distclean maintainer-clean: clean diff --git a/doc/user/.gitignore b/doc/user/.gitignore index 2e7d8573f1..81c60dc0a3 100644 --- a/doc/user/.gitignore +++ b/doc/user/.gitignore @@ -1,3 +1,2 @@ /_templates /_build -!/Makefile.in diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am new file mode 100644 index 0000000000..64af2ff145 --- /dev/null +++ b/doc/user/Makefile.am @@ -0,0 +1,55 @@ +# This is necessary to support VPATH builds. +srcdir = @srcdir@ +VPATH = @srcdir@ + +# This variable is used as the documentation source location in frr-sphinx.mk +SOURCESDIR = @srcdir@ + +include @srcdir@/../frr-sphinx.mk + +# ----------------------------------------------------------------------------- +# Automake requires that 3rd-party Makefiles recognize these targets. +# ----------------------------------------------------------------------------- +# install +# install-data +# install-exec +# uninstall +# install-dvi +# install-html +# install-info +# install-ps +# install-pdf +# installdirs +# check +# installcheck +# mostlyclean +# clean +# distclean +# maintainer-clean +# dvi +# pdf +# ps +# info +# html +# tags +# ctags + +# When building 'all', the logic is that we want to make docs that are easily +# readable by the person that just built them. Technically the reST source is +# readable in its own right, but we'll also build info and html because those +# offer sequentially better reading experiences. PDF is not built by default +# because it takes quite a while. +all: info + +# info and html already have built-in sphinx rules; pdf goes to latexpdf +pdf: latexpdf + +# install user manual as info file +install-info: info + install -d ${DESTDIR}${infodir} + gzip < _build/texinfo/frr.info > ${DESTDIR}${infodir}/frr.info.gz + install-info _build/texinfo/frr.info ${DESTDIR}${infodir}/dir + +install-data: install-info + +install: install-data diff --git a/doc/user/Makefile.in b/doc/user/Makefile.in deleted file mode 100644 index 77c6abf917..0000000000 --- a/doc/user/Makefile.in +++ /dev/null @@ -1,62 +0,0 @@ -# This is necessary to support VPATH builds. -srcdir = @srcdir@ -VPATH = @srcdir@ - -# This variable is used as the documentation source location in frr-sphinx.mk -SOURCESDIR = @srcdir@ - -include @srcdir@/../frr-sphinx.mk - -# ----------------------------------------------------------------------------- -# Automake requires that 3rd-party Makefiles recognize these targets. -# ----------------------------------------------------------------------------- -# install -# install-data -# install-exec -# uninstall -# install-dvi -# install-html -# install-info -# install-ps -# install-pdf -# installdirs -# check -# installcheck -# mostlyclean -# clean -# distclean -# maintainer-clean -# dvi -# pdf -# ps -# info -# html -# tags -# ctags - -# ignore these targets -EMPTY_AUTOMAKE_TARGETS = dvi ps tags ctags distdir install-exec install-dvi install-ps installdirs check installcheck install-html install-pdf install-data install -.PHONY: $(EMPTY_AUTOMAKE_TARGETS) -$(EMPTY_AUTOMAKE_TARGETS): - -# When building 'all', the logic is that we want to make docs that are easily -# readable by the person that just built them. Technically the reST source is -# readable in its own right, but we'll also build info and html because those -# offer sequentially better reading experiences. PDF is not built by default -# because it takes quite a while. -all: info - -# info and html already have built-in sphinx rules; pdf goes to latexpdf -pdf: latexpdf - -# install user manual as info file -install-info: info - install -d ${DESTDIR}${infodir} - gzip < _build/texinfo/frr.info > ${DESTDIR}${infodir}/frr.info.gz - install-info _build/texinfo/frr.info ${DESTDIR}${infodir}/dir - -install-data: install-info - -install: install-data - -mostlyclean distclean maintainer-clean: clean