Source-Changes-HG archive

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

[src/trunk]: src/distrib/common/bootimage Fix checks for RELEASEDIR (and xxxx...



details:   https://anonhg.NetBSD.org/src/rev/629760b673bb
branches:  trunk
changeset: 772964:629760b673bb
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jan 22 16:50:00 2012 +0000

description:
Fix checks for RELEASEDIR (and xxxxIMGBASE) variables to perform it
only on live_image or install_image targets.  PR toolchain/45864

diffstat:

 distrib/common/bootimage/Makefile.bootimage    |   7 +------
 distrib/common/bootimage/Makefile.installimage |  15 +++++++--------
 distrib/common/bootimage/Makefile.liveimage    |  15 +++++++--------
 3 files changed, 15 insertions(+), 22 deletions(-)

diffs (99 lines):

diff -r e53672d2b921 -r 629760b673bb distrib/common/bootimage/Makefile.bootimage
--- a/distrib/common/bootimage/Makefile.bootimage       Sun Jan 22 16:41:42 2012 +0000
+++ b/distrib/common/bootimage/Makefile.bootimage       Sun Jan 22 16:50:00 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#      $NetBSD: Makefile.bootimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -123,11 +123,6 @@
        @echo "Error: IMGBASE is not set"
        @false
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-       @echo "Error: RELEASEDIR is not set"
-       @false
-.endif
 
 # should be defined elsewhere? 
 CAT?=          cat
diff -r e53672d2b921 -r 629760b673bb distrib/common/bootimage/Makefile.installimage
--- a/distrib/common/bootimage/Makefile.installimage    Sun Jan 22 16:41:42 2012 +0000
+++ b/distrib/common/bootimage/Makefile.installimage    Sun Jan 22 16:50:00 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.installimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#      $NetBSD: Makefile.installimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Common Makefile to create a bootable installation image for USB flash etc.
 #
@@ -11,15 +11,14 @@
 # See Makefile.bootimage for other variables.
 #
 
-.if empty(INSTIMGBASE)
-.BEGIN:
+.if !target(check_INSTIMGBASE)
+check_INSTIMGBASE: .PHONY .NOTMAIN
+.if !defined(INSTIMGBASE)
        @echo "Error: INSTIMGBASE is not set"
        @false
+.else
+       @true
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-       @echo "Error: RELEASEDIR is not set"
-       @false
 .endif
 
 SWAPMB=                0                       # no swap
@@ -54,7 +53,7 @@
 # should be defined elsewhere? 
 MKDIR?=                mkdir -p
 
-install_image: ${IMGBASE}.img.gz
+install_image: check_INSTIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
        ${MKDIR} ${INSTIMG_RELEASEDIR}
        ${RELEASE_INSTALL} ${IMGBASE}.img.gz ${INSTIMG_RELEASEDIR}
        # note ${MAKESUM} will be calculated in src/etc/Makefile
diff -r e53672d2b921 -r 629760b673bb distrib/common/bootimage/Makefile.liveimage
--- a/distrib/common/bootimage/Makefile.liveimage       Sun Jan 22 16:41:42 2012 +0000
+++ b/distrib/common/bootimage/Makefile.liveimage       Sun Jan 22 16:50:00 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.liveimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#      $NetBSD: Makefile.liveimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Common Makefile to create a bootable FS image for USB flash or emulators
 #
@@ -11,15 +11,14 @@
 # See Makefile.bootimage for other variables.
 #
 
-.if empty(LIVEIMGBASE)
-.BEGIN:
+.if !target(check_LIVEIMGBASE)
+check_LIVEIMGBASE: .PHONY .NOTMAIN
+.if !defined(LIVEIMGBASE)
        @echo "Error: LIVEIMGBASE is not set"
        @false
+.else
+       @true
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-       @echo "Error: RELEASEDIR is not set"
-       @false
 .endif
 
 IMGBASE=       ${LIVEIMGBASE}
@@ -34,7 +33,7 @@
 # should be defined elsewhere? 
 MKDIR?=                mkdir -p
 
-live_image: ${IMGBASE}.img.gz
+live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
        ${MKDIR} ${LIVEIMG_RELEASEDIR}
        ${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR}
        # note ${MAKESUM} will be calculated in src/etc/Makefile



Home | Main Index | Thread Index | Old Index