]> git.proxmox.com Git - mirror_zfs.git/blob - Makefile.am
Style check shell scripts
[mirror_zfs.git] / Makefile.am
1
2 ACLOCAL_AMFLAGS = -I config
3
4 include $(top_srcdir)/config/rpm.am
5 include $(top_srcdir)/config/deb.am
6 include $(top_srcdir)/config/tgz.am
7
8 SUBDIRS = include rpm
9 if CONFIG_USER
10 SUBDIRS += dracut udev etc man scripts lib cmd contrib
11 endif
12 if CONFIG_KERNEL
13 SUBDIRS += module
14
15 extradir = @prefix@/src/zfs-$(VERSION)
16 extra_HEADERS = zfs.release.in zfs_config.h.in
17
18 kerneldir = @prefix@/src/zfs-$(VERSION)/$(LINUX_VERSION)
19 nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS)
20 endif
21
22 AUTOMAKE_OPTIONS = foreign
23 EXTRA_DIST = autogen.sh copy-builtin
24 EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
25 EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE
26
27 distclean-local::
28 -$(RM) -R autom4te*.cache
29 -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
30 -o -name .pc -o -name .hg -o -name .git \) -prune -o \
31 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
32 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
33 -o -name '.*.rej' -o -name '.script-config' -o -size 0 \
34 -o -name '*%' -o -name '.*.cmd' -o -name 'core' \
35 -o -name 'Makefile' -o -name 'Module.symvers' \
36 -o -name '*.order' -o -name '*.markers' \) \
37 -type f -print | xargs $(RM)
38
39 dist-hook:
40 sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
41 $(distdir)/META
42
43 checkstyle: cstyle shellcheck
44
45 cstyle:
46 @find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \
47 ! -name '*.mod.c' -type f -exec scripts/cstyle.pl {} \+
48
49 shellcheck:
50 @if type shellcheck > /dev/null 2>&1; then \
51 (find ${top_srcdir} -type f -name '*.sh.in' -o -type f \
52 -name '*.sh'; find etc/init.d/zfs*.in -type f) | \
53 grep -v 'zfs-script-config' | \
54 while read file; do \
55 shellcheck --format gcc "$$file"; \
56 done; \
57 fi
58
59 ctags:
60 $(RM) $(top_srcdir)/tags
61 find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
62
63 etags:
64 $(RM) $(top_srcdir)/TAGS
65 find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a
66
67 tags: ctags etags
68
69 pkg: @DEFAULT_PACKAGE@
70 pkg-kmod: @DEFAULT_PACKAGE@-kmod
71 pkg-utils: @DEFAULT_PACKAGE@-utils