]>
Commit | Line | Data |
---|---|---|
70e083d2 TG |
1 | ACLOCAL_AMFLAGS = -I config |
2 | ||
3 | include config/rpm.am | |
4 | include config/deb.am | |
5 | include config/tgz.am | |
6 | ||
7 | ||
8 | if CONFIG_USER | |
9 | ||
10 | endif | |
11 | if CONFIG_KERNEL | |
12 | SUBDIRS = module include | |
13 | ||
14 | extradir = @prefix@/src/zfs-$(VERSION) | |
15 | extra_HEADERS = zfs.release.in zfs_config.h.in | |
16 | ||
17 | kerneldir = @prefix@/src/zfs-$(VERSION)/$(LINUX_VERSION) | |
18 | nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS) | |
19 | endif | |
20 | ||
21 | AUTOMAKE_OPTIONS = foreign | |
22 | EXTRA_DIST = autogen.sh copy-builtin | |
23 | EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am | |
24 | EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE | |
25 | ||
26 | distclean-local:: | |
27 | -$(RM) -R autom4te*.cache | |
28 | -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ | |
29 | -o -name .pc -o -name .hg -o -name .git \) -prune -o \ | |
30 | \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ | |
31 | -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ | |
32 | -o -name '.*.rej' -o -name '.script-config' -o -size 0 \ | |
33 | -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ | |
34 | -o -name 'Makefile' -o -name 'Module.symvers' \ | |
35 | -o -name '*.order' -o -name '*.markers' \) \ | |
36 | -type f -print | xargs $(RM) | |
37 | ||
38 | dist-hook: | |
39 | sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ | |
40 | $(distdir)/META | |
41 | ||
86e3c28a CIK |
42 | checkstyle: cstyle shellcheck flake8 commitcheck |
43 | ||
44 | commitcheck: | |
45 | @if git rev-parse --git-dir > /dev/null 2>&1; then \ | |
46 | scripts/commitcheck.sh; \ | |
47 | fi | |
70e083d2 TG |
48 | |
49 | cstyle: | |
50 | @find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \ | |
86e3c28a | 51 | ! -name '*.mod.c' -type f -exec scripts/cstyle.pl -cpP {} \+ |
70e083d2 TG |
52 | |
53 | shellcheck: | |
54 | @if type shellcheck > /dev/null 2>&1; then \ | |
86e3c28a CIK |
55 | shellcheck --exclude=SC1090 --format=gcc scripts/paxcheck.sh \ |
56 | scripts/zloop.sh \ | |
57 | scripts/zfs-tests.sh \ | |
58 | scripts/zfs.sh \ | |
59 | scripts/commitcheck.sh \ | |
60 | $$(find cmd/zed/zed.d/*.sh -type f) \ | |
61 | $$(find cmd/zpool/zpool.d/* -executable); \ | |
62 | fi | |
70e083d2 | 63 | |
86e3c28a | 64 | lint: cppcheck paxcheck |
70e083d2 TG |
65 | |
66 | cppcheck: | |
67 | @if type cppcheck > /dev/null 2>&1; then \ | |
86e3c28a CIK |
68 | cppcheck --quiet --force --error-exitcode=2 \ |
69 | --suppressions-list=.github/suppressions.txt \ | |
70 | -UHAVE_SSE2 -UHAVE_AVX512F \ | |
71 | ${top_srcdir}; \ | |
72 | fi | |
73 | ||
74 | paxcheck: | |
75 | @if type scanelf > /dev/null 2>&1; then \ | |
76 | scripts/paxcheck.sh ${top_srcdir}; \ | |
77 | fi | |
78 | ||
79 | flake8: | |
80 | @if type flake8 > /dev/null 2>&1; then \ | |
81 | flake8 ${top_srcdir}; \ | |
70e083d2 TG |
82 | fi |
83 | ||
84 | ctags: | |
85 | $(RM) tags | |
86 | find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags | |
87 | ||
88 | etags: | |
89 | $(RM) TAGS | |
90 | find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a | |
91 | ||
92 | tags: ctags etags | |
93 | ||
94 | pkg: @DEFAULT_PACKAGE@ | |
86e3c28a | 95 | pkg-dkms: @DEFAULT_PACKAGE@-dkms |
70e083d2 TG |
96 | pkg-kmod: @DEFAULT_PACKAGE@-kmod |
97 | pkg-utils: @DEFAULT_PACKAGE@-utils |