summaryrefslogtreecommitdiff
path: root/regress/lib/csu/callbacks/pthread_atfork/Makefile
blob: 8e685447d7b7a933e6bea8d44ee5e3082e5863c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# $OpenBSD: Makefile,v 1.1 2014/11/23 08:46:49 guenther Exp $

.include <bsd.obj.mk>

AA_DIR=${.CURDIR}/../libaa
AA_OBJDIR!=    if [ -d $(AA_DIR)/${__objdir} ]; then \
                        echo "$(AA_DIR)/${__objdir}"; \
                else \
                        echo "$(AA_DIR)"; \
                fi

AB_DIR=${.CURDIR}/../libab
AB_OBJDIR!=    if [ -d $(AB_DIR)/${__objdir} ]; then \
                        echo "$(AB_DIR)/${__objdir}"; \
                else \
                        echo "$(AB_DIR)"; \
                fi

PROG=		pthread_atfork_test

SRCS=		pthread_atfork_test.c

CFLAGS+=	-DLIBAA="\"$(AA_OBJDIR)/libaa.so\""
CFLAGS+=	-DLIBAB="\"$(AB_OBJDIR)/libab.so\""
LDFLAGS+=	-Wl,-E

LDADD+=		-lpthread
DPADD+=		${LIBPTHREAD}

NOMAN=

CLEANFILES=	parent_out child_out

TESTS=		0

regress-pthread_atfork: ${PROG}
	for i in ${TESTS}; do \
		./${PROG} $$i || exit; \
		printf "finished $$i\n\n"; \
		printf "finished $$i\n\n" >&3; \
	done >parent_out 3>child_out
	cmp -s parent_out ${.CURDIR}/expected_parent.out
	cmp -s child_out ${.CURDIR}/expected_child.out

REGRESS_TARGETS=regress-pthread_atfork

install:

.include <bsd.regress.mk>