xref: /illumos-gate/usr/src/test/libc-tests/tests/regex/Makefile (revision 8c69cc8fbe729fa7b091e901c4b50508ccc6bb33)
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 2017 Nexenta Systems, Inc.
14#
15
16include		$(SRC)/Makefile.master
17
18ROOTOPTPKG=	$(ROOT)/opt/libc-tests
19TESTDIR=	$(ROOTOPTPKG)/tests/regex
20DATADIR=	$(TESTDIR)/data
21
22PROG=		h_regex
23OBJS=		main.o \
24		split.o
25
26SHPROG=		t_regex
27
28DATA=		anchor.in \
29		backref.in \
30		basic.in \
31		bracket.in \
32		c_comments.in \
33		complex.in \
34		error.in \
35		meta.in \
36		nospec.in \
37		paren.in \
38		regress.in \
39		repet_bounded.in \
40		repet_multi.in \
41		repet_ordinary.in \
42		startend.in \
43		subexp.in \
44		subtle.in \
45		word_bound.in \
46		zero.in
47
48include		$(SRC)/cmd/Makefile.cmd
49
50CMDS=		$(PROG:%=$(TESTDIR)/%) $(SHPROG:%=$(TESTDIR)/%)
51$(CMDS):=	FILEMODE=0555
52TESTDATA=	$(DATA:%=$(DATADIR)/%)
53$(TESTDATA):=	FILEMODE=0444
54
55CPPFLAGS +=	-I$(SRC)/lib/libc/port/regex
56
57.KEEP_STATE:
58
59all:		$(PROG)
60
61$(PROG):	$(OBJS)
62		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
63		$(POST_PROCESS)
64
65$(CMDS):	$(TESTDIR)
66
67$(TESTDATA):	$(DATADIR)
68
69install:	all $(CMDS) $(TESTDATA)
70
71clean:
72		$(RM) $(OBJS)
73
74lint:
75
76$(TESTDIR) $(DATADIR):
77		$(INS.dir)
78
79$(TESTDIR)/%:	%
80		$(INS.file)
81
82$(TESTDIR)/%:	%.sh
83		$(INS.rename)
84
85$(DATADIR)/%:	data/%
86		$(INS.file)
87
88include		$(SRC)/cmd/Makefile.targ
89