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 2026 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 shell \ 34 sou \ 35 typedef 36 37FILES = \ 38 exit-e/err.cmdbadopt.ksh \ 39 exit-e/err.enocmd.ksh \ 40 exit-e/err.nowrite.ksh \ 41 exit-e/err.unmapped.ksh \ 42 exit-e/tst.output.ksh \ 43 exit-e/tst.output.ksh.out \ 44 exit-e/tst.simple.ksh \ 45 format/tst.format-cap-E.mdb \ 46 format/tst.format-cap-E.mdb.out \ 47 format/tst.format-cap-G.mdb \ 48 format/tst.format-cap-G.mdb.out \ 49 format/tst.format-cap-J.mdb \ 50 format/tst.format-cap-J.mdb.out \ 51 format/tst.format-cap-P.mdb \ 52 format/tst.format-cap-P.mdb.out \ 53 format/tst.format-cap-R.mdb \ 54 format/tst.format-cap-R.mdb.out \ 55 format/tst.format-e.mdb \ 56 format/tst.format-e.mdb.out \ 57 format/tst.format-g.mdb \ 58 format/tst.format-g.mdb.out \ 59 format/tst.format-j.mdb \ 60 format/tst.format-j.mdb.out \ 61 format/tst.format-p.mdb \ 62 format/tst.format-p.mdb.out \ 63 numbers/tst.badnums.ksh \ 64 numbers/tst.base10.mdb \ 65 numbers/tst.base10.mdb.out \ 66 numbers/tst.bitfields.ksh \ 67 numbers/tst.bitfields.ksh.out \ 68 numbers/tst.binary.mdb \ 69 numbers/tst.binary.mdb.out \ 70 numbers/tst.hex.mdb \ 71 numbers/tst.hex.mdb.out \ 72 numbers/tst.octal.mdb \ 73 numbers/tst.octal.mdb.out \ 74 numbers/tst.prefsym.ksh \ 75 options/tst.autowrap.mdb \ 76 options/tst.autowrap.mdb.out \ 77 shell/err.bangpipe.ksh \ 78 shell/err.unterminated.ksh \ 79 shell/tst.escape.ksh \ 80 shell/tst.exec.ksh \ 81 shell/tst.filter.ksh \ 82 shell/tst.head.ksh \ 83 shell/tst.pipe.ksh \ 84 shell/tst.source.ksh \ 85 sou/tst.anon.ksh \ 86 sou/tst.anon.ksh.out \ 87 typedef/err.badid-leadnum.ksh \ 88 typedef/err.badid-leadschar.ksh \ 89 typedef/err.badmodel.ksh \ 90 typedef/err.badstruct-extrabraces.ksh \ 91 typedef/err.badstruct-neglenarr.ksh \ 92 typedef/err.badstruct-noarrayclose.ksh \ 93 typedef/err.badstruct-noarraylen.ksh \ 94 typedef/err.badstruct-noarrayopen.ksh \ 95 typedef/err.badstruct-nobraces.ksh \ 96 typedef/err.badstruct-noclosebrace.ksh \ 97 typedef/err.badstruct-nomembers.ksh \ 98 typedef/err.badstruct-nomemname.ksh \ 99 typedef/err.badstruct-nomemsemi.ksh \ 100 typedef/err.badstruct-noopenbrace.ksh \ 101 typedef/err.badstruct-noquotes.ksh \ 102 typedef/err.badstruct-repmemname.ksh \ 103 typedef/err.badstruct-vlaonly.ksh \ 104 typedef/err.badstruct-zerolenarr.ksh \ 105 typedef/err.badunion-hasvla.ksh \ 106 typedef/err.extraargs.ksh \ 107 typedef/err.noargs.ksh \ 108 typedef/err.nokeyword.ksh \ 109 typedef/err.nomodel.ksh \ 110 typedef/err.noname.ksh \ 111 typedef/err.typeexists.ksh \ 112 typedef/tst.anonstruct.mdb \ 113 typedef/tst.anonstruct.mdb.out \ 114 typedef/tst.anonunion.mdb \ 115 typedef/tst.anonunion.mdb.out \ 116 typedef/tst.cleanupstruct.ksh \ 117 typedef/tst.deftypes32.mdb \ 118 typedef/tst.deftypes32.mdb.out \ 119 typedef/tst.deftypes64.mdb \ 120 typedef/tst.deftypes64.mdb.out \ 121 typedef/tst.dellist.mdb \ 122 typedef/tst.emptylist.mdb \ 123 typedef/tst.libctype.ksh \ 124 typedef/tst.libctype.ksh.out \ 125 typedef/tst.models.ksh \ 126 typedef/tst.radix.mdb \ 127 typedef/tst.radix.mdb.out \ 128 typedef/tst.struct.mdb \ 129 typedef/tst.struct.mdb.out \ 130 typedef/tst.structselfref.mdb \ 131 typedef/tst.structselfref.mdb.out \ 132 typedef/tst.structvla.mdb \ 133 typedef/tst.structvla.mdb.out \ 134 typedef/tst.union.mdb \ 135 typedef/tst.union.mdb.out \ 136 137ROOTFILES = $(FILES:%=$(TESTDIR)/%) 138ROOTMAKEDIRS = $(MAKEDIRS:%=$(TESTDIR)/%) 139 140FILEMODE = 0444 141 142$(TESTDIR)/mdbtest := FILEMODE = 0555 143 144 145all := TARGET = all 146install := TARGET = install 147clean := TARGET = clean 148clobber := TARGET = clobber 149 150all: $(SUBDIRS) 151 152install: all $(ROOTFILES) $(ROOTPROG) $(SUBDIRS) 153 154clean clobber: $(SUBDIRS) 155 156$(ROOTFILES): $(TESTDIR) $(ROOTMAKEDIRS) $(FILES) 157 158$(TESTDIR) $(ROOTMAKEDIRS): 159 $(INS.dir) 160 161$(TESTDIR)/%: % 162 $(INS.file) 163 164$(SUBDIRS): FRC 165 cd $@; pwd; $(MAKE) $(TARGET) 166