Source-Changes-HG archive

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

[src/trunk]: src/gnu/usr.sbin/postfix Speed up make by caching the objdirs of...



details:   https://anonhg.NetBSD.org/src/rev/6838a05e10f2
branches:  trunk
changeset: 558334:6838a05e10f2
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Feb 07 05:10:44 2004 +0000

description:
Speed up make by caching the objdirs of the 4 libraries.
On my P4 2.4 an empty "cleandir" goes from 6.63s to 1.43s.

diffstat:

 gnu/usr.sbin/postfix/Makefile     |   4 +++-
 gnu/usr.sbin/postfix/Makefile.inc |  26 +++++++++++++-------------
 2 files changed, 16 insertions(+), 14 deletions(-)

diffs (63 lines):

diff -r cd7452df48b4 -r 6838a05e10f2 gnu/usr.sbin/postfix/Makefile
--- a/gnu/usr.sbin/postfix/Makefile     Sat Feb 07 04:49:26 2004 +0000
+++ b/gnu/usr.sbin/postfix/Makefile     Sat Feb 07 05:10:44 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2003/03/08 19:12:16 perry Exp $
+#      $NetBSD: Makefile,v 1.11 2004/02/07 05:10:44 lukem Exp $
 
 # The first four of these are libraries and have to be built first.
 
@@ -32,4 +32,6 @@
 distribution:
        cd ${.CURDIR}/postfix-etc; ${MAKE} install
 
+.include "Makefile.inc"
+
 .include <bsd.subdir.mk>
diff -r cd7452df48b4 -r 6838a05e10f2 gnu/usr.sbin/postfix/Makefile.inc
--- a/gnu/usr.sbin/postfix/Makefile.inc Sat Feb 07 04:49:26 2004 +0000
+++ b/gnu/usr.sbin/postfix/Makefile.inc Sat Feb 07 05:10:44 2004 +0000
@@ -1,30 +1,30 @@
-#      $NetBSD: Makefile.inc,v 1.10 2002/12/24 19:47:47 perry Exp $
+#      $NetBSD: Makefile.inc,v 1.11 2004/02/07 05:10:44 lukem Exp $
 
 .include <bsd.own.mk>
 
 WARNS?=        0
 
-IDIST= ${NETBSDSRCDIR}/gnu/dist/postfix
+PFIX_DISTDIR=  ${NETBSDSRCDIR}/gnu/dist/postfix
 
 CPPFLAGS+= -DNETBSD1 -I${DIST} \
-       -I${IDIST}/src/dns -I${IDIST}/src/global -I${IDIST}/src/master \
-       -I${IDIST}/src/util
+       -I${PFIX_DISTDIR}/src/dns -I${PFIX_DISTDIR}/src/global \
+       -I${PFIX_DISTDIR}/src/master -I${PFIX_DISTDIR}/src/util
 # IPv6
 #CPPFLAGS+= -DINET6
 
-DOBJDIR!=      cd $(.CURDIR)/../dns && ${PRINTOBJDIR}
-LIBPDNS=       ${DOBJDIR}/libdns.a
-
-MOBJDIR!=      cd $(.CURDIR)/../masterlib && ${PRINTOBJDIR}
-LIBPMASTER=    ${MOBJDIR}/libmaster.a
+PFIX_SRCDIR=   ${NETBSDSRCDIR}/gnu/usr.sbin/postfix
 
-GOBJDIR!=      cd $(.CURDIR)/../global && ${PRINTOBJDIR}
-LIBPGLOBAL=    ${GOBJDIR}/libglobal.a
+.for _LD _LL in        dns dns masterlib master global global util util
+.if !defined(POBJDIR.${_LL})
+POBJDIR.${_LL}!=cd ${PFIX_SRCDIR}/${_LD} && ${PRINTOBJDIR}
+.MAKEOVERRIDES+=POBJDIR.${_LL}
+.endif
+LIBP${_LL:tu}= ${POBJDIR.${_LL}}/lib${_LL}.a
+.endfor
 
-UOBJDIR!=      cd $(.CURDIR)/../util && ${PRINTOBJDIR}
-LIBPUTIL=      ${UOBJDIR}/libutil.a
 
 # Directories to install into.
+#
 PFIX_LIBEXECDIR=/usr/libexec/postfix
 PFIX_ETCDIR=   /etc/postfix
 PFIX_EXAMPLEDIR=/usr/share/examples/postfix



Home | Main Index | Thread Index | Old Index