xref: /original-bsd/old/dbx/tests/cc/Makefile (revision ad93c43e)
1#
2# Copyright (c) 1986 Regents of the University of California.
3# All rights reserved.  The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
6#	@(#)Makefile	5.2 (Berkeley) 07/27/87
7#
8# Makefile for testing dbx.
9#
10
11.SUFFIXES:
12
13.SUFFIXES: .c .h .s .o .x .t .in .tst .out
14
15#
16# Suffix conventions:
17#
18#	.c	C source module
19#	.h	C definitions file
20#	.s	assembly code file
21#	.o	object file
22#	.x	executable file
23#	.t	dummy file represented last time tested
24#	.in	input for testing
25#	.tst	test output
26#	.out	expected output
27#
28
29CC = cc
30
31TESTDBX = ../../tdbx
32TESTS = \
33    aliases.t args.t arrays.t bitfields.t \
34    dump.t enum.t float.t loophole.t nested.t own.t reg.t \
35    same.t signal.t sleep.t stkcmds.t strings.t struct.t user.t ushort.t
36#   call.t - deleted as it crashes the CCI microcode.
37
38.c.x:
39	${CC} -g $*.c -o $*.x
40
41.c.o:
42	${CC} -c -g $*.c
43
44.in.tst:
45	@rm -f $*.tst
46	../runtest ${TESTDBX} $* > $*.tst
47
48.x.t:
49	@echo "    $*"
50	@rm -f tmp
51	@../runtest ${TESTDBX} $* > tmp
52	@../check tmp out/out.`machine`/$*.out
53	@rm -f tmp
54	@rm -f $*.t
55	@touch $*.t
56
57passed: beforemsg ${TESTS}
58	@echo "passed C tests"
59
60beforemsg:
61	@echo ""
62	@echo "C tests:"
63
64strings.x: strings.c
65	cc -g -R strings.c -o strings.x
66
67clean:
68	rm -f *.x *.t *.o *.tst strings.core
69
70aliases.t: aliases.x ${TESTDBX}
71args.t: args.x ${TESTDBX}
72arrays.t: arrays.x ${TESTDBX}
73bitfields.t: bitfields.x ${TESTDBX}
74call.t: call.x ${TESTDBX}
75dump.t: dump.x ${TESTDBX}
76enum.t: enum.x ${TESTDBX}
77float.t: float.x ${TESTDBX}
78loophole.t: loophole.x ${TESTDBX}
79nested.t: nested.x ${TESTDBX}
80own.t: own.x ${TESTDBX}
81reg.t: reg.x ${TESTDBX}
82same.t: same.x ${TESTDBX}
83signal.t: signal.x ${TESTDBX}
84sleep.t: sleep.x ${TESTDBX}
85stkcmds.t: stkcmds.x ${TESTDBX}
86struct.t: struct.x ${TESTDBX}
87user.t: user.x ${TESTDBX}
88ushort.t: ushort.x ${TESTDBX}
89
90strings.t: strings.x strings.core ${TESTDBX}
91	@echo "    $*"
92	@rm -f tmp
93	@${TESTDBX} $*.x $*.core < $*.in | tail +3 > tmp
94	@../check tmp out/out.`machine`/$*.out
95	@rm -f tmp
96	@rm -f $*.t
97	@touch $*.t
98
99strings.core: strings.x
100	-csh -f -c "limit coredumpsize 6m >& /dev/null; strings.x"
101	mv core strings.core
102
103aliases.x: arrays.x
104	ln -s arrays.x aliases.x
105