From 0b03254830a79ed0784b517467442ad38404de74 Mon Sep 17 00:00:00 2001 From: Arvind Sankar Date: Sun, 21 Jun 2020 22:13:02 -0400 Subject: [PATCH] Fix tags targets in module/Makefile.in + cleanup These targets look to have been copied from an automake-generated Makefile.in, and can't work since none of the auto-generated automake variables are defined here. Moreover, ctags has been overridden in the top-level Makefile, so the target is pointless anyway, and gtags is not a recursive target. Fix cscopelist by moving it to the top-level Makefile as well, in line with ctags and etags. Also, add -a to ctags command as well, otherwise it won't work if more than one xargs invocation takes place. Add assembler files to ctags/etags, prune all dotted-dirs, and restrict the find to files only. Cleanup: add .PHONY to module/Makefile.in, and fix one recipe with a missing continuation character. Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Signed-off-by: Arvind Sankar Closes #10493 --- Makefile.am | 10 ++++++++-- module/Makefile.in | 35 +++++++---------------------------- 2 files changed, 15 insertions(+), 30 deletions(-) diff --git a/Makefile.am b/Makefile.am index a90c71ee91..597fc19b6c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -194,11 +194,17 @@ flake8: ctags: $(RM) tags - find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags + find $(top_srcdir) -name '.?*' -prune \ + -o -type f -name '*.[hcS]' -print | xargs ctags -a etags: $(RM) TAGS - find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a + find $(top_srcdir) -name '.?*' -prune \ + -o -type f -name '*.[hcS]' -print | xargs etags -a + +cscopelist: + find $(top_srcdir) -name '.?*' -prune \ + -o -type f -name '*.[hc]' -print >cscope.files tags: ctags etags diff --git a/module/Makefile.in b/module/Makefile.in index 6df0f5636b..34e61945b8 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -10,6 +10,12 @@ install: modules_install uninstall: modules_uninstall check: +.PHONY: all distclean maintainer-clean install uninstall check distdir \ + modules modules-Linux modules-FreeBSD modules-unknown \ + clean clean-Linux clean-FreeBSD \ + modules_install modules_install-Linux modules_install-FreeBSD \ + modules_uninstall modules_uninstall-Linux modules_uninstall-FreeBSD + # Filter out options that FreeBSD make doesn't understand getflags = ( \ set -- \ @@ -82,33 +88,6 @@ modules_install-Linux: depmod -ae -F $$sysmap @LINUX_VERSION@; \ fi -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - modules_install-FreeBSD: @# Install the kernel modules +$(FMAKE) install @@ -117,7 +96,7 @@ modules_install: modules_install-@ac_system@ modules_uninstall-Linux: @# Uninstall the kernel modules - kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@ + kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@ \ list='$(ZFS_MODULES)'; for objdir in $$list; do \ $(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$objdir; \ done