xref: /illumos-gate/usr/src/test/libc-tests/tests/regex/Makefile (revision 0a1985fd5d819434967276b189f6f06494028e2c)
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# Copyright 2023 Bill Sommerfeld <sommerfeld@hamachi.org>
15#
16
17include		$(SRC)/Makefile.master
18
19ROOTOPTPKG=	$(ROOT)/opt/libc-tests
20TESTDIR=	$(ROOTOPTPKG)/tests/regex
21DATADIR=	$(TESTDIR)/data
22
23PROG=		testregex
24
25SHPROG=		regex_test
26
27DATA=		basic.dat basic.out \
28		bug16127.dat bug16127.out \
29		categorize.dat categorize.out \
30		forcedassoc.dat forcedassoc.out \
31		leftassoc.dat leftassoc.out \
32		nullsubexpr.dat nullsubexpr.out \
33		repetition.dat repetition.out \
34		rightassoc.dat rightassoc.out
35
36include		$(SRC)/cmd/Makefile.cmd
37
38CERRWARN +=	-_gcc=-Wno-parentheses
39CERRWARN +=	$(CNOWARN_UNINIT)
40CERRWARN +=	-_gcc=-Wno-clobbered
41
42# needs work
43SMOFF += all_func_returns,testing_index_after_use
44
45CMDS=		$(PROG:%=$(TESTDIR)/%) $(SHPROG:%=$(TESTDIR)/%)
46$(CMDS):=	FILEMODE=0555
47TESTDATA=	$(DATA:%=$(DATADIR)/%)
48$(TESTDATA):=	FILEMODE=0444
49
50.KEEP_STATE:
51
52all:		$(PROG)
53
54$(CMDS):	$(TESTDIR)
55
56$(TESTDATA):	$(DATADIR)
57
58install:	all $(CMDS) $(TESTDATA)
59
60clean lint:
61
62$(TESTDIR) $(DATADIR):
63		$(INS.dir)
64
65$(TESTDIR)/%:	%
66		$(INS.file)
67
68$(TESTDIR)/%:	%.sh
69		$(INS.rename)
70
71$(DATADIR)/%:	data/%
72		$(INS.file)
73
74include		$(SRC)/cmd/Makefile.targ
75