From 1a12d7a97c38e73fdcb4e31dfcf970eef3a30d84 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 24 Oct 2020 06:28:11 +0000 Subject: [PATCH] install to PREFIX if defined, make tests dir before install.. This gets things working sanely for packaging... --- Makefile.inc | 7 +++++++ tests/Makefile | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index 0ef2231..48f7207 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,4 +1,11 @@ # This is to replicate the other parts of the FreeBSD build infrastructure. +.if defined(PREFIX) +BINDIR?= ${PREFIX}/sbin +SHAREDIR?= ${PREFIX}/share +TESTSBASE?= ${PREFIX}/tests +.else BINDIR?= /sbin +.endif + WARNS?= 6 diff --git a/tests/Makefile b/tests/Makefile index 0fa31a1..591c978 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2,8 +2,12 @@ PACKAGE= tests -TESTSDIR= ${TESTSBASE}/sys/geom/class/gate +TESTSDIR= ${TESTSBASE}/sbin/ggatessh +DIRS+= ${TESTSDIR} ATF_TESTS_SH+= ggatessh_test +# make sure dirs are created +beforeinstall: installdirs + .include