]>
Commit | Line | Data |
---|---|---|
7bdf406d TG |
1 | ACLOCAL_AMFLAGS = -I config |
2 | ||
3 | include config/rpm.am | |
4 | include config/deb.am | |
5 | include config/tgz.am | |
6 | ||
d177712e | 7 | |
7bdf406d | 8 | if CONFIG_USER |
d177712e | 9 | |
7bdf406d TG |
10 | endif |
11 | if CONFIG_KERNEL | |
d177712e | 12 | SUBDIRS = module include |
7bdf406d TG |
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 | ||
0bd31011 | 42 | checkstyle: cstyle shellcheck |
7bdf406d TG |
43 | |
44 | cstyle: | |
45 | @find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \ | |
46 | ! -name '*.mod.c' -type f -exec scripts/cstyle.pl {} \+ | |
47 | ||
48 | shellcheck: | |
49 | @if type shellcheck > /dev/null 2>&1; then \ | |
50 | (find ${top_srcdir} -type f -name '*.sh.in' -o -type f \ | |
51 | -name '*.sh'; find etc/init.d/zfs*.in -type f) | \ | |
52 | grep -v 'zfs-script-config' | \ | |
53 | while read file; do \ | |
54 | shellcheck --format gcc "$$file"; \ | |
55 | done; \ | |
56 | fi | |
57 | ||
58 | lint: cppcheck | |
59 | ||
60 | cppcheck: | |
61 | @if type cppcheck > /dev/null 2>&1; then \ | |
0bd31011 | 62 | cppcheck --quiet --force ${top_srcdir}; \ |
7bdf406d TG |
63 | fi |
64 | ||
65 | ctags: | |
66 | $(RM) tags | |
67 | find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags | |
68 | ||
69 | etags: | |
70 | $(RM) TAGS | |
71 | find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a | |
72 | ||
73 | tags: ctags etags | |
74 | ||
75 | pkg: @DEFAULT_PACKAGE@ | |
76 | pkg-kmod: @DEFAULT_PACKAGE@-kmod | |
77 | pkg-utils: @DEFAULT_PACKAGE@-utils |