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 Jun 27 10:36:40 UTC 2023
Modified Files:
pkgsrc/mk: bsd.prefs.mk
Log Message:
bsd.prefs.mk: Define _CROSS_DESTDIR before platform/${OPSYS}.mk.
This way, platform/${OPSYS}.mk has the opportunity to refer to it to
query characteristics of the operating system that we're building
packages for.
Step on the way to cross-OS builds.
To generate a diff of this commit:
cvs rdiff -u -r1.433 -r1.434 pkgsrc/mk/bsd.prefs.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.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.433 pkgsrc/mk/bsd.prefs.mk:1.434
--- pkgsrc/mk/bsd.prefs.mk:1.433 Tue Jun 27 10:27:20 2023
+++ pkgsrc/mk/bsd.prefs.mk Tue Jun 27 10:36:40 2023
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.433 2023/06/27 10:27:20 riastradh Exp $
+# $NetBSD: bsd.prefs.mk,v 1.434 2023/06/27 10:36:40 riastradh Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -450,6 +450,28 @@ SHAREMODE?= ${DOCMODE}
@${FALSE}
.endif
+# When cross-compilation support is requested, the following options
+# must be specified as well or guessable:
+# - MACHINE_ARCH is set to TARGET_ARCH if set.
+# - CROSS_DESTDIR is guessed from MAKEOBJDIR and MACHINE_ARCH.
+# - PKG_DBDIR is expanded and prefixed with CROSS_DESTDIR
+# - DESTDIR support is required
+#
+# _CROSS_DESTDIR is set for internal use to avoid conditionalising
+# the use.
+
+.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+. if defined(TARGET_ARCH)
+MACHINE_ARCH= ${TARGET_ARCH}
+. endif
+CROSS_DESTDIR?= ${MAKEOBJDIR}/destdir.${MACHINE_ARCH}
+. if !exists(${CROSS_DESTDIR}/usr/include/stddef.h)
+PKG_FAIL_REASON+= "The cross-compiling root ${CROSS_DESTDIR:Q} is incomplete"
+. else
+_CROSS_DESTDIR= ${CROSS_DESTDIR}
+. endif
+.endif
+
# Load the OS-specific definitions for program variables. Default to loading
# the NetBSD ones if an OS-specific file doesn't exist.
.if exists(${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk)
@@ -529,28 +551,6 @@ _MAKE_INSTALL_AS_ROOT?= yes
_MAKE_PACKAGE_AS_ROOT?= yes
# Whether to run the package target as root.
-# When cross-compilation support is requested, the following options
-# must be specified as well or guessable:
-# - MACHINE_ARCH is set to TARGET_ARCH if set.
-# - CROSS_DESTDIR is guessed from MAKEOBJDIR and MACHINE_ARCH.
-# - PKG_DBDIR is expanded and prefixed with CROSS_DESTDIR
-# - DESTDIR support is required
-#
-# _CROSS_DESTDIR is set for internal use to avoid conditionalising
-# the use.
-
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
-. if defined(TARGET_ARCH)
-MACHINE_ARCH= ${TARGET_ARCH}
-. endif
-CROSS_DESTDIR?= ${MAKEOBJDIR}/destdir.${MACHINE_ARCH}
-. if !exists(${CROSS_DESTDIR}/usr/include/stddef.h)
-PKG_FAIL_REASON+= "The cross-compiling root ${CROSS_DESTDIR:Q} is incomplete"
-. else
-_CROSS_DESTDIR= ${CROSS_DESTDIR}
-. endif
-.endif
-
# TOOLS_CROSS_DESTDIR is used for the libtool build to make a wrapper
# that points at the cross-destdir as sysroot, without setting
# _CROSS_DESTDIR because we're actually building a native package.
Home |
Main Index |
Thread Index |
Old Index