xref: /openbsd-src/regress/etc/MAKEDEV/Makefile (revision d23e7e94e56d15cac5d396f9759b4ba360df90bb)
1*d23e7e94Sbluhm# $OpenBSD: Makefile,v 1.38 2021/09/27 18:27:14 bluhm Exp $
24b8f2dbcStodd
3*d23e7e94SbluhmARCHS =
4*d23e7e94SbluhmARCHS +=	alpha amd64 arm64 armv7
5*d23e7e94SbluhmARCHS +=	hppa
6*d23e7e94SbluhmARCHS +=	i386
7*d23e7e94SbluhmARCHS +=	landisk loongson luna88k
8*d23e7e94SbluhmARCHS +=	macppc
9*d23e7e94SbluhmARCHS +=	octeon
10*d23e7e94SbluhmARCHS +=	powerpc64
11*d23e7e94SbluhmARCHS +=	riscv64
12*d23e7e94SbluhmARCHS +=	sparc64
134b8f2dbcStodd
14*d23e7e94SbluhmDEVS =		all ramdisk
154b8f2dbcStodd
16*d23e7e94SbluhmETCSRCDIR ?=	${.CURDIR}/../../../etc
170b345b24Stodd
18*d23e7e94SbluhmREGRESS_TARGETS =
194b8f2dbcStodd
20*d23e7e94Sbluhm.for a in ${ARCHS}
21*d23e7e94Sbluhm.for d in ${DEVS}
224b8f2dbcStodd
23*d23e7e94SbluhmREGRESS_TARGETS +=	run-$a-$d
24*d23e7e94Sbluhmrun-$a-$d:
25*d23e7e94Sbluhm	${SUDO} rm -rf -- $a-$d.dir
26*d23e7e94Sbluhm	mkdir -m 700 $a-$d.dir
27*d23e7e94Sbluhm	cp ${ETCSRCDIR}/etc.$a/MAKEDEV $a-$d.dir/
28*d23e7e94Sbluhm	${SUDO} chown root:wheel $a-$d.dir
29*d23e7e94Sbluhm	${SUDO} time sh -c 'cd $a-$d.dir && sh ./MAKEDEV $d'
30*d23e7e94Sbluhm	${SUDO} ls -ln $a-$d.dir/ | \
31479d3d99Stodd	    awk '/^[bcps]/ {printf "%s %x.%x %x,%x%s\n",$$1,$$3,$$4,$$5,$$6,$$10} \
32479d3d99Stodd		 /^l/      {printf "%s %s.%s%s>%s\n",$$1,$$3,$$4,$$9,$$11}' | \
33479d3d99Stodd	    sort +5 -n | \
34479d3d99Stodd	    sed -e 's/rwx/7/g;s/rw-/6/g;s/r-x/5/g;s/r--/4/g' \
35479d3d99Stodd		-e 's/-wx/3/g;s/-w-/2/g;s/--x/1/g;s/---/0/g' \
36479d3d99Stodd		-e 's/^\([bcpsl]\)\([0-9][0-9]*\) /\2\1/' \
37*d23e7e94Sbluhm	    >$a-$d.out
38*d23e7e94Sbluhm
39*d23e7e94Sbluhm.endfor
400b345b24Stodd.endfor
414b8f2dbcStodd
42*d23e7e94SbluhmREGRESS_ROOT_TARGETS=${REGRESS_TARGETS}
434b8f2dbcStodd
44*d23e7e94Sbluhmclean:
45*d23e7e94Sbluhm	${SUDO} rm -rf -- *-*.dir/
46*d23e7e94Sbluhm	${SUDO} rm -f -- *-*.out
474b8f2dbcStodd
48fd84ef7eSart.include <bsd.regress.mk>
49