xref: /illumos-gate/usr/src/test/zfs-tests/Makefile.com (revision d8e10381a0083d7717710b0db7e64707bc0f3ff8)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright (c) 2016, 2017 by Delphix. All rights reserved.
14#
15
16# The following file name generation rules allow the addition of tests,
17# libraries and other miscellaneous files without having to specify them
18# all individually in lower level Makefiles.
19PROGS:sh = find . -maxdepth 1 -type f \( \
20    -name "*.ksh" -o \
21    -name "*.sh" \)
22FILES:sh = find . -maxdepth 1 -type f \( \
23    -name "*.Z" -o \
24    -name "*.bz2" -o \
25    -name "*.cfg" -o \
26    -name "*.d" -o \
27    -name "*.err" -o \
28    -name "*.fio" -o \
29    -name "*.out" -o \
30    -name "*.run" -o \
31    -name "*shlib" -o \
32    -name "*.txt" -o \
33    -name "*.zcp" \)
34
35CMDS = $(PROGS:%.sh=$(TARGETDIR)/%)
36CMDS += $(PROGS:%.ksh=$(TARGETDIR)/%)
37$(CMDS) := FILEMODE = 0555
38
39LIBS = $(FILES:%=$(TARGETDIR)/%)
40$(LIBS) := FILEMODE = 0444
41
42all lint clean clobber:
43
44install: $(CMDS) $(LIBS)
45
46$(CMDS): $(TARGETDIR)
47
48$(LIBS): $(TARGETDIR)
49
50$(TARGETDIR):
51	$(INS.dir)
52
53$(TARGETDIR)/%: %.sh
54	$(INS.rename)
55
56$(TARGETDIR)/%: %.ksh
57	$(INS.rename)
58
59$(TARGETDIR)/%: %
60	$(INS.file)
61
62.PARALLEL: $(SUBDIRS)
63SUBDIRS:sh = find ./* -maxdepth 0 -type d
64