Module Name: src
Committed By: martin
Date: Tue Aug 12 11:48:22 UTC 2014
Modified Files:
src/distrib/common: Makefile.image
Log Message:
Add a IMAGEPREBUILD option for makefiles to ovveride (e.g. to additionally
add files to the staging directory)
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/distrib/common/Makefile.image
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/common/Makefile.image
diff -u src/distrib/common/Makefile.image:1.37 src/distrib/common/Makefile.image:1.38
--- src/distrib/common/Makefile.image:1.37 Wed Aug 6 11:41:18 2014
+++ src/distrib/common/Makefile.image Tue Aug 12 11:48:22 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.image,v 1.37 2014/08/06 11:41:18 apb Exp $
+# $NetBSD: Makefile.image,v 1.38 2014/08/12 11:48:22 martin Exp $
#
# Makefile snippet to build a tree from the provided lists,
# and make an ffs file system image from that tree
@@ -13,6 +13,7 @@
#
# Optional variables:
# IMAGE name of target image
+# IMAGEPREBUILD additional operations to run pre image creation
# IMAGEPOSTBUILD operation to run on ${IMAGE} ${.TARGET} after its built
# (if this returns non zero, ${.TARGET} is removed)
# CRUNCHBIN name of crunchgen(1)ed binary
@@ -85,6 +86,9 @@ CLEANFILES+= ${WORKSPEC} ${WORKSPEC}.tmp
.if defined(IMAGE) # {
IMGMAKEFSOPTIONS?= -o bsize=4096,fsize=512
${IMAGE}: ${WORKBUILT}
+.if defined(IMAGEPREBUILD)
+ ${IMAGEPREBUILD}
+.endif
[ "${.OODATE}" = ${WORKBUILT} -a -f ${IMAGE} -a ! ${IMAGE} -ot ${WORKBUILT} ] || { \
${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
rm -f ${.TARGET} ${.TARGET}.tmp; \