From bcc653404c547c4727c5349aff5389164221bbd9 Mon Sep 17 00:00:00 2001 From: jlam Date: Thu, 9 Mar 2006 23:31:51 +0000 Subject: Make it safe to include bsd.pkginstall.mk directly in bsd.pkg.mk, and drop pkginstall.mk, which did the same thing. Also, rework some of the targets so that we avoid needing to inspect *_MEMBERS variables within make -- we defer the check to the shell code invoked by the targets. All changes are internal and don't affect existing packages in a visible way. --- mk/bsd.pkg.mk | 4 +- mk/install/bsd.pkginstall.mk | 151 +++++++++++++++++++++++++++++-------------- mk/install/pkginstall.mk | 58 ----------------- 3 files changed, 103 insertions(+), 110 deletions(-) delete mode 100644 mk/install/pkginstall.mk (limited to 'mk') diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 798faea29aa..139a440a69c 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1803 2006/03/09 15:58:10 rillig Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1804 2006/03/09 23:31:51 jlam Exp $ # # This file is in the public domain. # @@ -420,7 +420,7 @@ SCRIPTS_ENV+= ${INSTALL_MACROS} # .include "../../mk/alternatives.mk" -.include "../../mk/install/pkginstall.mk" +.include "../../mk/install/bsd.pkginstall.mk" # Set INSTALL_FILE to be the name of any INSTALL file .if !defined(INSTALL_FILE) && exists(${PKGDIR}/INSTALL) diff --git a/mk/install/bsd.pkginstall.mk b/mk/install/bsd.pkginstall.mk index 436f2a055ef..17e51e9a1bf 100644 --- a/mk/install/bsd.pkginstall.mk +++ b/mk/install/bsd.pkginstall.mk @@ -1,18 +1,57 @@ -# $NetBSD: bsd.pkginstall.mk,v 1.35 2006/03/09 00:20:27 jlam Exp $ -# -# This Makefile fragment is included by mk/install/pkginstall.mk and is -# the implemenation file for the common INSTALL/DEINSTALL scripts -# framework. To use the pkginstall framework, simply set the relevant -# variables to customize the install scripts to the package. -# - -.if defined(BSD_PKG_INSTALL_MK) -PKG_FAIL_REASON+= "[bsd.pkginstall.mk] Must not be included directly." - +# $NetBSD: bsd.pkginstall.mk,v 1.36 2006/03/09 23:31:51 jlam Exp $ +# +# This Makefile fragment is included by bsd.pkg.mk and implements the +# common INSTALL/DEINSTALL scripts framework. To use the pkginstall +# framework, simply set the relevant variables to customize the install +# scripts to the package. +# + +# _PKGINSTALL_VARS is a list of the variables that, if non-empty, indicate +# that the pkginstall framework should be used. These variables +# should be extracted from bsd.pkginstall.mk and are typically the +# variables named in the INSTALL_