Source-Changes-HG archive

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

[src/trunk]: src/distrib/common only provide targets for ${WORKSPEC} and ${WO...



details:   https://anonhg.NetBSD.org/src/rev/dd1c965ab4c9
branches:  trunk
changeset: 526720:dd1c965ab4c9
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu May 09 09:21:25 2002 +0000

description:
only provide targets for ${WORKSPEC} and ${WORKBUILT} if non are provided.
this allows custom specfiles to be generated or custom WORKDIRS to be used,
whilst still allowing use of IMAGE or IMAGETAR rules.

diffstat:

 distrib/common/Makefile.image |  30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diffs (69 lines):

diff -r c11b336ce453 -r dd1c965ab4c9 distrib/common/Makefile.image
--- a/distrib/common/Makefile.image     Thu May 09 07:22:09 2002 +0000
+++ b/distrib/common/Makefile.image     Thu May 09 09:21:25 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.image,v 1.16 2002/05/07 14:27:25 lukem Exp $
+#      $NetBSD: Makefile.image,v 1.17 2002/05/09 09:21:25 lukem Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -37,6 +37,7 @@
 PARSELISTENV+= TARGETDIR=${.OBJDIR}/${WORKDIR:Q}
 
 
+.if !target(${WORKBUILT})                                      # {
 ${WORKBUILT}: ${IMAGEDEPENDS} ${WORKSPEC} ${PARSELISTDEP} ${LISTS}
        @echo "Building tree into ${WORKDIR}"
        -rm -rf ${WORKDIR} ${WORKBUILT}
@@ -45,6 +46,18 @@
        ${PARSELIST} -v mode=populate ${LISTS} | sh -e ${POPULATE_DEBUG} \
        && touch ${WORKBUILT}
 
+CLEANFILES+=   ${WORKBUILT}
+
+clean cleandir distclean: cleanfsimage
+
+.PHONY: cleanfsimage
+
+cleanfsimage:
+       -rm -rf ${WORKDIR}
+
+.endif # ! target (${WORKBUILT})                               # }
+
+.if !target(${WORKSPEC})                                       # {
 ${WORKSPEC}: ${MTREECONF} ${LISTS} ${PARSELISTDEP}
        -rm -f ${.TARGET} ${.TARGET}.tmp
        ( for i in ${MTREECONF}; do     \
@@ -54,7 +67,8 @@
        ${PARSELIST} -v mode=mtree ${LISTS} >> ${.TARGET}.tmp \
        && mv ${.TARGET}.tmp ${.TARGET}
 
-CLEANFILES+=   ${WORKBUILT} ${WORKSPEC} ${WORKSPEC}.tmp
+CLEANFILES+=   ${WORKSPEC} ${WORKSPEC}.tmp
+.endif # ! target (${WORKSPEC})                                # }
 
 .if defined(IMAGE)                                             # {
 ${IMAGE}: ${WORKBUILT} ${WORKSPEC} ${IMAGEDEPENDS}
@@ -81,7 +95,7 @@
 .endif
 
 CLEANFILES+=   ${IMAGE} ${IMAGE}.gz ${IMAGE}.tmp
-.endif # IMAGE                                                 # }
+.endif # ! defined(IMAGE)                                      # }
 
 
 .if defined(IMAGETAR)                                          # {
@@ -100,12 +114,4 @@
        ${RELEASE_INSTALL} ${IMAGETAR} ${RELEASEDIR}/${IMAGETAR_RELEASEDIR}
 .endif
 
-.endif # IMAGETAR                                              # }
-
-
-clean cleandir distclean: cleanfsimage
-
-.PHONY: cleanfsimage
-
-cleanfsimage:
-       -rm -rf ${WORKDIR}
+.endif # ! defined(IMAGETAR)                                   # }



Home | Main Index | Thread Index | Old Index