]> git.proxmox.com Git - mirror_zfs.git/blame - Makefile.am
Fixes for procfs files backed by linked lists
[mirror_zfs.git] / Makefile.am
CommitLineData
8c392629
JE
1ACLOCAL_AMFLAGS = -I config
2
47a4a6fd
TF
3include config/rpm.am
4include config/deb.am
5include config/tgz.am
c9c0d073 6
f3757573 7SUBDIRS = include rpm
c9c0d073 8if CONFIG_USER
3c67d83a 9SUBDIRS += udev etc man scripts lib tests cmd contrib
c9c0d073
BB
10endif
11if CONFIG_KERNEL
fd7fd5eb 12SUBDIRS += module
775f2d34 13
93ce2b4c 14extradir = $(prefix)/src/zfs-$(VERSION)
775f2d34
BB
15extra_HEADERS = zfs.release.in zfs_config.h.in
16
93ce2b4c 17kerneldir = $(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION)
775f2d34 18nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS)
c9c0d073 19endif
c9c0d073 20
8160dd9a 21AUTOMAKE_OPTIONS = foreign
f3757573 22EXTRA_DIST = autogen.sh copy-builtin
c9c0d073 23EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
145c88fb 24EXTRA_DIST += META AUTHORS COPYRIGHT LICENSE NEWS NOTICE README.md
c9c0d073 25
acf04442
PS
26@CODE_COVERAGE_RULES@
27
c9c0d073
BB
28distclean-local::
29 -$(RM) -R autom4te*.cache
30 -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
31 -o -name .pc -o -name .hg -o -name .git \) -prune -o \
32 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
33 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
c8f9061f
BB
34 -o -name '.*.rej' -o -size 0 -o -name '*%' -o -name '.*.cmd' \
35 -o -name 'core' -o -name 'Makefile' -o -name 'Module.symvers' \
d9ec8b9b
BB
36 -o -name '*.order' -o -name '*.markers' -o -name '*.gcda' \
37 -o -name '*.gcno' \) \
c9c0d073
BB
38 -type f -print | xargs $(RM)
39
a430cef9
MA
40all-local:
41 -${top_srcdir}/scripts/zfs-tests.sh -c
42
f6fb7651
BB
43dist-hook:
44 sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
45 $(distdir)/META
46
93ce2b4c
BB
47# For compatibility, create a matching spl-x.y.z directly which contains
48# symlinks to the updated header and object file locations. These
49# compatibility links will be removed in the next major release.
50if CONFIG_KERNEL
51install-data-hook:
d1f06ec5 52 rm -rf $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \
93ce2b4c
BB
53 mkdir $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \
54 cd $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \
55 ln -s ../zfs-$(VERSION)/include/spl include && \
56 ln -s ../zfs-$(VERSION)/$(LINUX_VERSION) $(LINUX_VERSION) && \
57 ln -s ../zfs-$(VERSION)/zfs_config.h.in spl_config.h.in && \
58 ln -s ../zfs-$(VERSION)/zfs.release.in spl.release.in && \
59 cd $(DESTDIR)$(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION) && \
d1f06ec5
MA
60 ln -fs zfs_config.h spl_config.h && \
61 ln -fs zfs.release spl.release
93ce2b4c
BB
62endif
63
9ca25e70 64checkstyle: cstyle shellcheck flake8 commitcheck mancheck testscheck
cb524aa2
GDN
65
66commitcheck:
67 @if git rev-parse --git-dir > /dev/null 2>&1; then \
26cb4b87 68 ${top_srcdir}/scripts/commitcheck.sh; \
cb524aa2 69 fi
c11cd7f9
TF
70
71cstyle:
351a26dd 72 @find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \
26cb4b87 73 ! -name '*.mod.c' -type f \
74 -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} \+
a35beedf 75
c11cd7f9
TF
76shellcheck:
77 @if type shellcheck > /dev/null 2>&1; then \
c8f9061f 78 shellcheck --exclude=SC1090 --format=gcc \
26cb4b87 79 $$(find ${top_srcdir}/scripts/*.sh -type f) \
80 $$(find ${top_srcdir}/cmd/zed/zed.d/*.sh -type f) \
81 $$(find ${top_srcdir}/cmd/zpool/zpool.d/* -executable); \
74698631 82 fi
c11cd7f9 83
90cdf283 84mancheck:
85 @if type mandoc > /dev/null 2>&1; then \
a94d38c0
GDN
86 find ${top_srcdir}/man/man8 -type f -name 'zfs.8' \
87 -o -name 'zpool.8' -o -name 'zdb.8' \
88 -o -name 'zgenhostid.8' | \
89 xargs mandoc -Tlint -Werror; \
90cdf283 90 fi
91
9ca25e70 92testscheck:
93 @find ${top_srcdir}/tests/zfs-tests/tests -type f \
94 \( -name '*.ksh' -not -executable \) -o \
95 \( -name '*.kshlib' -executable \) -o \
96 \( -name '*.cfg' -executable \) | \
97 xargs -r stat -c '%A %n' | \
98 awk '{c++; print} END {if(c>0) exit 1}'
99
f26eb428 100lint: cppcheck paxcheck
b64e02e5
BB
101
102cppcheck:
103 @if type cppcheck > /dev/null 2>&1; then \
94183a9d 104 cppcheck --quiet --force --error-exitcode=2 --inline-suppr \
34d00e7a 105 --suppressions-list=.github/suppressions.txt \
94183a9d
BB
106 -UHAVE_SSE2 -UHAVE_AVX512F -UHAVE_UIO_ZEROCOPY \
107 -UHAVE_DNLC ${top_srcdir}; \
b64e02e5
BB
108 fi
109
f26eb428
JZ
110paxcheck:
111 @if type scanelf > /dev/null 2>&1; then \
26cb4b87 112 ${top_srcdir}/scripts/paxcheck.sh ${top_srcdir}; \
f26eb428
JZ
113 fi
114
46bb91e1
GDN
115flake8:
116 @if type flake8 > /dev/null 2>&1; then \
117 flake8 ${top_srcdir}; \
118 fi
119
c9c0d073 120ctags:
47a4a6fd 121 $(RM) tags
c9c0d073
BB
122 find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
123
124etags:
47a4a6fd 125 $(RM) TAGS
c9c0d073
BB
126 find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a
127
128tags: ctags etags
129
130pkg: @DEFAULT_PACKAGE@
7670f721 131pkg-dkms: @DEFAULT_PACKAGE@-dkms
f3757573 132pkg-kmod: @DEFAULT_PACKAGE@-kmod
c9c0d073 133pkg-utils: @DEFAULT_PACKAGE@-utils