Source-Changes-HG archive

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

[src/trunk]: src/distrib/common Introduce and use GZIP_FLAGS variable.



details:   https://anonhg.NetBSD.org/src/rev/0104f8dd06a4
branches:  trunk
changeset: 797991:0104f8dd06a4
user:      apb <apb%NetBSD.org@localhost>
date:      Wed Aug 06 10:41:13 2014 +0000

description:
Introduce and use GZIP_FLAGS variable.

The previous use of GZIP="-9 ${GZIP_N_FLAG}" happened to work, but
the new use of GZIP=${GZIP_FLAGS:Q} is safer.

For consistency, also use GZIP_FLAGS elesehere in this file.

diffstat:

 distrib/common/Makefile.image |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 12887dfa130f -r 0104f8dd06a4 distrib/common/Makefile.image
--- a/distrib/common/Makefile.image     Wed Aug 06 10:37:30 2014 +0000
+++ b/distrib/common/Makefile.image     Wed Aug 06 10:41:13 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.image,v 1.35 2014/08/05 15:43:50 apb Exp $
+#      $NetBSD: Makefile.image,v 1.36 2014/08/06 10:41:13 apb Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -38,6 +38,7 @@
 
 PARSELISTENV+= TARGETDIR=${.OBJDIR}/${WORKDIR:Q}
 
+GZIP_FLAGS= -9 ${GZIP_N_FLAG}
 
 .if !target(${WORKBUILT})                                      # {
 ${WORKBUILT}: ${IMAGEDEPENDS} ${WORKSPEC} ${PARSELISTDEP} ${LISTS}
@@ -103,7 +104,7 @@
 ${IMAGE}.gz: ${IMAGE}
        ${_MKTARGET_CREATE}
        -rm -f ${.TARGET}
-       ${TOOL_GZIP_N} -9c ${.ALLSRC} > ${.TARGET}
+       ${TOOL_GZIP} ${GZIP_FLAGS} -c ${.ALLSRC} > ${.TARGET}
 
 realall: ${IMAGE}
 
@@ -121,7 +122,7 @@
 ${IMAGETAR}: ${WORKBUILT} ${WORKSPEC} ${IMAGEDEPENDS}
        ${_MKTARGET_CREATE}
        ( cd ${WORKDIR}; \
-         GZIP="-9 ${GZIP_N_FLAG}" \
+         GZIP=${GZIP_FLAGS:Q} \
          ${TOOL_PAX} -ON ${NETBSDSRCDIR}/etc -wdzM <${.OBJDIR}/${WORKSPEC} \
        ) > ${.TARGET}.tmp \
        && mv ${.TARGET}.tmp ${.TARGET}



Home | Main Index | Thread Index | Old Index