]>
Commit | Line | Data |
---|---|---|
c3ef9f75 AZ |
1 | include $(top_srcdir)/config/Shellcheck.am |
2 | ||
8c392629 JE |
3 | ACLOCAL_AMFLAGS = -I config |
4 | ||
bced7e3a MM |
5 | SUBDIRS = include |
6 | if BUILD_LINUX | |
7 | SUBDIRS += rpm | |
8 | endif | |
9 | ||
c9c0d073 | 10 | if CONFIG_USER |
5a1fb060 | 11 | SUBDIRS += man scripts lib tests cmd etc contrib |
bced7e3a MM |
12 | if BUILD_LINUX |
13 | SUBDIRS += udev | |
14 | endif | |
c9c0d073 BB |
15 | endif |
16 | if CONFIG_KERNEL | |
fd7fd5eb | 17 | SUBDIRS += module |
775f2d34 | 18 | |
93ce2b4c | 19 | extradir = $(prefix)/src/zfs-$(VERSION) |
775f2d34 BB |
20 | extra_HEADERS = zfs.release.in zfs_config.h.in |
21 | ||
bced7e3a | 22 | if BUILD_LINUX |
93ce2b4c | 23 | kerneldir = $(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION) |
775f2d34 | 24 | nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS) |
c9c0d073 | 25 | endif |
bced7e3a | 26 | endif |
c9c0d073 | 27 | |
8160dd9a | 28 | AUTOMAKE_OPTIONS = foreign |
f3757573 | 29 | EXTRA_DIST = autogen.sh copy-builtin |
c9c0d073 | 30 | EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am |
c0af3c7b BB |
31 | EXTRA_DIST += AUTHORS CODE_OF_CONDUCT.md COPYRIGHT LICENSE META NEWS NOTICE |
32 | EXTRA_DIST += README.md RELEASES.md | |
6b99fc06 | 33 | EXTRA_DIST += module/lua/README.zfs module/os/linux/spl/README.md |
c9c0d073 | 34 | |
53b5fcd3 | 35 | # Include all the extra licensing information for modules |
f66a1f88 RM |
36 | EXTRA_DIST += module/icp/algs/skein/THIRDPARTYLICENSE |
37 | EXTRA_DIST += module/icp/algs/skein/THIRDPARTYLICENSE.descrip | |
38 | EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman | |
39 | EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman.descrip | |
40 | EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl | |
41 | EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl.descrip | |
9642beef AS |
42 | EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams |
43 | EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams.descrip | |
44 | EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl | |
45 | EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl.descrip | |
bced7e3a MM |
46 | EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2 |
47 | EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2.descrip | |
f66a1f88 RM |
48 | EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash |
49 | EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash.descrip | |
53b5fcd3 | 50 | |
acf04442 PS |
51 | @CODE_COVERAGE_RULES@ |
52 | ||
109d2c93 AS |
53 | GITREV = include/zfs_gitrev.h |
54 | ||
94a2dca6 | 55 | PHONY = gitrev |
4cbde2ec | 56 | gitrev: |
d32a59fe | 57 | $(AM_V_GEN)$(top_srcdir)/scripts/make_gitrev.sh $(GITREV) |
109d2c93 | 58 | |
e6c093dd | 59 | all: gitrev |
4cbde2ec | 60 | |
142f84dd | 61 | # Double-colon rules are allowed; there are multiple independent definitions. |
59415fc9 AS |
62 | maintainer-clean-local:: |
63 | -$(RM) $(GITREV) | |
64 | ||
142f84dd | 65 | distclean-local:: |
608f8749 | 66 | -$(RM) -R autom4te*.cache build |
c9c0d073 BB |
67 | -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ |
68 | -o -name .pc -o -name .hg -o -name .git \) -prune -o \ | |
69 | \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ | |
70 | -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ | |
c8f9061f BB |
71 | -o -name '.*.rej' -o -size 0 -o -name '*%' -o -name '.*.cmd' \ |
72 | -o -name 'core' -o -name 'Makefile' -o -name 'Module.symvers' \ | |
d9ec8b9b BB |
73 | -o -name '*.order' -o -name '*.markers' -o -name '*.gcda' \ |
74 | -o -name '*.gcno' \) \ | |
a67a1873 | 75 | -type f -delete |
c9c0d073 | 76 | |
a430cef9 | 77 | all-local: |
5fc332ae | 78 | -SCRIPT_COMMON=$(top_builddir)/scripts/common.sh $(top_srcdir)/scripts/zfs-tests.sh -c |
a430cef9 | 79 | |
109d2c93 | 80 | dist-hook: |
59415fc9 | 81 | $(AM_V_GEN)$(top_srcdir)/scripts/make_gitrev.sh -D $(distdir) $(GITREV) |
5ca349f9 | 82 | $(SED) ${ac_inplace} -e 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ |
f6fb7651 BB |
83 | $(distdir)/META |
84 | ||
94a2dca6 | 85 | PHONY += codecheck |
6ef00196 | 86 | codecheck: cstyle shellcheck checkbashisms flake8 mancheck testscheck vcscheck zstdcheck |
c23f8d48 | 87 | |
94a2dca6 | 88 | PHONY += checkstyle |
c23f8d48 | 89 | checkstyle: codecheck commitcheck |
cb524aa2 | 90 | |
94a2dca6 | 91 | PHONY += commitcheck |
cb524aa2 GDN |
92 | commitcheck: |
93 | @if git rev-parse --git-dir > /dev/null 2>&1; then \ | |
26cb4b87 | 94 | ${top_srcdir}/scripts/commitcheck.sh; \ |
cb524aa2 | 95 | fi |
c11cd7f9 | 96 | |
f788aaeb AZ |
97 | if HAVE_PARALLEL |
98 | cstyle_line = -print0 | parallel -X0 ${top_srcdir}/scripts/cstyle.pl -cpP {} | |
99 | else | |
100 | cstyle_line = -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} + | |
101 | endif | |
94a2dca6 | 102 | PHONY += cstyle |
c11cd7f9 | 103 | cstyle: |
dc544aba MN |
104 | @find ${top_srcdir} -name build -prune \ |
105 | -o -type f -name '*.[hc]' \ | |
9f0a21e6 MM |
106 | ! -name 'zfs_config.*' ! -name '*.mod.c' \ |
107 | ! -name 'opt_global.h' ! -name '*_if*.h' \ | |
6ef00196 | 108 | ! -name 'zstd_compat_wrapper.h' \ |
dc544aba | 109 | ! -path './module/zstd/lib/*' \ |
7ada752a AZ |
110 | ! -path './include/sys/lua/*' \ |
111 | ! -path './module/lua/l*.[ch]' \ | |
d6c1bbdd | 112 | ! -path './module/zfs/lz4.c' \ |
f788aaeb | 113 | $(cstyle_line) |
a35beedf | 114 | |
bced7e3a MM |
115 | filter_executable = -exec test -x '{}' \; -print |
116 | ||
c3ef9f75 AZ |
117 | SHELLCHECKDIRS = cmd contrib etc scripts tests |
118 | SHELLCHECKSCRIPTS = autogen.sh | |
c11cd7f9 | 119 | |
14c34c3d | 120 | PHONY += checkabi storeabi |
a9655fc2 | 121 | |
ba600517 | 122 | checkabi: lib |
14c34c3d AR |
123 | $(MAKE) -C lib checkabi |
124 | ||
ba600517 | 125 | storeabi: lib |
14c34c3d AR |
126 | $(MAKE) -C lib storeabi |
127 | ||
94a2dca6 | 128 | PHONY += mancheck |
90cdf283 | 129 | mancheck: |
4a98300f | 130 | ${top_srcdir}/scripts/mancheck.sh ${top_srcdir}/man ${top_srcdir}/tests/test-runner/man |
90cdf283 | 131 | |
94a2dca6 | 132 | PHONY += testscheck |
9ca25e70 | 133 | testscheck: |
a67a1873 | 134 | @[ $$(find ${top_srcdir}/tests/zfs-tests -type f \ |
bced7e3a MM |
135 | \( -name '*.ksh' -not ${filter_executable} \) -o \ |
136 | \( -name '*.kshlib' ${filter_executable} \) -o \ | |
137 | \( -name '*.shlib' ${filter_executable} \) -o \ | |
138 | \( -name '*.cfg' ${filter_executable} \) | \ | |
a67a1873 | 139 | tee /dev/stderr | wc -l) -eq 0 ] |
9ca25e70 | 140 | |
94a2dca6 | 141 | PHONY += vcscheck |
7b02fae7 | 142 | vcscheck: |
143 | @if git rev-parse --git-dir > /dev/null 2>&1; then \ | |
144 | git ls-files . --exclude-standard --others | \ | |
145 | awk '{c++; print} END {if(c>0) exit 1}' ; \ | |
146 | fi | |
147 | ||
6ef00196 AZ |
148 | PHONY += zstdcheck |
149 | zstdcheck: | |
ad9e7676 | 150 | @$(MAKE) -C module check-zstd-symbols |
6ef00196 | 151 | |
94a2dca6 | 152 | PHONY += lint |
f26eb428 | 153 | lint: cppcheck paxcheck |
b64e02e5 | 154 | |
0e6c493f | 155 | CPPCHECKDIRS = cmd lib module |
94a2dca6 | 156 | PHONY += cppcheck |
0e6c493f BB |
157 | cppcheck: $(CPPCHECKDIRS) |
158 | @if test -n "$(CPPCHECK)"; then \ | |
159 | set -e ; for dir in $(CPPCHECKDIRS) ; do \ | |
160 | $(MAKE) -C $$dir cppcheck ; \ | |
161 | done \ | |
58c0f374 MA |
162 | else \ |
163 | echo "skipping cppcheck because cppcheck is not installed"; \ | |
b64e02e5 BB |
164 | fi |
165 | ||
94a2dca6 | 166 | PHONY += paxcheck |
f26eb428 JZ |
167 | paxcheck: |
168 | @if type scanelf > /dev/null 2>&1; then \ | |
2b5f3045 | 169 | ${top_srcdir}/scripts/paxcheck.sh ${top_builddir}; \ |
58c0f374 MA |
170 | else \ |
171 | echo "skipping paxcheck because scanelf is not installed"; \ | |
f26eb428 JZ |
172 | fi |
173 | ||
94a2dca6 | 174 | PHONY += flake8 |
46bb91e1 GDN |
175 | flake8: |
176 | @if type flake8 > /dev/null 2>&1; then \ | |
177 | flake8 ${top_srcdir}; \ | |
58c0f374 MA |
178 | else \ |
179 | echo "skipping flake8 because flake8 is not installed"; \ | |
46bb91e1 GDN |
180 | fi |
181 | ||
94a2dca6 | 182 | PHONY += ctags |
c9c0d073 | 183 | ctags: |
47a4a6fd | 184 | $(RM) tags |
0b032548 | 185 | find $(top_srcdir) -name '.?*' -prune \ |
a67a1873 | 186 | -o -type f -name '*.[hcS]' -exec ctags -a {} + |
c9c0d073 | 187 | |
94a2dca6 | 188 | PHONY += etags |
c9c0d073 | 189 | etags: |
47a4a6fd | 190 | $(RM) TAGS |
0b032548 | 191 | find $(top_srcdir) -name '.?*' -prune \ |
a67a1873 | 192 | -o -type f -name '*.[hcS]' -exec etags -a {} + |
0b032548 | 193 | |
94a2dca6 | 194 | PHONY += cscopelist |
0b032548 AS |
195 | cscopelist: |
196 | find $(top_srcdir) -name '.?*' -prune \ | |
197 | -o -type f -name '*.[hc]' -print >cscope.files | |
c9c0d073 | 198 | |
94a2dca6 | 199 | PHONY += tags |
c9c0d073 BB |
200 | tags: ctags etags |
201 | ||
94a2dca6 | 202 | PHONY += pkg pkg-dkms pkg-kmod pkg-utils |
c9c0d073 | 203 | pkg: @DEFAULT_PACKAGE@ |
7670f721 | 204 | pkg-dkms: @DEFAULT_PACKAGE@-dkms |
f3757573 | 205 | pkg-kmod: @DEFAULT_PACKAGE@-kmod |
c9c0d073 | 206 | pkg-utils: @DEFAULT_PACKAGE@-utils |
94a2dca6 | 207 | |
e6c093dd AS |
208 | include config/rpm.am |
209 | include config/deb.am | |
210 | include config/tgz.am | |
211 | ||
94a2dca6 | 212 | .PHONY: $(PHONY) |