Pass BINDIR down via Makefile.inc, rather than hardcoding /usr/sbin -

useful for systems where /usr/sbin is not the directory of choice.
This commit is contained in:
agc 1999-08-19 14:37:36 +00:00
parent d5c5c423a3
commit 358f97854c
2 changed files with 7 additions and 6 deletions

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile.inc,v 1.5 1997/10/25 06:58:29 lukem Exp $
# $NetBSD: Makefile.inc,v 1.6 1999/08/19 14:37:36 agc Exp $
# Original from Freebsd, no rcs id.
LIBINSTALL != cd ${.CURDIR}/../lib;\
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
CPPFLAGS+=-I${.CURDIR}/../lib ${DEBUG}
CPPFLAGS+=-I${.CURDIR}/../lib ${DEBUG} -DBINDIR='"${BINDIR}"'
DPADD+= ${LIBINSTALL}/libinstall.a
LDADD+= -L${LIBINSTALL} -linstall

View File

@ -1,11 +1,11 @@
/* $NetBSD: perform.c,v 1.35 1999/08/19 14:12:34 agc Exp $ */
/* $NetBSD: perform.c,v 1.36 1999/08/19 14:37:37 agc Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
__RCSID("$NetBSD: perform.c,v 1.35 1999/08/19 14:12:34 agc Exp $");
__RCSID("$NetBSD: perform.c,v 1.36 1999/08/19 14:37:37 agc Exp $");
#endif
#endif
@ -327,7 +327,8 @@ pkg_do(char *pkg)
if (cp) {
if (Verbose)
printf("Loading it from %s.\n", cp);
if (vsystem("/usr/sbin/pkg_add %s%s %s%s",
if (vsystem("%s/pkg_add %s%s %s%s",
BINDIR,
Prefix ? "-p " : "",
Prefix ? Prefix : "",
Verbose ? "-v " : "", cp)) {
@ -441,7 +442,7 @@ pkg_do(char *pkg)
if (Verbose)
printf("mtree -U -f %s -d -e -p %s\n", MTREE_FNAME, p ? p->name : "/");
if (!Fake) {
if (vsystem("/usr/sbin/mtree -U -f %s -d -e -p %s", MTREE_FNAME, p ? p->name : "/"))
if (vsystem("%s/mtree -U -f %s -d -e -p %s", BINDIR, MTREE_FNAME, p ? p->name : "/"))
warnx("mtree returned a non-zero status - continuing");
}
unlink(MTREE_FNAME);