]>
Commit | Line | Data |
---|---|---|
c3ef9f75 | 1 | include $(top_srcdir)/config/Shellcheck.am |
c8970f52 AZ |
2 | include $(top_srcdir)/config/Rules.am |
3 | include $(top_srcdir)/config/CppCheck.am | |
c3ef9f75 | 4 | |
8c392629 JE |
5 | ACLOCAL_AMFLAGS = -I config |
6 | ||
bced7e3a MM |
7 | SUBDIRS = include |
8 | if BUILD_LINUX | |
9 | SUBDIRS += rpm | |
10 | endif | |
11 | ||
c8970f52 AZ |
12 | EXTRA_DIST = |
13 | CPPCHECKDIRS += cmd etc/systemd/system-generators | |
c9c0d073 | 14 | if CONFIG_USER |
c8970f52 AZ |
15 | SUBDIRS += scripts . man tests cmd etc contrib |
16 | include $(srcdir)/%D%/lib/Makefile.am | |
bced7e3a MM |
17 | if BUILD_LINUX |
18 | SUBDIRS += udev | |
19 | endif | |
c9c0d073 | 20 | endif |
c8970f52 | 21 | CPPCHECKDIRS += module |
c9c0d073 | 22 | if CONFIG_KERNEL |
fd7fd5eb | 23 | SUBDIRS += module |
775f2d34 | 24 | |
93ce2b4c | 25 | extradir = $(prefix)/src/zfs-$(VERSION) |
775f2d34 | 26 | extra_HEADERS = zfs.release.in zfs_config.h.in |
bced7e3a | 27 | endif |
c9c0d073 | 28 | |
c8970f52 | 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 | ||
c8970f52 | 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 | |
94a2dca6 | 120 | PHONY += mancheck |
90cdf283 | 121 | mancheck: |
4a98300f | 122 | ${top_srcdir}/scripts/mancheck.sh ${top_srcdir}/man ${top_srcdir}/tests/test-runner/man |
90cdf283 | 123 | |
94a2dca6 | 124 | PHONY += testscheck |
9ca25e70 | 125 | testscheck: |
a67a1873 | 126 | @[ $$(find ${top_srcdir}/tests/zfs-tests -type f \ |
bced7e3a MM |
127 | \( -name '*.ksh' -not ${filter_executable} \) -o \ |
128 | \( -name '*.kshlib' ${filter_executable} \) -o \ | |
129 | \( -name '*.shlib' ${filter_executable} \) -o \ | |
130 | \( -name '*.cfg' ${filter_executable} \) | \ | |
a67a1873 | 131 | tee /dev/stderr | wc -l) -eq 0 ] |
9ca25e70 | 132 | |
94a2dca6 | 133 | PHONY += vcscheck |
7b02fae7 | 134 | vcscheck: |
135 | @if git rev-parse --git-dir > /dev/null 2>&1; then \ | |
136 | git ls-files . --exclude-standard --others | \ | |
137 | awk '{c++; print} END {if(c>0) exit 1}' ; \ | |
138 | fi | |
139 | ||
6ef00196 AZ |
140 | PHONY += zstdcheck |
141 | zstdcheck: | |
ad9e7676 | 142 | @$(MAKE) -C module check-zstd-symbols |
6ef00196 | 143 | |
94a2dca6 | 144 | PHONY += lint |
f26eb428 | 145 | lint: cppcheck paxcheck |
b64e02e5 | 146 | |
94a2dca6 | 147 | PHONY += paxcheck |
f26eb428 JZ |
148 | paxcheck: |
149 | @if type scanelf > /dev/null 2>&1; then \ | |
2b5f3045 | 150 | ${top_srcdir}/scripts/paxcheck.sh ${top_builddir}; \ |
58c0f374 MA |
151 | else \ |
152 | echo "skipping paxcheck because scanelf is not installed"; \ | |
f26eb428 JZ |
153 | fi |
154 | ||
94a2dca6 | 155 | PHONY += flake8 |
46bb91e1 GDN |
156 | flake8: |
157 | @if type flake8 > /dev/null 2>&1; then \ | |
158 | flake8 ${top_srcdir}; \ | |
58c0f374 MA |
159 | else \ |
160 | echo "skipping flake8 because flake8 is not installed"; \ | |
46bb91e1 GDN |
161 | fi |
162 | ||
94a2dca6 | 163 | PHONY += ctags |
c9c0d073 | 164 | ctags: |
47a4a6fd | 165 | $(RM) tags |
0b032548 | 166 | find $(top_srcdir) -name '.?*' -prune \ |
a67a1873 | 167 | -o -type f -name '*.[hcS]' -exec ctags -a {} + |
c9c0d073 | 168 | |
94a2dca6 | 169 | PHONY += etags |
c9c0d073 | 170 | etags: |
47a4a6fd | 171 | $(RM) TAGS |
0b032548 | 172 | find $(top_srcdir) -name '.?*' -prune \ |
a67a1873 | 173 | -o -type f -name '*.[hcS]' -exec etags -a {} + |
0b032548 | 174 | |
94a2dca6 | 175 | PHONY += cscopelist |
0b032548 AS |
176 | cscopelist: |
177 | find $(top_srcdir) -name '.?*' -prune \ | |
178 | -o -type f -name '*.[hc]' -print >cscope.files | |
c9c0d073 | 179 | |
94a2dca6 | 180 | PHONY += tags |
c9c0d073 BB |
181 | tags: ctags etags |
182 | ||
94a2dca6 | 183 | PHONY += pkg pkg-dkms pkg-kmod pkg-utils |
c9c0d073 | 184 | pkg: @DEFAULT_PACKAGE@ |
7670f721 | 185 | pkg-dkms: @DEFAULT_PACKAGE@-dkms |
f3757573 | 186 | pkg-kmod: @DEFAULT_PACKAGE@-kmod |
c9c0d073 | 187 | pkg-utils: @DEFAULT_PACKAGE@-utils |
94a2dca6 | 188 | |
e6c093dd AS |
189 | include config/rpm.am |
190 | include config/deb.am | |
191 | include config/tgz.am | |
192 | ||
94a2dca6 | 193 | .PHONY: $(PHONY) |