svn commit: r288931 - user/ngie/more-tests/share/mk
Garrett Cooper
ngie at FreeBSD.org
Tue Oct 6 17:08:32 UTC 2015
Author: ngie
Date: Tue Oct 6 17:08:31 2015
New Revision: 288931
URL: https://svnweb.freebsd.org/changeset/base/288931
Log:
Simplify netbsd-tests.test.mk
- projects/bmake and subsequent commits provide SRCTOP; there's no need to
manually specify it now.
- Use OBJROOT, not OBJDIR for defining MAKEOBJDIRPREFIX relative paths as a
followup to projects/bmake.
- Compute a sane default for TESTSRC
MFC after: 2 weeks
Modified:
user/ngie/more-tests/share/mk/netbsd-tests.test.mk
Modified: user/ngie/more-tests/share/mk/netbsd-tests.test.mk
==============================================================================
--- user/ngie/more-tests/share/mk/netbsd-tests.test.mk Tue Oct 6 17:07:30 2015 (r288930)
+++ user/ngie/more-tests/share/mk/netbsd-tests.test.mk Tue Oct 6 17:08:31 2015 (r288931)
@@ -3,22 +3,18 @@
.if !target(__netbsd_tests.test.mk__)
__netbsd_tests.test.mk__:
-.if !defined(OBJTOP)
-.error "Please define OBJTOP to the absolute path of the top of the object tree"
-.endif
+OBJROOT?= ${.OBJDIR:S/${RELDIR}//}
-.if !defined(SRCTOP)
-.error "Please define SRCTOP to the absolute path of the top of the source tree"
-.endif
+TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H}
-.if !defined(TESTSRC)
-.error "Please define TESTSRC to the absolute path of the test sources, e.g. contrib/netbsd-tests/lib/libc/stdio"
+.if !exists(${TESTSRC}/)
+.error "Please define TESTSRC to the absolute path of the test sources, e.g. $${SRCTOP}/contrib/netbsd-tests/lib/libc/stdio"
.endif
.PATH: ${TESTSRC}
LIBNETBSD_SRCDIR= ${SRCTOP}/lib/libnetbsd
-LIBNETBSD_OBJDIR= ${OBJTOP}/lib/libnetbsd
+LIBNETBSD_OBJDIR= ${OBJROOT}/lib/libnetbsd
.for t in ${NETBSD_ATF_TESTS_C}
CFLAGS.$t+= -I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
More information about the svn-src-user
mailing list