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