summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Sankar <[email protected]>2020-06-21 22:13:02 -0400
committerBrian Behlendorf <[email protected]>2020-06-24 18:19:44 -0700
commit0b03254830a79ed0784b517467442ad38404de74 (patch)
tree4fa2e1f3e31892fc099a8bba842ba0bb91368145
parent2989d1012ac00b4134a0dc490917e0b0d048d289 (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Arvind Sankar <[email protected]> Closes #10493
-rw-r--r--Makefile.am10
-rw-r--r--module/Makefile.in35
2 files changed, 15 insertions, 30 deletions
diff --git a/Makefile.am b/Makefile.am
index a90c71ee9..597fc19b6 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 6df0f5636..34e61945b 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