Support custom build directories and move includes
[zfs.git] / scripts / Makefile.am
1 SUBDIRS = zpool-config zpios-test zpios-profile
2
3 pkglibexecdir = $(libexecdir)/@PACKAGE@
4 dist_pkglibexec_SCRIPTS = \
5         $(top_builddir)/scripts/common.sh \
6         $(top_srcdir)/scripts/zconfig.sh \
7         $(top_srcdir)/scripts/zfs.sh \
8         $(top_srcdir)/scripts/zpool-create.sh \
9         $(top_srcdir)/scripts/zpios.sh \
10         $(top_srcdir)/scripts/zpios-sanity.sh \
11         $(top_srcdir)/scripts/zpios-survey.sh
12
13 ZFS=$(top_builddir)/scripts/zfs.sh
14 ZCONFIG=$(top_builddir)/scripts/zconfig.sh
15 ZTEST=$(top_builddir)/cmd/ztest/ztest
16 ZPIOS_SANITY=$(top_builddir)/scripts/zpios-sanity.sh
17
18 all:
19         @list='$(dist_pkglibexec_SCRIPTS)'; \
20         for file in $$list; do \
21                 link=$$(basename $$file); \
22                 if [ ! -e $$link ]; then \
23                         $(LN_S) $$file $$link; \
24                 fi \
25         done
26
27 clean:
28         @list='$(dist_pkglibexec_SCRIPTS)'; \
29         for file in $$list; do \
30                 link=$$(basename $$file); \
31                 if [ -L $$link ]; then \
32                         $(RM) $$link; \
33                 fi \
34         done
35
36 check:
37         @echo
38         @echo -n "===================================="
39         @echo -n " ZTEST "
40         @echo    "===================================="
41         @echo
42         @$(ZFS)
43         @$(ZTEST) -V
44         @$(ZFS) -u
45         @echo
46         @echo
47         @echo -n "==================================="
48         @echo -n " ZCONFIG "
49         @echo    "==================================="
50         @echo
51         @$(ZCONFIG)
52         @echo
53         @echo -n "===================================="
54         @echo -n " ZPIOS "
55         @echo    "===================================="
56         @echo
57         @$(ZFS)
58         @$(ZPIOS_SANITY)
59         @$(ZFS) -u
60         @echo