]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Simplify netbsd-tests.test.mk
authorngie <ngie@FreeBSD.org>
Sun, 11 Oct 2015 20:02:10 +0000 (20:02 +0000)
committerngie <ngie@FreeBSD.org>
Sun, 11 Oct 2015 20:02:10 +0000 (20:02 +0000)
- projects/bmake and subsequent commits provide SRCTOP; there's no need to
  manually specify it now.
- Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually
  specifying this is probably no longer needed, but it persists just in case
  (supporting commits will need to be made to move it out of some of the meta
  .mk files).
- Compute a sane default for TESTSRC. Error out if the path cannot be found.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

share/mk/netbsd-tests.test.mk

index 5c31d77b33594c1df8620a70d45e838ba9ff1e04..92a401bf2585c39c8169253047eeffde4f3d7272 100644 (file)
@@ -3,16 +3,12 @@
 .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
+OBJTOP?=       ${.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}