xref: /illumos-gate/usr/src/test/util-tests/tests/mdb/Makefile (revision 012e6ce759c490003aed29439cc47d3d73a99ad3)
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 2020 Joyent, Inc.
14# Copyright 2021 Oxide Computer Company
15#
16
17include $(SRC)/cmd/Makefile.cmd
18include $(SRC)/test/Makefile.com
19
20ROOTOPTPKG = $(ROOT)/opt/util-tests
21TESTDIR = $(ROOTOPTPKG)/tests/mdb
22
23SUBDIRS = progs
24PROG = mdbtest
25
26ROOTPROG = $(PROG:%=$(TESTDIR)/%)
27
28MAKEDIRS = \
29	exit-e \
30	format \
31	options \
32	numbers \
33	typedef
34
35FILES = \
36	exit-e/err.cmdbadopt.ksh \
37	exit-e/err.enocmd.ksh \
38	exit-e/err.nowrite.ksh \
39	exit-e/err.unmapped.ksh \
40	exit-e/tst.output.ksh \
41	exit-e/tst.output.ksh.out \
42	exit-e/tst.simple.ksh \
43	format/tst.format-cap-E.mdb \
44	format/tst.format-cap-E.mdb.out \
45	format/tst.format-cap-G.mdb \
46	format/tst.format-cap-G.mdb.out \
47	format/tst.format-cap-J.mdb \
48	format/tst.format-cap-J.mdb.out \
49	format/tst.format-cap-P.mdb \
50	format/tst.format-cap-P.mdb.out \
51	format/tst.format-cap-R.mdb \
52	format/tst.format-cap-R.mdb.out \
53	format/tst.format-e.mdb \
54	format/tst.format-e.mdb.out \
55	format/tst.format-g.mdb \
56	format/tst.format-g.mdb.out \
57	format/tst.format-j.mdb \
58	format/tst.format-j.mdb.out \
59	format/tst.format-p.mdb \
60	format/tst.format-p.mdb.out \
61	numbers/tst.badnums.ksh \
62	numbers/tst.base10.mdb \
63	numbers/tst.base10.mdb.out \
64	numbers/tst.bitfields.ksh \
65	numbers/tst.bitfields.ksh.out \
66	numbers/tst.binary.mdb \
67	numbers/tst.binary.mdb.out \
68	numbers/tst.hex.mdb \
69	numbers/tst.hex.mdb.out \
70	numbers/tst.octal.mdb \
71	numbers/tst.octal.mdb.out \
72	numbers/tst.prefsym.ksh \
73	options/tst.autowrap.mdb \
74	options/tst.autowrap.mdb.out \
75	typedef/err.badid-leadnum.ksh \
76	typedef/err.badid-leadschar.ksh \
77	typedef/err.badmodel.ksh \
78	typedef/err.badstruct-extrabraces.ksh \
79	typedef/err.badstruct-neglenarr.ksh \
80	typedef/err.badstruct-noarrayclose.ksh \
81	typedef/err.badstruct-noarraylen.ksh \
82	typedef/err.badstruct-noarrayopen.ksh \
83	typedef/err.badstruct-nobraces.ksh \
84	typedef/err.badstruct-noclosebrace.ksh \
85	typedef/err.badstruct-nomembers.ksh \
86	typedef/err.badstruct-nomemname.ksh \
87	typedef/err.badstruct-nomemsemi.ksh \
88	typedef/err.badstruct-noopenbrace.ksh \
89	typedef/err.badstruct-noquotes.ksh \
90	typedef/err.badstruct-repmemname.ksh \
91	typedef/err.badstruct-vlaonly.ksh \
92	typedef/err.badstruct-zerolenarr.ksh \
93	typedef/err.badunion-hasvla.ksh \
94	typedef/err.extraargs.ksh \
95	typedef/err.noargs.ksh \
96	typedef/err.nokeyword.ksh \
97	typedef/err.nomodel.ksh \
98	typedef/err.noname.ksh \
99	typedef/err.typeexists.ksh \
100	typedef/tst.anonstruct.mdb \
101	typedef/tst.anonstruct.mdb.out \
102	typedef/tst.anonunion.mdb \
103	typedef/tst.anonunion.mdb.out \
104	typedef/tst.cleanupstruct.ksh \
105	typedef/tst.deftypes32.mdb \
106	typedef/tst.deftypes32.mdb.out \
107	typedef/tst.deftypes64.mdb \
108	typedef/tst.deftypes64.mdb.out \
109	typedef/tst.dellist.mdb \
110	typedef/tst.emptylist.mdb \
111	typedef/tst.libctype.ksh \
112	typedef/tst.libctype.ksh.out \
113	typedef/tst.models.ksh \
114	typedef/tst.radix.mdb \
115	typedef/tst.radix.mdb.out \
116	typedef/tst.struct.mdb \
117	typedef/tst.struct.mdb.out \
118	typedef/tst.structselfref.mdb \
119	typedef/tst.structselfref.mdb.out \
120	typedef/tst.structvla.mdb \
121	typedef/tst.structvla.mdb.out \
122	typedef/tst.union.mdb \
123	typedef/tst.union.mdb.out \
124
125ROOTFILES = $(FILES:%=$(TESTDIR)/%)
126ROOTMAKEDIRS = $(MAKEDIRS:%=$(TESTDIR)/%)
127
128FILEMODE = 0444
129
130$(TESTDIR)/mdbtest := FILEMODE = 0555
131
132
133all     :=      TARGET = all
134install :=      TARGET = install
135clean   :=      TARGET = clean
136clobber :=      TARGET = clobber
137
138all: $(SUBDIRS)
139
140install: all $(ROOTFILES) $(ROOTPROG) $(SUBDIRS)
141
142clean clobber: $(SUBDIRS)
143
144$(ROOTFILES): $(TESTDIR) $(ROOTMAKEDIRS) $(FILES)
145
146$(TESTDIR) $(ROOTMAKEDIRS):
147	$(INS.dir)
148
149$(TESTDIR)/%: %
150	$(INS.file)
151
152$(SUBDIRS): FRC
153	cd $@; pwd; $(MAKE) $(TARGET)
154