Source-Changes-HG archive

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

[src/trunk]: src/distrib/common support optional IMAGETAR; if defined, build ...



details:   https://anonhg.NetBSD.org/src/rev/4106820fc35a
branches:  trunk
changeset: 525482:4106820fc35a
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Apr 12 04:50:01 2002 +0000

description:
support optional IMAGETAR; if defined, build a tar.gz file named {IMAGETAR}
which contains the same contents as ${IMAGE}.

diffstat:

 distrib/common/Makefile.image |  16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diffs (37 lines):

diff -r 10618463821f -r 4106820fc35a distrib/common/Makefile.image
--- a/distrib/common/Makefile.image     Fri Apr 12 04:44:08 2002 +0000
+++ b/distrib/common/Makefile.image     Fri Apr 12 04:50:01 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.image,v 1.7 2002/04/12 01:59:45 lukem Exp $
+#      $NetBSD: Makefile.image,v 1.8 2002/04/12 04:50:01 lukem Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -20,6 +20,7 @@
 #      MAKEFS_FLAGS    extra options to ${MAKEFS}
 #      PARSELISTENV    environment variables to set for parselist.awk
 #      WORKDIR         directory to build image in to 
+#      IMAGETAR        tar.gz file to create containing ${IMAGE}'s contents
 #
 
 WORKDIR?=      work
@@ -59,6 +60,19 @@
 
 CLEANFILES+=   ${IMAGE} ${IMAGE}.tmp ${WORKBUILT} ${WORKSPEC} ${WORKSPEC}.tmp
 
+
+.if defined(IMAGETAR)                                          # {
+
+${IMAGETAR}: ${WORKBUILT} ${WORKSPEC} ${IMAGEDEPENDS}
+       ( cd ${WORKDIR}; \
+           GZIP=-9 ${PAX} -N ${_SRC_TOP_}/etc -wdzM < ${.OBJDIR}/${WORKSPEC} \
+       ) > ${.TARGET}.tmp \
+       && mv ${.TARGET}.tmp ${.TARGET}
+
+CLEANFILES+=   ${IMAGETAR} ${IMAGETAR}.tmp
+.endif                                                         # }
+
+
 clean cleandir distclean: cleanfsimage
 
 .PHONY: cleanfsimage



Home | Main Index | Thread Index | Old Index