summaryrefslogtreecommitdiffstats
path: root/share/mk/lint
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/lint')
-rw-r--r--share/mk/lint/c/checkpatch.mk17
-rw-r--r--share/mk/lint/c/clang-tidy.mk325
-rw-r--r--share/mk/lint/c/cppcheck.mk99
-rw-r--r--share/mk/lint/c/cpplint.mk13
-rw-r--r--share/mk/lint/c/iwyu.mk160
-rw-r--r--share/mk/lint/man/mandoc.ignore.grep1
-rw-r--r--share/mk/lint/man/mandoc.mk16
-rw-r--r--share/mk/lint/man/tbl.mk48
-rw-r--r--share/mk/lint/mdoc/_.mk20
-rw-r--r--share/mk/lint/mdoc/mandoc.mk20
10 files changed, 369 insertions, 350 deletions
diff --git a/share/mk/lint/c/checkpatch.mk b/share/mk/lint/c/checkpatch.mk
index 7777a10..96cc15b 100644
--- a/share/mk/lint/c/checkpatch.mk
+++ b/share/mk/lint/c/checkpatch.mk
@@ -8,21 +8,26 @@ MAKEFILE_LINT_C_CHECKPATCH_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/checkpatch.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
+include $(MAKEFILEDIR)/configure/build-depends/checkpatch/checkpatch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_checkpatch := $(_MANDIR)/man2/bpf.2.d/bpf.lint-c.checkpatch.touch
+_XFAIL_LINT_c_EX_checkpatch := $(_MANDIR)/man2/bpf.2.d/bpf.c.lint-c.checkpatch.touch
-_LINT_c_checkpatch := $(patsubst %.c, %.lint-c.checkpatch.touch, $(_UNITS_ex_c))
+_LINT_c_EX_checkpatch := $(patsubst %, %.lint-c.checkpatch.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_checkpatch := $(filter-out $(_XFAIL_LINT_c_checkpatch), $(_LINT_c_checkpatch))
+_LINT_c_EX_checkpatch := $(filter-out $(_XFAIL_LINT_c_EX_checkpatch), $(_LINT_c_EX_checkpatch))
endif
+_LINT_c_checkpatch := $(_LINT_c_EX_checkpatch)
-$(_LINT_c_checkpatch): %.lint-c.checkpatch.touch: %.c $(CHECKPATCH_CONF) $(MK)
+$(_LINT_c_EX_checkpatch): %.lint-c.checkpatch.touch: %
+$(_LINT_c_checkpatch): $(CHECKPATCH_CONF) $(MK) | $$(@D)/
+
+
+$(_LINT_c_checkpatch):
$(info $(INFO_)CHECKPATCH $@)
$(CHECKPATCH) $(CHECKPATCHFLAGS) -f $< >&2
$(TOUCH) $@
diff --git a/share/mk/lint/c/clang-tidy.mk b/share/mk/lint/c/clang-tidy.mk
index fd2e536..2f7c6dd 100644
--- a/share/mk/lint/c/clang-tidy.mk
+++ b/share/mk/lint/c/clang-tidy.mk
@@ -8,173 +8,178 @@ MAKEFILE_LINT_C_CLANG_TIDY_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/clang.mk
-include $(MAKEFILEDIR)/configure/build-depends/clang-tidy.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cpp.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
+include $(MAKEFILEDIR)/configure/build-depends/clang/clang.mk
+include $(MAKEFILEDIR)/configure/build-depends/clang-tidy/clang-tidy.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpp/cpp.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_clang_tidy := \
- $(_MANDIR)/man2/add_key.2.d/add_key.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/bpf.2.d/bpf.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/chown.2.d/chown.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/clone.2.d/clone.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/close_range.2.d/close_range.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/copy_file_range.2.d/copy_file_range.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/eventfd.2.d/eventfd.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/execve.2.d/execve.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/execve.2.d/myecho.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/futex.2.d/futex.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/getdents.2.d/getdents.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/getrlimit.2.d/getrlimit.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_fat.2.d/display_fat_volume_id.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_fat.2.d/ioctl_fat.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_fat.2.d/toggle_fat_archive_flag.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_ns.2.d/ns_show.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/ioctl_tty.2.d/tcgets.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/kcmp.2.d/kcmp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/keyctl.2.d/key_instantiate.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/listxattr.2.d/listxattr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/membarrier.2.d/membarrier.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/memfd_create.2.d/t_get_seals.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/mmap.2.d/mmap.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/mprotect.2.d/mprotect.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/msgop.2.d/msgop.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/open_by_handle_at.2.d/t_name_to_handle_at.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/perf_event_open.2.d/perf_event_open.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pidfd_open.2.d/pidfd_open.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pidfd_send_signal.2.d/pidfd_send_signal.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pipe.2.d/pipe.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/pivot_root.2.d/pivot_root.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/poll.2.d/poll_input.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/process_vm_readv.2.d/process_vm_readv.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/readlink.2.d/readlink.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/request_key.2.d/t_request_key.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sched_setaffinity.2.d/sched_setaffinity.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/seccomp.2.d/seccomp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/select_tut.2.d/select.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/semget.2.d/t_semget.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/setns.2.d/setns.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/shmop.2.d/svshm_string_read.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/shmop.2.d/svshm_string_write.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sigaction.2.d/sigaction.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/spu_run.2.d/spu_run.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/stat.2.d/stat.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/_syscall.2.d/_syscall.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/syscall.2.d/syscall.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/sysctl.2.d/sysctl.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/tee.2.d/tee.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/timer_create.2.d/timer_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/timerfd_create.2.d/timerfd_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/unshare.2.d/unshare.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.lint-c.clang-tidy.touch \
- $(_MANDIR)/man2/wait.2.d/wait.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/atexit.3.d/atexit.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/backtrace.3.d/backtrace.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/bsearch.3.d/bsearch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/bswap.3.d/bswap.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/cacos.3.d/cacos.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/cacosh.3.d/cacosh.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/catan.3.d/catan.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/catanh.3.d/catanh.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/circleq.3.d/circleq.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/dlinfo.3.d/dlinfo.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/duplocale.3.d/duplocale.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/encrypt.3.d/encrypt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/end.3.d/end.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/endian.3.d/endian.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/envz_add.3.d/envz_add.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/fmemopen.3.d/fmemopen.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/fopencookie.3.d/fopencookie.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/fread.3.d/fread.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/frexp.3.d/frexp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/ftw.3.d/ftw.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/_Generic.3.d/_Generic.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/client.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/server.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo_a.3.d/async.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getaddrinfo_a.3.d/sync.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getdate.3.d/getdate.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getgrent_r.3.d/getgrent_r.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getline.3.d/getline.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getopt.3.d/getopt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getopt.3.d/getopt_long.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getpwnam.3.d/getpwnam.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getservent_r.3.d/getservent_r.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getsubopt.3.d/getsubopt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/getutent.3.d/getutent.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/hsearch.3.d/hsearch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/inet.3.d/inet.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/inet_pton.3.d/inet_pton.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/insque.3.d/insque.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/list.3.d/list.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mallinfo.3.d/mallinfo.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/malloc_info.3.d/malloc_info.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mallopt.3.d/mallopt.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/matherr.3.d/matherr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/MAX.3.d/MAX.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/mq_notify.3.d/mq_notify.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/newlocale.3.d/newlocale.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/offsetof.3.d/offsetof.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/__ppc_get_timebase.3.d/__ppc_get_timebase.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_create.3.d/pthread_create.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/qsort.3.d/qsort.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/rand.3.d/rand.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/rpmatch.3.d/rpmatch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/rtime.3.d/rtime.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/scandir.3.d/scandir.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/sem_wait.3.d/sem_wait.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/setbuf.3.d/setbuf.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/slist.3.d/slist.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/stailq.3.d/stailq.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/static_assert.3.d/must_be.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/stpncpy.3.d/stpncpy.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strcmp.3.d/string_comp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strcpy.3.d/strcpy.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strftime.3.d/strftime.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strsep.3.d/strsep.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strtok.3.d/strtok.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strtol.3.d/strtol.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/strverscmp.3.d/strverscmp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/tailq.3.d/tailq.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/tsearch.3.d/tsearch.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3/wordexp.3.d/wordexp.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3const/EXIT_SUCCESS.3const.d/EXIT_SUCCESS.lint-c.clang-tidy.touch \
- $(_MANDIR)/man3head/printf.h.3head.d/register_printf_specifier.lint-c.clang-tidy.touch
-
-
-_LINT_c_clang_tidy := $(patsubst %.c, %.lint-c.clang-tidy.touch, $(_UNITS_ex_c))
+_XFAIL_LINT_c_EX_clang_tidy := \
+ $(_MANDIR)/man2/add_key.2.d/add_key.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/bpf.2.d/bpf.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/chown.2.d/chown.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/clone.2.d/clone.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/close_range.2.d/close_range.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/copy_file_range.2.d/copy_file_range.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/eventfd.2.d/eventfd.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/execve.2.d/execve.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/execve.2.d/myecho.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/futex.2.d/futex.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/getdents.2.d/getdents.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/getrlimit.2.d/getrlimit.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_fat.2.d/display_fat_volume_id.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_fat.2.d/ioctl_fat.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_fat.2.d/toggle_fat_archive_flag.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_ns.2.d/ns_show.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/ioctl_tty.2.d/tcgets.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/kcmp.2.d/kcmp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/keyctl.2.d/key_instantiate.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/listxattr.2.d/listxattr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/membarrier.2.d/membarrier.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/memfd_create.2.d/t_get_seals.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/mmap.2.d/mmap.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/mprotect.2.d/mprotect.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/msgop.2.d/msgop.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/open_by_handle_at.2.d/t_name_to_handle_at.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/perf_event_open.2.d/perf_event_open.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pidfd_open.2.d/pidfd_open.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pidfd_send_signal.2.d/pidfd_send_signal.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pipe.2.d/pipe.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/pivot_root.2.d/pivot_root.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/poll.2.d/poll_input.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/process_vm_readv.2.d/process_vm_readv.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/readlink.2.d/readlink.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/request_key.2.d/t_request_key.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sched_setaffinity.2.d/sched_setaffinity.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/seccomp.2.d/seccomp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/select_tut.2.d/select.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/semget.2.d/t_semget.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/setns.2.d/setns.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string_read.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string_write.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sigaction.2.d/sigaction.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/spu_run.2.d/spu_run.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/stat.2.d/stat.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/_syscall.2.d/_syscall.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/syscall.2.d/syscall.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/sysctl.2.d/sysctl.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/tee.2.d/tee.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/timer_create.2.d/timer_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/timerfd_create.2.d/timerfd_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/unshare.2.d/unshare.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man2/wait.2.d/wait.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/atexit.3.d/atexit.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/backtrace.3.d/backtrace.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/bsearch.3.d/bsearch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/bswap.3.d/bswap.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/cacos.3.d/cacos.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/cacosh.3.d/cacosh.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/catan.3.d/catan.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/catanh.3.d/catanh.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/circleq.3.d/circleq.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/dlinfo.3.d/dlinfo.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/duplocale.3.d/duplocale.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/encrypt.3.d/encrypt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/end.3.d/end.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/endian.3.d/endian.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/envz_add.3.d/envz_add.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/fmemopen.3.d/fmemopen.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/fopencookie.3.d/fopencookie.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/fread.3.d/fread.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/frexp.3.d/frexp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/ftw.3.d/ftw.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/_Generic.3.d/_Generic.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/client.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/server.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo_a.3.d/async.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getaddrinfo_a.3.d/sync.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getdate.3.d/getdate.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getgrent_r.3.d/getgrent_r.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getline.3.d/getline.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getopt.3.d/getopt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getopt.3.d/getopt_long.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getpwnam.3.d/getpwnam.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getservent_r.3.d/getservent_r.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getsubopt.3.d/getsubopt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/getutent.3.d/getutent.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/hsearch.3.d/hsearch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/inet.3.d/inet.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/inet_pton.3.d/inet_pton.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/insque.3.d/insque.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/list.3.d/list.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mallinfo.3.d/mallinfo.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/malloc_info.3.d/malloc_info.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mallopt.3.d/mallopt.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/matherr.3.d/matherr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/MAX.3.d/MAX.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/mq_notify.3.d/mq_notify.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/newlocale.3.d/newlocale.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/offsetof.3.d/offsetof.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/__ppc_get_timebase.3.d/__ppc_get_timebase.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_create.3.d/pthread_create.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/qsort.3.d/qsort.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/rand.3.d/rand.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/rpmatch.3.d/rpmatch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/rtime.3.d/rtime.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/scandir.3.d/scandir.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/sem_wait.3.d/sem_wait.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/setbuf.3.d/setbuf.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/slist.3.d/slist.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/stailq.3.d/stailq.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/static_assert.3.d/must_be.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/stpncpy.3.d/stpncpy.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strcmp.3.d/string_comp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strcpy.3.d/strcpy.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strftime.3.d/strftime.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strsep.3.d/strsep.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strtok.3.d/strtok.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strtol.3.d/strtol.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/strverscmp.3.d/strverscmp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/tailq.3.d/tailq.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/tsearch.3.d/tsearch.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3/wordexp.3.d/wordexp.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3const/EXIT_SUCCESS.3const.d/EXIT_SUCCESS.c.lint-c.clang-tidy.touch \
+ $(_MANDIR)/man3head/printf.h.3head.d/register_printf_specifier.c.lint-c.clang-tidy.touch
+
+
+_LINT_c_EX_clang_tidy := $(patsubst %, %.lint-c.clang-tidy.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_clang_tidy := $(filter-out $(_XFAIL_LINT_c_clang_tidy), $(_LINT_c_clang_tidy))
+_LINT_c_EX_clang_tidy := $(filter-out $(_XFAIL_LINT_c_EX_clang_tidy), $(_LINT_c_EX_clang_tidy))
endif
+_LINT_c_clang_tidy := $(_LINT_c_EX_clang_tidy)
+
+
+$(_LINT_c_EX_clang_tidy): %.lint-c.clang-tidy.touch: %
+$(_LINT_c_clang_tidy): $(CLANG_TIDY_CONF) $(MK) | $$(@D)/
-$(_LINT_c_clang_tidy): %.lint-c.clang-tidy.touch: %.c $(CLANG_TIDY_CONF) $(MK)
+$(_LINT_c_clang_tidy):
$(info $(INFO_)CLANG_TIDY $@)
$(CLANG_TIDY) $(CLANG_TIDYFLAGS) $< -- $(CPPFLAGS) $(CLANGFLAGS) 2>&1 \
| $(SED) '/generated\.$$/d' >&2
diff --git a/share/mk/lint/c/cppcheck.mk b/share/mk/lint/c/cppcheck.mk
index 5fa74ac..333baf7 100644
--- a/share/mk/lint/c/cppcheck.mk
+++ b/share/mk/lint/c/cppcheck.mk
@@ -8,60 +8,65 @@ MAKEFILE_LINT_C_CPPCHECK_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cppcheck.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/cppcheck/cppcheck.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_cppcheck := \
- $(_MANDIR)/man2/chown.2.d/chown.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/close_range.2.d/close_range.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/kcmp.2.d/kcmp.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/keyctl.2.d/key_instantiate.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/msgop.2.d/msgop.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/shmop.2.d/svshm_string_read.lint-c.cppcheck.touch \
- $(_MANDIR)/man2/unshare.2.d/unshare.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/bsearch.3.d/bsearch.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/dlopen.3.d/dlopen.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/encrypt.3.d/encrypt.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/envz_add.3.d/envz_add.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/getaddrinfo_a.3.d/async.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/getdate.3.d/getdate.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/hsearch.3.d/hsearch.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/malloc_info.3.d/malloc_info.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/mallopt.3.d/mallopt.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/matherr.3.d/matherr.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/mcheck.3.d/mcheck.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/mtrace.3.d/t_mtrace.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/newlocale.3.d/newlocale.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_create.3.d/pthread_create.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/setaliasent.3.d/setaliasent.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/setbuf.3.d/setbuf.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/stpncpy.3.d/stpncpy.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strftime.3.d/strftime.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strncat.3.d/strncat.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strsep.3.d/strsep.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strtok.3.d/strtok.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/strtol.3.d/strtol.lint-c.cppcheck.touch \
- $(_MANDIR)/man3/tsearch.3.d/tsearch.lint-c.cppcheck.touch
-
-
-_LINT_c_cppcheck := $(patsubst %.c, %.lint-c.cppcheck.touch, $(_UNITS_ex_c))
+_XFAIL_LINT_c_EX_cppcheck := \
+ $(_MANDIR)/man2/chown.2.d/chown.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/close_range.2.d/close_range.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/kcmp.2.d/kcmp.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/keyctl.2.d/key_instantiate.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/memfd_create.2.d/t_memfd_create.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/msgop.2.d/msgop.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/open_by_handle_at.2.d/t_open_by_handle_at.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string_read.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man2/unshare.2.d/unshare.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/bsearch.3.d/bsearch.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/dlopen.3.d/dlopen.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/encrypt.3.d/encrypt.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/envz_add.3.d/envz_add.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/getaddrinfo_a.3.d/async.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/getdate.3.d/getdate.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/hsearch.3.d/hsearch.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/malloc_info.3.d/malloc_info.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/mallopt.3.d/mallopt.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/matherr.3.d/matherr.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/mcheck.3.d/mcheck.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/mtrace.3.d/t_mtrace.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/newlocale.3.d/newlocale.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_create.3.d/pthread_create.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/setaliasent.3.d/setaliasent.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/setbuf.3.d/setbuf.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/stpncpy.3.d/stpncpy.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strftime.3.d/strftime.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strncat.3.d/strncat.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strsep.3.d/strsep.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strtok.3.d/strtok.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/strtol.3.d/strtol.c.lint-c.cppcheck.touch \
+ $(_MANDIR)/man3/tsearch.3.d/tsearch.c.lint-c.cppcheck.touch
+
+
+_LINT_c_EX_cppcheck := $(patsubst %, %.lint-c.cppcheck.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_cppcheck := $(filter-out $(_XFAIL_LINT_c_cppcheck), $(_LINT_c_cppcheck))
+_LINT_c_EX_cppcheck := $(filter-out $(_XFAIL_LINT_c_EX_cppcheck), $(_LINT_c_EX_cppcheck))
endif
+_LINT_c_cppcheck := $(_LINT_c_EX_cppcheck)
+
+
+$(_LINT_c_EX_cppcheck): %.lint-c.cppcheck.touch: %
+$(_LINT_c_cppcheck): $(CPPCHECK_SUPPRESS) $(MK) | $$(@D)/
-$(_LINT_c_cppcheck): %.lint-c.cppcheck.touch: %.c $(CPPCHECK_SUPPRESS) $(MK)
+$(_LINT_c_EX_cppcheck):
$(info $(INFO_)CPPCHECK $@)
$(CPPCHECK) $(CPPCHECKFLAGS) $<
$(TOUCH) $@
diff --git a/share/mk/lint/c/cpplint.mk b/share/mk/lint/c/cpplint.mk
index 8eb3984..5e07488 100644
--- a/share/mk/lint/c/cpplint.mk
+++ b/share/mk/lint/c/cpplint.mk
@@ -7,14 +7,19 @@ MAKEFILE_LINT_C_CPPLINT_INCLUDED := 1
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cpplint.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpplint/cpplint.mk
-_LINT_c_cpplint := $(patsubst %.c, %.lint-c.cpplint.touch, $(_UNITS_ex_c))
+_LINT_c_EX_cpplint := $(patsubst %, %.lint-c.cpplint.touch, $(_EX_TU_src))
+_LINT_c_cpplint := $(_LINT_c_EX_cpplint)
-$(_LINT_c_cpplint): %.lint-c.cpplint.touch: %.c $(CPPLINT_CONF) $(MK)
+$(_LINT_c_EX_cpplint): %.lint-c.cpplint.touch: %
+$(_LINT_c_cpplint): $(CPPLINT_CONF) $(MK) | $$(@D)/
+
+
+$(_LINT_c_cpplint):
$(info $(INFO_)CPPLINT $@)
$(CPPLINT) $(CPPLINTFLAGS) $< >/dev/null
$(TOUCH) $@
diff --git a/share/mk/lint/c/iwyu.mk b/share/mk/lint/c/iwyu.mk
index 32c2c07..b2473a6 100644
--- a/share/mk/lint/c/iwyu.mk
+++ b/share/mk/lint/c/iwyu.mk
@@ -8,88 +8,98 @@ MAKEFILE_LINT_C_IWYU_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
include $(MAKEFILEDIR)/build/examples/src.mk
-include $(MAKEFILEDIR)/configure/build-depends/clang.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/cpp.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/iwyu.mk
-include $(MAKEFILEDIR)/configure/build-depends/sed.mk
+include $(MAKEFILEDIR)/configure/build-depends/clang/clang.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/tac.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/true.mk
+include $(MAKEFILEDIR)/configure/build-depends/cpp/cpp.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/iwyu/iwyu.mk
+include $(MAKEFILEDIR)/configure/build-depends/sed/sed.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-_XFAIL_LINT_c_iwyu := \
- $(_MANDIR)/man2/clock_getres.2.d/clock_getres.lint-c.iwyu.touch \
- $(_MANDIR)/man2/getrlimit.2.d/getrlimit.lint-c.iwyu.touch \
- $(_MANDIR)/man2/listxattr.2.d/listxattr.lint-c.iwyu.touch \
- $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.lint-c.iwyu.touch \
- $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.lint-c.iwyu.touch \
- $(_MANDIR)/man2/seccomp.2.d/seccomp.lint-c.iwyu.touch \
- $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.lint-c.iwyu.touch \
- $(_MANDIR)/man2/select.2.d/select.lint-c.iwyu.touch \
- $(_MANDIR)/man2/semget.2.d/t_semget.lint-c.iwyu.touch \
- $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.lint-c.iwyu.touch \
- $(_MANDIR)/man2/_syscall.2.d/_syscall.lint-c.iwyu.touch \
- $(_MANDIR)/man2/timer_create.2.d/timer_create.lint-c.iwyu.touch \
- $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.lint-c.iwyu.touch \
- $(_MANDIR)/man3/backtrace.3.d/backtrace.lint-c.iwyu.touch \
- $(_MANDIR)/man3/bsearch.3.d/bsearch.lint-c.iwyu.touch \
- $(_MANDIR)/man3/bswap.3.d/bswap.lint-c.iwyu.touch \
- $(_MANDIR)/man3/cacos.3.d/cacos.lint-c.iwyu.touch \
- $(_MANDIR)/man3/cacosh.3.d/cacosh.lint-c.iwyu.touch \
- $(_MANDIR)/man3/catan.3.d/catan.lint-c.iwyu.touch \
- $(_MANDIR)/man3/catanh.3.d/catanh.lint-c.iwyu.touch \
- $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.lint-c.iwyu.touch \
- $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.lint-c.iwyu.touch \
- $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.lint-c.iwyu.touch \
- $(_MANDIR)/man3/dlinfo.3.d/dlinfo.lint-c.iwyu.touch \
- $(_MANDIR)/man3/duplocale.3.d/duplocale.lint-c.iwyu.touch \
- $(_MANDIR)/man3/endian.3.d/endian.lint-c.iwyu.touch \
- $(_MANDIR)/man3/envz_add.3.d/envz_add.lint-c.iwyu.touch \
- $(_MANDIR)/man3/fopencookie.3.d/fopencookie.lint-c.iwyu.touch \
- $(_MANDIR)/man3/frexp.3.d/frexp.lint-c.iwyu.touch \
- $(_MANDIR)/man3/ftw.3.d/ftw.lint-c.iwyu.touch \
- $(_MANDIR)/man3/_Generic.3.d/_Generic.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/client.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getaddrinfo.3.d/server.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getline.3.d/getline.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getopt.3.d/getopt_long.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getservent_r.3.d/getservent_r.lint-c.iwyu.touch \
- $(_MANDIR)/man3/getsubopt.3.d/getsubopt.lint-c.iwyu.touch \
- $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.lint-c.iwyu.touch \
- $(_MANDIR)/man3/inet.3.d/inet.lint-c.iwyu.touch \
- $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.lint-c.iwyu.touch \
- $(_MANDIR)/man3/inet_pton.3.d/inet_pton.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mallinfo.3.d/mallinfo.lint-c.iwyu.touch \
- $(_MANDIR)/man3/malloc_info.3.d/malloc_info.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mq_notify.3.d/mq_notify.lint-c.iwyu.touch \
- $(_MANDIR)/man3/mtrace.3.d/t_mtrace.lint-c.iwyu.touch \
- $(_MANDIR)/man3/newlocale.3.d/newlocale.lint-c.iwyu.touch \
- $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_getattr_default_np.3.d/pthread_getattr_default_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_setaffinity_np.3.d/pthread_setaffinity_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.lint-c.iwyu.touch \
- $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.lint-c.iwyu.touch \
- $(_MANDIR)/man3/sem_wait.3.d/sem_wait.lint-c.iwyu.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.lint-c.iwyu.touch \
- $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.lint-c.iwyu.touch \
- $(_MANDIR)/man3/slist.3.d/slist.lint-c.iwyu.touch
-
-
-_LINT_c_iwyu := $(patsubst %.c, %.lint-c.iwyu.touch, $(_UNITS_ex_c))
+_XFAIL_LINT_c_EX_iwyu := \
+ $(_MANDIR)/man2/clock_getres.2.d/clock_getres.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/getrlimit.2.d/getrlimit.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/listxattr.2.d/listxattr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/mount_setattr.2.d/mount_setattr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/recvmmsg.2.d/recvmmsg.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/seccomp.2.d/seccomp.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/seccomp_unotify.2.d/seccomp_unotify.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/select.2.d/select.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/semget.2.d/t_semget.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/sendmmsg.2.d/sendmmsg.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/shmop.2.d/svshm_string.h.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/_syscall.2.d/_syscall.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/timer_create.2.d/timer_create.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man2/userfaultfd.2.d/userfaultfd.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/backtrace.3.d/backtrace.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/bsearch.3.d/bsearch.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/bswap.3.d/bswap.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/cacos.3.d/cacos.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/cacosh.3.d/cacosh.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/catan.3.d/catan.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/catanh.3.d/catanh.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/clock_getcpuclockid.3.d/clock_getcpuclockid.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/CPU_SET.3.d/CPU_SET.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/dl_iterate_phdr.3.d/dl_iterate_phdr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/dlinfo.3.d/dlinfo.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/duplocale.3.d/duplocale.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/endian.3.d/endian.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/envz_add.3.d/envz_add.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/fopencookie.3.d/fopencookie.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/frexp.3.d/frexp.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/ftw.3.d/ftw.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/_Generic.3.d/_Generic.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/client.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getaddrinfo.3.d/server.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getgrouplist.3.d/getgrouplist.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getline.3.d/getline.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getopt.3.d/getopt_long.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getprotoent_r.3.d/getprotoent_r.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getservent_r.3.d/getservent_r.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/getsubopt.3.d/getsubopt.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/if_nameindex.3.d/if_nameindex.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/inet.3.d/inet.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/inet_net_pton.3.d/inet_net_pton.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/inet_pton.3.d/inet_pton.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mallinfo.3.d/mallinfo.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/malloc_info.3.d/malloc_info.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mbstowcs.3.d/mbstowcs.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mq_getattr.3.d/mq_getattr.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mq_notify.3.d/mq_notify.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/mtrace.3.d/t_mtrace.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/newlocale.3.d/newlocale.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/posix_spawn.3.d/posix_spawn.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_attr_init.3.d/pthread_attr_init.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_cleanup_push.3.d/pthread_cleanup_push.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_getattr_default_np.3.d/pthread_getattr_default_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_getattr_np.3.d/pthread_getattr_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_getcpuclockid.3.d/pthread_getcpuclockid.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_setaffinity_np.3.d/pthread_setaffinity_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_setname_np.3.d/pthread_setname_np.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_setschedparam.3.d/pthreads_sched_test.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/pthread_sigmask.3.d/pthread_sigmask.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/sem_wait.3.d/sem_wait.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase.h.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_bounce.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/shm_open.3.d/pshm_ucase_send.c.lint-c.iwyu.touch \
+ $(_MANDIR)/man3/slist.3.d/slist.c.lint-c.iwyu.touch
+
+
+_LINT_c_EX_iwyu := $(patsubst %, %.lint-c.iwyu.touch, $(_EX_TU_src))
ifeq ($(SKIP_XFAIL),yes)
-_LINT_c_iwyu := $(filter-out $(_XFAIL_LINT_c_iwyu), $(_LINT_c_iwyu))
+_LINT_c_EX_iwyu := $(filter-out $(_XFAIL_LINT_c_EX_iwyu), $(_LINT_c_EX_iwyu))
endif
+_LINT_c_iwyu := $(_LINT_c_EX_iwyu)
+
+
+$(_LINT_c_EX_iwyu): %.lint-c.iwyu.touch: %
+$(_LINT_c_iwyu): $(MK) | $$(@D)/
-$(_LINT_c_iwyu): %.lint-c.iwyu.touch: %.c $(MK)
+$(_LINT_c_iwyu):
$(info $(INFO_)IWYU $@)
! ($(IWYU) $(IWYUFLAGS) $(CPPFLAGS) $(CLANGFLAGS) $< 2>&1 \
| $(SED) -n '/should add these lines:/,$$p' \
diff --git a/share/mk/lint/man/mandoc.ignore.grep b/share/mk/lint/man/mandoc.ignore.grep
index a2f91bc..c4a023a 100644
--- a/share/mk/lint/man/mandoc.ignore.grep
+++ b/share/mk/lint/man/mandoc.ignore.grep
@@ -1,6 +1,5 @@
STYLE: lower case character in document title:
UNSUPP: ignoring macro in table:
-WARNING: cannot parse date, using it verbatim: TH (date)
WARNING: empty block: UR
WARNING: missing date, using "": TH
WARNING: undefined escape, printing literally: \\\\
diff --git a/share/mk/lint/man/mandoc.mk b/share/mk/lint/man/mandoc.mk
index efa69ab..2a3f914 100644
--- a/share/mk/lint/man/mandoc.mk
+++ b/share/mk/lint/man/mandoc.mk
@@ -7,13 +7,12 @@ MAKEFILE_LINT_MAN_MANDOC_INCLUDED := 1
include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/mandoc.mk
-include $(MAKEFILEDIR)/configure/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/true.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/mandoc/mandoc.mk
include $(MAKEFILEDIR)/configure/xfail.mk
-include $(MAKEFILEDIR)/lint/man/_.mk
-include $(MAKEFILEDIR)/src.mk
_XFAIL_LINT_man_mandoc := \
@@ -26,8 +25,7 @@ _XFAIL_LINT_man_mandoc := \
$(_MANDIR)/man8/zic.8.lint-man.mandoc.touch
-_LINT_man_mandoc := \
- $(patsubst $(MANDIR)/%, $(_MANDIR)/%.lint-man.mandoc.touch, $(NONSO_MAN))
+_LINT_man_mandoc := $(patsubst %, %.lint-man.mandoc.touch, $(_NONSO_MAN))
ifeq ($(SKIP_XFAIL),yes)
_LINT_man_mandoc := $(filter-out $(_XFAIL_LINT_man_mandoc), $(_LINT_man_mandoc))
endif
@@ -36,7 +34,7 @@ endif
mandoc_man_ignore_grep := $(MAKEFILEDIR)/lint/man/mandoc.ignore.grep
-$(_LINT_man_mandoc): $(_MANDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% $(mandoc_man_ignore_grep) $(MK) | $$(@D)/
+$(_LINT_man_mandoc): %.lint-man.mandoc.touch: % $(mandoc_man_ignore_grep) $(MK) | $$(@D)/
$(info $(INFO_)MANDOC $@)
! ($(MANDOC) -man $(MANDOCFLAGS) $< 2>&1 \
| $(GREP) -v -f '$(mandoc_man_ignore_grep)' \
diff --git a/share/mk/lint/man/tbl.mk b/share/mk/lint/man/tbl.mk
index 23e6eda..cb2dd46 100644
--- a/share/mk/lint/man/tbl.mk
+++ b/share/mk/lint/man/tbl.mk
@@ -6,34 +6,38 @@ ifndef MAKEFILE_LINT_MAN_TBL_INCLUDED
MAKEFILE_LINT_MAN_TBL_INCLUDED := 1
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/src.mk
-include $(MAKEFILEDIR)/lint/man/_.mk
-include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/build/man/man.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/cat.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/echo.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/head.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/tail.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
-_LINT_man_tbl := \
- $(patsubst $(MANDIR)/%, $(_MANDIR)/%.lint-man.tbl.touch, $(NONSO_MAN))
+_LINT_man_tbl := $(patsubst %, %.lint-man.tbl.touch, $(_NONSO_MAN))
-$(_LINT_man_tbl): $(_MANDIR)/%.lint-man.tbl.touch: $(MANDIR)/% $(MK) | $$(@D)/
+$(_LINT_man_tbl): %.lint-man.tbl.touch: % $(MK) | $$(@D)/
$(info $(INFO_)GREP $@)
- if $(GREP) -q '^\.TS$$' $< && ! $(HEAD) -n1 $< | $(GREP) -q '\\" t$$'; \
- then \
- >&2 $(ECHO) "$<:1: missing '\\\" t' comment:"; \
- >&2 $(HEAD) -n1 <$<; \
- exit 1; \
- fi
- if $(HEAD) -n1 $< | $(GREP) -q '\\" t$$' && ! $(GREP) -q '^\.TS$$' $<; \
- then \
- >&2 $(ECHO) "$<:1: spurious '\\\" t' comment:"; \
- >&2 $(HEAD) -n1 <$<; \
- exit 1; \
+ $(HEAD) -n1 <$< \
+ | if $(GREP) '\\" t$$' >/dev/null; then \
+ $(CAT) <$< \
+ | if ! $(GREP) '^\.TS$$' >/dev/null; then \
+ >&2 $(ECHO) "$<:1: spurious '\\\" t' comment:"; \
+ >&2 $(HEAD) -n1 <$<; \
+ exit 1; \
+ fi; \
+ else \
+ $(CAT) <$< \
+ | if $(GREP) '^\.TS$$' >/dev/null; then \
+ >&2 $(ECHO) "$<:1: missing '\\\" t' comment:"; \
+ >&2 $(HEAD) -n1 <$<; \
+ exit 1; \
+ fi; \
fi
- if $(TAIL) -n+2 <$< | $(GREP) -q '\\" t$$'; \
- then \
+ $(TAIL) -n+2 <$< \
+ | if $(GREP) '\\" t$$' >/dev/null; then \
>&2 $(ECHO) "$<: spurious '\\\" t' not in first line:"; \
>&2 $(GREP) -n '\\" t$$' $< /dev/null; \
exit 1; \
diff --git a/share/mk/lint/mdoc/_.mk b/share/mk/lint/mdoc/_.mk
index 0f51ee2..d151a80 100644
--- a/share/mk/lint/mdoc/_.mk
+++ b/share/mk/lint/mdoc/_.mk
@@ -6,26 +6,8 @@ ifndef MAKEFILE_LINT_MDOC_INCLUDED
MAKEFILE_LINT_MDOC_INCLUDED := 1
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/directory_variables.mk
-include $(MAKEFILEDIR)/src.mk
-
-
-linters_mdoc := mandoc
-
-
-$(foreach l, $(linters_mdoc), \
- $(eval _LINT_mdoc_$(l) := \
- $(patsubst $(MANDIR)/%, $(_MANDIR)/%.lint-mdoc.$(l).touch, \
- $(NONSO_MDOC))))
-
-
-$(foreach l, $(linters_mdoc), \
- $(eval .PHONY: lint-mdoc-$(l)))
-$(foreach l, $(linters_mdoc), \
- $(eval lint-mdoc-$(l): $(_LINT_mdoc_$(l));))
.PHONY: lint-mdoc
-lint-mdoc: $(foreach l, $(linters_mdoc), lint-mdoc-$(l));
+lint-mdoc: lint-mdoc-mandoc;
endif # include guard
diff --git a/share/mk/lint/mdoc/mandoc.mk b/share/mk/lint/mdoc/mandoc.mk
index 8b209b8..3a9e2cc 100644
--- a/share/mk/lint/mdoc/mandoc.mk
+++ b/share/mk/lint/mdoc/mandoc.mk
@@ -6,18 +6,20 @@ ifndef MAKEFILE_LINT_MDOC_MANDOC_INCLUDED
MAKEFILE_LINT_MDOC_MANDOC_INCLUDED := 1
-include $(MAKEFILEDIR)/build/_.mk
-include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
-include $(MAKEFILEDIR)/configure/build-depends/grep.mk
-include $(MAKEFILEDIR)/configure/build-depends/mandoc.mk
-include $(MAKEFILEDIR)/lint/mdoc/_.mk
-include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/build/man/mdoc.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
+include $(MAKEFILEDIR)/configure/build-depends/coreutils/true.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep/grep.mk
+include $(MAKEFILEDIR)/configure/build-depends/mandoc/mandoc.mk
+
+
+_LINT_mdoc_mandoc := $(patsubst %, %.lint-mdoc.mandoc.touch, $(_NONSO_MDOC))
mandoc_mdoc_ignore_grep := $(MAKEFILEDIR)/lint/mdoc/mandoc.ignore.grep
-$(_LINT_mdoc_mandoc): $(_MANDIR)/%.lint-mdoc.mandoc.touch: $(MANDIR)/% $(mandoc_mdoc_ignore_grep) | $$(@D)/
+$(_LINT_mdoc_mandoc): %.lint-mdoc.mandoc.touch: % $(mandoc_mdoc_ignore_grep) $(MK) | $$(@D)/
$(info $(INFO_)MANDOC $@)
! ($(MANDOC) -mdoc $(MANDOCFLAGS) $< 2>&1 \
| $(GREP) -v -f '$(mandoc_mdoc_ignore_grep)' \
@@ -27,4 +29,8 @@ $(_LINT_mdoc_mandoc): $(_MANDIR)/%.lint-mdoc.mandoc.touch: $(MANDIR)/% $(mandoc_
$(TOUCH) $@
+.PHONY: lint-mdoc-mandoc
+lint-mdoc-mandoc: $(_LINT_mdoc_mandoc);
+
+
endif # include guard