]> git.puffer.fish Git - matthieu/frr.git/commitdiff
doc: don't override automake builtin targets
authorQuentin Young <qlyoung@nvidia.com>
Wed, 5 Mar 2025 20:15:35 +0000 (12:15 -0800)
committerQuentin Young <qlyoung@nvidia.com>
Wed, 5 Mar 2025 20:25:31 +0000 (12:25 -0800)
Automake generates default targets for `info`, `html`, `pdf` and
corresponding `install-info` and `install-html` targets to install the
artifacts generated by those rules. Prior to this change we are
overriding those targets which generates a warning.

The automake targets are designed to automatically build texinfo sources
without requiring user-specified rules. We do not have texinfo sources
so this functionality is not in use, but we are still overriding the
built in targets which is considered poor form. Automake has facilities
to modify the built in targets in the form of `-local` rules; this patch
renames the rules we had defined to use the `-local` ones.

The resulting targets generated by Automake look like this:

  html: html-am
  html-am: html-local

i.e. the final `html` target generated when using `html-local` to define
our custom rules is identical to the one we get by overriding the built
in `html` target. The same goes for the others.

So, the only effect this patch has is suppressing the warnings and
bringing us in line with Automake best practice.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
doc/user/subdir.am

index e4e12788e70d446c067e41b6800a3eee44896ca5..35619175580def9fdb9b44d9394be9ed46e6ed96 100644 (file)
@@ -84,9 +84,9 @@ endif
 #
 
 .PHONY: info html pdf
-info: $(USERBUILD)/texinfo/frr.info
-html: $(USERBUILD)/html/.buildinfo
-pdf:  $(USERBUILD)/latexpdf
+info-local: $(USERBUILD)/texinfo/frr.info
+html-local: $(USERBUILD)/html/.buildinfo
+pdf-local:  $(USERBUILD)/latexpdf
 
 #
 # hook-ins for clean / install / doc
@@ -100,7 +100,7 @@ clean-userdocs:
 # INSTALL_INFO=install-info
 .PHONY: install-info uninstall-info install-html uninstall-html
 
-install-info: $(USERBUILD)/texinfo/frr.info
+install-info-local: $(USERBUILD)/texinfo/frr.info
        $(MKDIR_P) "$(DESTDIR)$(infodir)"
        $(INSTALL_DATA) "$<" "$(DESTDIR)$(infodir)"
        [ -z "${DESTDIR}" ] && $(INSTALL_INFO) --info-dir="$(DESTDIR)$(infodir)" "$<" || true
@@ -108,7 +108,7 @@ uninstall-info: $(USERBUILD)/texinfo/frr.info
        -rm -f "$(DESTDIR)$(infodir)/$<"
        [ -z "${DESTDIR}" ] && $(INSTALL_INFO) --delete --info-dir="$(DESTDIR)$(infodir)" "$<" || true
 
-install-html: $(USERBUILD)/html/.buildinfo
+install-html-local: $(USERBUILD)/html/.buildinfo
        $(MKDIR_P) "$(DESTDIR)$(htmldir)"
        cp -r "$(USERBUILD)/html" "$(DESTDIR)$(htmldir)"
 uninstall-html: