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 2018 Nexenta Systems, Inc.
14 #
15
16 include $(SRC)/Makefile.master
17
18 ROOTOPTPKG= $(ROOT)/opt/libc-tests
19 TESTDIR= $(ROOTOPTPKG)/tests/regex
20 DATADIR= $(TESTDIR)/data
21
22 PROG= testregex
23
24 SHPROG= regex_test
25
26 DATA= basic.dat basic.out \
27 categorize.dat categorize.out \
28 forcedassoc.dat forcedassoc.out \
29 leftassoc.dat leftassoc.out \
30 nullsubexpr.dat nullsubexpr.out \
31 repetition.dat repetition.out \
32 rightassoc.dat rightassoc.out
33
34 include $(SRC)/cmd/Makefile.cmd
35
36 CERRWARN += -_gcc=-Wno-parentheses
37 CERRWARN += -_gcc=-Wno-uninitialized
38 CERRWARN += -_gcc=-Wno-clobbered
39
40 CMDS= $(PROG:%=$(TESTDIR)/%) $(SHPROG:%=$(TESTDIR)/%)
41 $(CMDS):= FILEMODE=0555
42 TESTDATA= $(DATA:%=$(DATADIR)/%)
43 $(TESTDATA):= FILEMODE=0444
44
45 .KEEP_STATE:
46
47 all: $(PROG)
48
49 $(CMDS): $(TESTDIR)
50
51 $(TESTDATA): $(DATADIR)
52
53 install: all $(CMDS) $(TESTDATA)
54
55 clean lint:
56
57 $(TESTDIR) $(DATADIR):
58 $(INS.dir)
59
60 $(TESTDIR)/%: %
61 $(INS.file)
62
63 $(TESTDIR)/%: %.sh
64 $(INS.rename)
65
66 $(DATADIR)/%: data/%
67 $(INS.file)
68
69 include $(SRC)/cmd/Makefile.targ