summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/asr/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libc/asr/Makefile')
-rw-r--r--src/regress/lib/libc/asr/Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/regress/lib/libc/asr/Makefile b/src/regress/lib/libc/asr/Makefile
new file mode 100644
index 0000000000..f110cbe25e
--- /dev/null
+++ b/src/regress/lib/libc/asr/Makefile
@@ -0,0 +1,52 @@
1# $OpenBSD: Makefile,v 1.1.1.1 2012/07/13 17:49:53 eric Exp $
2
3#
4# Note on building and running the regress tests:
5#
6# The regress suite builds two sets of static executables: one linked
7# against the current libc, and one linked against a libc with the resolver
8# replaced. The idea is to compare the output of all programs in both cases.
9#
10# So before building the regression test programs, you need to have the two
11# libc.a ready. By default, it is assumed that the asr-enabled libc was just
12# built from src but not installed, so the current libc.a is expected to be
13# found in /usr/lib, and the new one in /usr/obj/lib/libc. If your setting
14# is different, just set LIBCDIRSTD and LIBCDIRASR accordingly.
15#
16# When done, run "make && make install". This builds and installs the two sets
17# of programs in REGRESSDIR. They will run chrooted there to allow testing with
18# various /etc environment without messing up the local machine config files.
19#
20# When you are sure everything is in place, run "make regress". This will
21# create two files: $REGRESSDIR/output.log with the output of all run tests,
22# and $REGRESSDIR/regress.log with the diffs for those that "failed".
23#
24# Note that "install" and "regress" targets need to be run as root.
25#
26
27LIBCDIRSTD?= /usr/lib
28LIBCDIRASR?= /usr/obj/lib/libc
29
30REGRESSDIR?= /tmp/regress
31
32all: build
33
34build:
35 cd bin && EXT=.asr LDFLAGS=-L${LIBCDIRASR} make
36 cd bin && EXT=.std LDFLAGS=-L${LIBCDIRSTD} make
37
38clean:
39 cd bin && EXT=.std make clean
40 cd bin && EXT=.asr make clean
41
42install:
43 mkdir -p ${REGRESSDIR}/etc
44 mkdir -p ${REGRESSDIR}/bin
45 cd bin && BINDIR=${REGRESSDIR}/bin EXT=.std make install
46 cd bin && BINDIR=${REGRESSDIR}/bin EXT=.asr make install
47
48uninstall:
49 rm -rf ${REGRESSDIR}
50
51regress:
52 RUNDIR=${REGRESSDIR} sh ${.CURDIR}/regress.sh