From 5b1bae0c1bd66f3a003466ed4854dc9e9fd46f80 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 5 Mar 2025 12:15:35 -0800 Subject: [PATCH] doc: don't override automake builtin targets 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 --- doc/user/subdir.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/user/subdir.am b/doc/user/subdir.am index e4e12788e7..3561917558 100644 --- a/doc/user/subdir.am +++ b/doc/user/subdir.am @@ -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: -- 2.39.5