pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/install
Module Name: pkgsrc
Committed By: jperkin
Date: Fri Oct 11 12:39:30 UTC 2024
Modified Files:
pkgsrc/mk/install: install.mk
Log Message:
mk: Add mktool support to install-ctf.
mktool is an optional external tool, available from pkgtools/mktool or
"cargo install mktool", that provides significant performance improvements
compared to the default install-ctf target, while being 100% compatible.
After installing, set TOOLS_PLATFORM.mktool=/path/to/mktool to enable it.
mktool allows ctfconvert processes to run in parallel, significantly
reducing build time, especially in packages that ship lots of large
binaries. During testing, enabling mktool reduced the install-ctf time
in emulators/qemu on a SmartOS host from 40m 39s to 5m 13s.
To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 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/install/install.mk
diff -u pkgsrc/mk/install/install.mk:1.85 pkgsrc/mk/install/install.mk:1.86
--- pkgsrc/mk/install/install.mk:1.85 Wed Oct 4 11:39:59 2023
+++ pkgsrc/mk/install/install.mk Fri Oct 11 12:39:30 2024
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.85 2023/10/04 11:39:59 jperkin Exp $
+# $NetBSD: install.mk,v 1.86 2024/10/11 12:39:30 jperkin Exp $
#
# This file provides the code for the "install" phase.
#
@@ -361,6 +361,26 @@ _DEBUG_SKIP_PATTERNS+= *.dyn_hi *.hi *.p
###
.PHONY: install-ctf
install-ctf: plist
+.if !empty(TOOLS_PLATFORM.mktool)
+ ${RUN} \
+ ${STEP_MSG} "Generating CTF data"; \
+ ${RM} -f ${WRKDIR}/.ctfdata ${WRKDIR}/.ctferr; \
+ cd ${DESTDIR:Q}${PREFIX:Q}; \
+ while read f; do \
+ case "$${f}" in \
+ ${_DEBUG_SKIP_PATTERNS:@p@${p}) continue ;;@} \
+ ${CTF_FILES_SKIP:@p@${p}) continue ;;@} \
+ *) ;; \
+ esac; \
+ [ ! -h "$${f}" ] || continue; \
+ ${ECHO} "$${f}"; \
+ done < ${_PLIST_NOKEYWORDS} \
+ | ${TOOLS_PLATFORM.mktool} ctfconvert -I - \
+ -c ${TOOLS_PLATFORM.ctfconvert} -s ${DESTDIR}${PREFIX} \
+ >${WRKDIR}/.ctfdata 2>${WRKDIR}/.ctferr; \
+ [ -s ${WRKDIR}/.ctfdata ] || ${RM} -f ${WRKDIR}/.ctfdata; \
+ [ -s ${WRKDIR}/.ctferr ] || ${RM} -f ${WRKDIR}/.ctferr
+.else
${RUN} \
${STEP_MSG} "Generating CTF data"; \
cd ${DESTDIR:Q}${PREFIX:Q}; \
@@ -381,6 +401,7 @@ install-ctf: plist
${RM} -f "$${tmp_f}"; \
fi; \
done < ${_PLIST_NOKEYWORDS}
+.endif
######################################################################
### install-strip-debug (PRIVATE)
Home |
Main Index |
Thread Index |
Old Index