pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/wrapper Removed the separate files for the cache he...
details: https://anonhg.NetBSD.org/pkgsrc/rev/40dc067530bb
branches: trunk
changeset: 521898:40dc067530bb
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Nov 26 14:42:17 2006 +0000
description:
Removed the separate files for the cache header and footer. This makes
the code a lot more readable.
diffstat:
mk/wrapper/bsd.wrapper.mk | 32 ++++----------------------------
mk/wrapper/cache-footer | 38 --------------------------------------
mk/wrapper/cache-header | 37 -------------------------------------
mk/wrapper/logic | 10 ++++++----
mk/wrapper/wrapper.sh | 4 +---
5 files changed, 11 insertions(+), 110 deletions(-)
diffs (205 lines):
diff -r df962ec995c4 -r 40dc067530bb mk/wrapper/bsd.wrapper.mk
--- a/mk/wrapper/bsd.wrapper.mk Sun Nov 26 14:39:52 2006 +0000
+++ b/mk/wrapper/bsd.wrapper.mk Sun Nov 26 14:42:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.59 2006/11/26 13:02:53 rillig Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.60 2006/11/26 14:42:17 rillig Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -172,9 +172,7 @@
_WRAP_ARG_SOURCE?= ${WRAPPER_TMPDIR}/arg-source
_WRAP_BUILDCMD?= ${WRAPPER_TMPDIR}/buildcmd
_WRAP_CACHE?= ${WRAPPER_TMPDIR}/cache
-_WRAP_CACHE_HEADER?= ${WRAPPER_TMPDIR}/cache-header
_WRAP_CACHE_BODY?= ${WRAPPER_TMPDIR}/cache-body
-_WRAP_CACHE_FOOTER?= ${WRAPPER_TMPDIR}/cache-footer
_WRAP_CLEANUP?= ${_WRAP_EMPTY_FILE}
_WRAP_CMD_SINK?= ${WRAPPER_TMPDIR}/cmd-sink
_WRAP_GEN_REORDER?= ${WRAPPER_TMPDIR}/gen-reorder
@@ -207,9 +205,7 @@
_WRAP_ARG_SOURCE.${_wrappee_}?= ${_WRAP_ARG_SOURCE}
_WRAP_BUILDCMD.${_wrappee_}?= ${_WRAP_BUILDCMD}
_WRAP_CACHE.${_wrappee_}?= ${_WRAP_CACHE}
-_WRAP_CACHE_HEADER.${_wrappee_}?= ${_WRAP_CACHE_HEADER}
_WRAP_CACHE_BODY.${_wrappee_}?= ${_WRAP_CACHE_BODY}
-_WRAP_CACHE_FOOTER.${_wrappee_}?= ${_WRAP_CACHE_FOOTER}
_WRAP_CLEANUP.${_wrappee_}?= ${_WRAP_CLEANUP}
_WRAP_CMD_SINK.${_wrappee_}?= ${_WRAP_CMD_SINK}
_WRAP_LOG.${_wrappee_}?= ${_WRAP_LOG}
@@ -363,9 +359,7 @@
-e "s|@_WRAP_ARG_SOURCE@|${_WRAP_ARG_SOURCE.${_wrappee_}:Q}|g" \
-e "s|@_WRAP_BUILDCMD@|${_WRAP_BUILDCMD.${_wrappee_}:Q}|g" \
-e "s|@_WRAP_CACHE@|${_WRAP_CACHE.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CACHE_HEADER@|${_WRAP_CACHE_HEADER.${_wrappee_}:Q}|g" \
-e "s|@_WRAP_CACHE_BODY@|${_WRAP_CACHE_BODY.${_wrappee_}:Q}|g" \
- -e "s|@_WRAP_CACHE_FOOTER@|${_WRAP_CACHE_FOOTER.${_wrappee_}:Q}|g" \
-e "s|@_WRAP_CLEANUP@|${_WRAP_CLEANUP.${_wrappee_}:Q}|g" \
-e "s|@_WRAP_CMD_SINK@|${_WRAP_CMD_SINK.${_wrappee_}:Q}|g" \
-e "s|@_WRAP_LOG@|${_WRAP_LOG.${_wrappee_}:Q}|g" \
@@ -576,20 +570,9 @@
. endif
. if !target(${_WRAP_CACHE.${_wrappee_}})
-${_WRAP_CACHE.${_wrappee_}}: \
- ${_WRAP_CACHE_HEADER.${_wrappee_}} \
- ${_WRAP_CACHE_BODY.${_wrappee_}} \
- ${_WRAP_CACHE_FOOTER.${_wrappee_}}
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
-. if !target(${_WRAP_CACHE_HEADER.${_wrappee_}})
-${_WRAP_CACHE_HEADER.${_wrappee_}}: ${WRAPPER_SRCDIR}/cache-header
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
+${_WRAP_CACHE.${_wrappee_}}:
+ ${RUN} mkdir ${.TARGET:H}
+ ${RUN} echo "cachehit=no" > ${.TARGET}
. endif
. if !target(${_WRAP_CACHE_BODY.${_wrappee_}})
@@ -598,13 +581,6 @@
${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_ARGS} ${.TARGET}
. endif
-. if !target(${_WRAP_CACHE_FOOTER.${_wrappee_}})
-${_WRAP_CACHE_FOOTER.${_wrappee_}}: ${WRAPPER_SRCDIR}/cache-footer
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
- | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
-. endif
-
. if !target(${_WRAP_CMD_SINK.${_wrappee_}})
${_WRAP_CMD_SINK.${_wrappee_}}: ${WRAPPER_SRCDIR}/cmd-sink
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
diff -r df962ec995c4 -r 40dc067530bb mk/wrapper/cache-footer
--- a/mk/wrapper/cache-footer Sun Nov 26 14:39:52 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-# $NetBSD: cache-footer,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-*) cachehit=no ;;
-esac
diff -r df962ec995c4 -r 40dc067530bb mk/wrapper/cache-header
--- a/mk/wrapper/cache-header Sun Nov 26 14:39:52 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-# $NetBSD: cache-header,v 1.1 2004/09/21 15:01:41 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-case $arg in
diff -r df962ec995c4 -r 40dc067530bb mk/wrapper/logic
--- a/mk/wrapper/logic Sun Nov 26 14:39:52 2006 +0000
+++ b/mk/wrapper/logic Sun Nov 26 14:42:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: logic,v 1.12 2006/10/21 11:42:25 rillig Exp $
+# $NetBSD: logic,v 1.13 2006/11/26 14:42:17 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -135,9 +135,11 @@
$cat >> $cache_body << EOF
$cachearg) arg=$cachedarg; split_arg=$split_arg; cachehit=yes ;;
EOF
- $cat $cache_header \
- $cache_body \
- $cache_footer > $cache-$$.tmp
+ { echo "case \$arg in"
+ $cat $cache_body
+ echo "*) cachehit=no ;;"
+ echo "esac"
+ } > $cache-$$.tmp
$mv -f $cache-$$.tmp $cache
;;
esac
diff -r df962ec995c4 -r 40dc067530bb mk/wrapper/wrapper.sh
--- a/mk/wrapper/wrapper.sh Sun Nov 26 14:39:52 2006 +0000
+++ b/mk/wrapper/wrapper.sh Sun Nov 26 14:42:17 2006 +0000
@@ -1,6 +1,6 @@
#! @WRAPPER_SHELL@
#
-# $NetBSD: wrapper.sh,v 1.8 2006/11/26 08:42:42 rillig Exp $
+# $NetBSD: wrapper.sh,v 1.9 2006/11/26 14:42:17 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -43,9 +43,7 @@
arg_source="@_WRAP_ARG_SOURCE@"
buildcmd="@_WRAP_BUILDCMD@"
cache="@_WRAP_CACHE@"
-cache_header="@_WRAP_CACHE_HEADER@"
cache_body="@_WRAP_CACHE_BODY@"
-cache_footer="@_WRAP_CACHE_FOOTER@"
cleanup="@_WRAP_CLEANUP@"
cmd_sink="@_WRAP_CMD_SINK@"
logic="@_WRAP_LOGIC@"
Home |
Main Index |
Thread Index |
Old Index