Mk/bsd.openssl.mk optimization
V.Chukharev
chukharev at mail.ru
Tue Jul 29 15:26:49 UTC 2008
On Fri, 25 Jul 2008 20:19:42 +0300, Kris Kennaway <kris at freebsd.org> wrote:
> V.Chukharev wrote:
>> With the patch Mk/bsd.port.sudir.mk .include's Mk/bsd.openssl.mk, hence everywhere
>> when the former is used the latter is inderectly included. This is because I did not
>> want to split the openssl staff into two parts. I put some protection.
>
> You don't want to .include the file, just use the same make -f trick
> that I used for e.g. the python and java variable caching.
Ah, thanks, I think I got it now. Please, review.
======================
--- /usr/ports/Mk/bsd.port.subdir.mk.orig 2008-07-21 16:00:36.000000000 +0300
+++ /usr/ports/Mk/bsd.port.subdir.mk 2008-07-29 17:51:57.000000000 +0300
@@ -137,6 +137,25 @@
UID!= ${ID} -u
.endif
+.if !defined(LOCALBASE)
+LOCALBASE!= make -f ${PORTSDIR}/Mk/bsd.port.mk -V LOCALBASE
+.endif
+_OPENSSL_ENV= LOCALBASE=${LOCALBASE:Q} HEAD=${HEAD:Q} CUT=${CUT:Q} OSVERSION=${OSVERSION:Q}
+.if !defined(OPENSSL_INSTALLED)
+OPENSSL_INSTALLED!= make ${_OPENSSL_ENV} -f ${PORTSDIR}/Mk/bsd.openssl.mk -V OPENSSL_INSTALLED
+.endif
+
+#_OPENSSL_ENV+= OPENSSL_INSTALLED=${OPENSSL_INSTALLED:Q}
+.if !defined(OPENSSL_PORT)
+OPENSSL_PORT!= make ${_OPENSSL_ENV} -f ${PORTSDIR}/Mk/bsd.openssl.mk -V OPENSSL_PORT
+.endif
+
+# We cannot do the next line, currently bsd.openssl.mk needs OPENSSL_PORT undefined
+#_OPENSSL_ENV+= OPENSSL_PORT=${OPENSSL_PORT:Q}
+.if !defined(OPENSSL_SHLIBFILE)
+OPENSSL_SHLIBFILE!= make ${_OPENSSL_ENV} -f ${PORTSDIR}/Mk/bsd.openssl.mk -V OPENSSL_SHLIBFILE
+.endif
+
.if exists(${LOCALBASE}/sbin/pkg_info)
PKG_INFO?= ${LOCALBASE}/sbin/pkg_info
.else
@@ -374,6 +393,9 @@
PKGINSTALLVER="${PKGINSTALLVER:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \
HAVE_COMPAT_IA32_KERN="${HAVE_COMPAT_IA32_KERN}" \
CONFIGURE_MAX_CMD_LEN="${CONFIGURE_MAX_CMD_LEN}" \
+ OPENSSL_INSTALLED="${OPENSSL_INSTALLED}" \
+ OPENSSL_PORT="${OPENSSL_PORT}" \
+ OPENSSL_SHLIBFILE="${OPENSSL_SHLIBFILE}" \
PYTHON_DEFAULT_VERSION="${PYTHON_DEFAULT_VERSION}" \
PYTHON_DEFAULT_PORTVERSION="${PYTHON_DEFAULT_PORTVERSION}" \
PYTHONBASE="${PYTHONBASE}" \
======================
I also tried to make only one sweep over /var/db/pkg, but with uncommented
'OPENSSL_INSTALLED+=' line (and corresponding '.if !defined' in bsd.openssl.mk)
INDEX-7 was different. I could not trace down the reason.
Best regards,
Vladimir
> Kris
>
--
V. Chukharev
More information about the freebsd-ports
mailing list