xref: /illumos-gate/usr/src/test/libc-tests/tests/err/Makefile (revision dd72704bd9e794056c558153663c739e2012d721)
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 2022 OmniOS Community Edition (OmniOSce) Association.
14#
15
16include $(SRC)/Makefile.master
17
18ROOTOPTPKG =	$(ROOT)/opt/libc-tests
19TESTDIR =	$(ROOTOPTPKG)/tests/err
20DATADIR=	$(TESTDIR)/data
21
22PROGS = err
23SCRIPTS = err.ksh
24DATA :sh= (cd data; print *)
25
26include $(SRC)/cmd/Makefile.cmd
27include $(SRC)/test/Makefile.com
28
29CMDS =		$(PROGS:%=$(TESTDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
30TESTDATA=	$(DATA:%=$(DATADIR)/%)
31
32$(CMDS) := FILEMODE = 0555
33$(TESTDATA) := FILEMODE = 0444
34
35CSTD = $(CSTD_GNU99)
36
37all: $(PROGS)
38
39install: all $(CMDS) $(TESTDATA)
40
41clobber: clean
42	-$(RM) $(PROGS)
43
44clean:
45	-$(RM) *.o
46
47$(CMDS): $(TESTDIR) $(PROGS)
48
49$(TESTDATA): $(DATADIR)
50
51$(TESTDIR) $(DATADIR):
52	$(INS.dir)
53
54$(TESTDIR)/%: %
55	$(INS.file)
56
57$(DATADIR)/%:	data/%
58	$(INS.file)
59
60