pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Tue Jan 28 16:02:00 UTC 2025

Modified Files:
        pkgsrc/mk: bsd.pkg.barrier.mk
        pkgsrc/mk/install: install.mk

Log Message:
mk/install: New install-env target.

Works like configure-env, build-env, and test-env.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/mk/bsd.pkg.barrier.mk
cvs rdiff -u -r1.86 -r1.87 pkgsrc/mk/install/install.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/bsd.pkg.barrier.mk
diff -u pkgsrc/mk/bsd.pkg.barrier.mk:1.22 pkgsrc/mk/bsd.pkg.barrier.mk:1.23
--- pkgsrc/mk/bsd.pkg.barrier.mk:1.22   Wed Nov 23 13:30:38 2022
+++ pkgsrc/mk/bsd.pkg.barrier.mk        Tue Jan 28 16:01:59 2025
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.barrier.mk,v 1.22 2022/11/23 13:30:38 jperkin Exp $
+# $NetBSD: bsd.pkg.barrier.mk,v 1.23 2025/01/28 16:01:59 riastradh Exp $
 
 _COOKIE.barrier=       ${WRKDIR}/.barrier_cookie
 
@@ -29,7 +29,7 @@ _BARRIER_POST_TARGETS+=       replace
 _BARRIER_POST_TARGETS+=        package
 _BARRIER_POST_TARGETS+=        repackage
 _BARRIER_POST_TARGETS+=        package-install
-_BARRIER_POST_TARGETS+=        install
+_BARRIER_POST_TARGETS+=        install install-env
 
 .for _target_ in ${_BARRIER_POST_TARGETS}
 .  if make(${_target_})

Index: pkgsrc/mk/install/install.mk
diff -u pkgsrc/mk/install/install.mk:1.86 pkgsrc/mk/install/install.mk:1.87
--- pkgsrc/mk/install/install.mk:1.86   Fri Oct 11 12:39:30 2024
+++ pkgsrc/mk/install/install.mk        Tue Jan 28 16:02:00 2025
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.86 2024/10/11 12:39:30 jperkin Exp $
+# $NetBSD: install.mk,v 1.87 2025/01/28 16:02:00 riastradh Exp $
 #
 # This file provides the code for the "install" phase.
 #
@@ -468,3 +468,32 @@ privileged-install-hook: .PHONY
 ###
 install-clean: .PHONY package-eat-cookie check-clean _pkgformat-install-clean
        ${RUN} ${RM} -f ${PLIST} ${_COOKIE.install} ${_DEPENDS_PLIST}
+
+# install-env:
+#      Starts an interactive shell in WRKSRC.
+#
+#      This is only used during development and testing of a package
+#      to work in the environment (INSTALL_ENV) that is used by
+#      default for installing the packages.
+#
+# User-settable variables:
+#
+# INSTALL_ENV_SHELL
+#      The shell to start.
+#
+#      Default: ${SH}, to realistically match the install environment.
+#
+# Keywords: debug install
+
+INSTALL_ENV_SHELL?=    ${SH}
+install-env: .PHONY ${_PKGSRC_BARRIER:Ubarrier:D_install-env}
+_install-env: .PHONY configure
+       @${STEP_MSG} "Entering the install environment for ${PKGNAME}"
+.if ${INSTALL_DIRS:[#]} > 1 || ${INSTALL_DIRS} != ${WRKSRC}
+       @${ECHO_MSG} "The INSTALL_DIRS are:" \
+               ${INSTALL_DIRS:S,^${WRKSRC}$,.,:S,^${WRKSRC}/,,:Q}
+.endif
+       ${RUN}${_ULIMIT_CMD}                                            \
+       cd ${WRKSRC} &&                                                 \
+       ${PKGSRC_SETENV} ${INSTALL_ENV} ${MAKE_ENV} ${INSTALL_MAKE_FLAGS} \
+               ${INSTALL_ENV_SHELL}



Home | Main Index | Thread Index | Old Index