xref: /illumos-gate/usr/src/test/libc-tests/tests/regex/Makefile (revision d0b3c59ba652f183eeec1414dd9fbdc56bf05cc8)
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
16include		$(SRC)/Makefile.master
17
18ROOTOPTPKG=	$(ROOT)/opt/libc-tests
19TESTDIR=	$(ROOTOPTPKG)/tests/regex
20DATADIR=	$(TESTDIR)/data
21
22PROG=		testregex
23
24SHPROG=		regex_test
25
26DATA=		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
34include		$(SRC)/cmd/Makefile.cmd
35
36CERRWARN +=	-_gcc=-Wno-parentheses
37CERRWARN +=	$(CNOWARN_UNINIT)
38CERRWARN +=	-_gcc=-Wno-clobbered
39
40# needs work
41SMOFF += all_func_returns,testing_index_after_use
42
43CMDS=		$(PROG:%=$(TESTDIR)/%) $(SHPROG:%=$(TESTDIR)/%)
44$(CMDS):=	FILEMODE=0555
45TESTDATA=	$(DATA:%=$(DATADIR)/%)
46$(TESTDATA):=	FILEMODE=0444
47
48.KEEP_STATE:
49
50all:		$(PROG)
51
52$(CMDS):	$(TESTDIR)
53
54$(TESTDATA):	$(DATADIR)
55
56install:	all $(CMDS) $(TESTDATA)
57
58clean lint:
59
60$(TESTDIR) $(DATADIR):
61		$(INS.dir)
62
63$(TESTDIR)/%:	%
64		$(INS.file)
65
66$(TESTDIR)/%:	%.sh
67		$(INS.rename)
68
69$(DATADIR)/%:	data/%
70		$(INS.file)
71
72include		$(SRC)/cmd/Makefile.targ
73