Source-Changes-HG archive

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

[src/trunk]: src/distrib Makefile.mdset:



details:   https://anonhg.NetBSD.org/src/rev/dfd84e11093f
branches:  trunk
changeset: 525504:dfd84e11093f
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Apr 12 13:39:43 2002 +0000

description:
Makefile.mdset:
        replace
                TARGETS = KERNEL IMAGE [...]
        with
                MDTARGETS = KERNEL IMAGE FILENAME [...]
        If FILENAME is "-", use "netbsd.${KERNEL}" as the target filename

The rest:
        Update for new MDTARGETS syntax.  In some cases, the kernel
        name from the "old" method will be used to override the default.

diffstat:

 distrib/acorn32/kernels/Makefile                 |   4 +-
 distrib/alpha/instkernel/instkernel/Makefile     |   4 +-
 distrib/cats/instkernel/Makefile                 |  10 ++--
 distrib/common/Makefile.mdset                    |  47 ++++++++++++++---------
 distrib/hp300/instkernel/Makefile                |   4 +-
 distrib/hpcmips/Makefile                         |   6 +-
 distrib/i386/floppies/kernel-ramdisk/Makefile    |  12 +++---
 distrib/i386/floppies/kernel-rescue/Makefile     |   6 +-
 distrib/mac68k/instkernel/instkernel/Makefile    |   6 +-
 distrib/macppc/floppies/md-kernel/Makefile       |   6 +-
 distrib/mvme68k/instkernel/Makefile              |   4 +-
 distrib/news68k/floppies/ramdisk-kernel/Makefile |   4 +-
 distrib/playstation2/Makefile                    |   4 +-
 distrib/prep/floppies/kernel-ramdisk/Makefile    |   4 +-
 distrib/sandpoint/floppies/md-kernel/Makefile    |   4 +-
 distrib/shark/instkernel/instkernel/Makefile     |   4 +-
 distrib/vax/ramdisk-kernel/Makefile              |   4 +-
 17 files changed, 72 insertions(+), 61 deletions(-)

diffs (truncated from 372 to 300 lines):

diff -r 16cae73ba58c -r dfd84e11093f distrib/acorn32/kernels/Makefile
--- a/distrib/acorn32/kernels/Makefile  Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/acorn32/kernels/Makefile  Fri Apr 12 13:39:43 2002 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.11 2002/04/12 05:34:01 lukem Exp $
+#      $NetBSD: Makefile,v 1.12 2002/04/12 13:39:43 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       INSTALL ${RAMDISK}
+MDSETTARGETS=  INSTALL ${RAMDISK} -
 
 MDSETDIR=      binary/kernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/alpha/instkernel/instkernel/Makefile
--- a/distrib/alpha/instkernel/instkernel/Makefile      Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/alpha/instkernel/instkernel/Makefile      Fri Apr 12 13:39:43 2002 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.21 2002/04/12 05:33:58 lukem Exp $
+#      $NetBSD: Makefile,v 1.22 2002/04/12 13:39:44 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       INSTALL ${RAMDISK}
+MDSETTARGETS=  INSTALL ${RAMDISK} -
 
 MDSETDIR=      binary/kernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/cats/instkernel/Makefile
--- a/distrib/cats/instkernel/Makefile  Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/cats/instkernel/Makefile  Fri Apr 12 13:39:43 2002 +0000
@@ -1,15 +1,15 @@
-#      $NetBSD: Makefile,v 1.3 2002/04/12 05:33:59 lukem Exp $
+#      $NetBSD: Makefile,v 1.4 2002/04/12 13:39:45 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       INSTALL ${RAMDISK}
+MDSETTARGETS=  INSTALL ${RAMDISK} netbsd.aout-INSTALL
 
-netbsd.INSTALL.post=   OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
-                           ${KERNSRCDIR}/arch/arm/conf/elf2aout.sh \
-                           netbsd.tmp netbsd.tmp
+netbsd.aout-INSTALL.post=      \
+       OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
+           ${KERNSRCDIR}/arch/arm/conf/elf2aout.sh netbsd.tmp netbsd.tmp
 
 MDSETDIR=      binary/kernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/common/Makefile.mdset
--- a/distrib/common/Makefile.mdset     Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/common/Makefile.mdset     Fri Apr 12 13:39:43 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.mdset,v 1.3 2002/04/12 05:50:19 lukem Exp $
+#      $NetBSD: Makefile.mdset,v 1.4 2002/04/12 13:39:45 lukem Exp $
 #
 # Makefile snippet to ${MDSETIMAGE} file system images into kernels
 #
@@ -6,36 +6,47 @@
 #
 # Required variables:
 #      _SRC_TOP_       Top level of src tree (set by <bsd.own.mk>)
-#      TARGETS         List of images to ${MDSETIMAGE} into kernels:
-#                              KERNEL  IMAGE
+#      MDSETTARGETS    List of images to ${MDSETIMAGE} into kernels:
+#                              KERNEL  IMAGE   FILENAME
+#                      The kernel ${KERNOBJDIR}/${KERNEL}/netbsd is
+#                      ${MDSETIMAGE} with ${IMAGE}, ${STRIP}ped,
+#                      and gzipped into ${FILENAME}.gz.
+#                      If FILENAME is "-", use "netbsd.${KERNEL}"
 #
 # Optional variables:
 #      MDSETDIR                where to install kernels with "release" target
-#      netbsd.${KERNEL}.post   run after ${STRIP}; kernel is netbsd.tmp
+#      ${FILENAME}.post        run after ${STRIP}; kernel is netbsd.tmp
 #
 # Variables modified by this:
-#      KERNELS         List of kernel .gz files to build
-#      KERNELSYMS      List of kernel .symbol files to build
+#      KERNELS                 List of kernel .gz files to build
+#      KERNELSYMS              List of kernel .symbol files to build
+#      _KERNEL.${KERNEL}       Target filename for ${KERNEL}
 #
 
 .include <bsd.kernobj.mk>
 
-.for _KERNEL _IMAGE in ${TARGETS}                      # {
+.for _K _I _F in ${MDSETTARGETS}       # {
+_FREAL:=${_F}                  # work around obscure issue in make(1)
+.if ${_FREAL} == "-"
+_KERNEL.${_K}:=        netbsd.${_K}
+.else
+_KERNEL.${_K}:=        ${_F}
+.endif
 
-KERNELS+=      netbsd.${_KERNEL}.gz
-KERNELSYMS+=   netbsd.${_KERNEL}.symbols.gz
+KERNELS+=      ${_KERNEL.${_K}}.gz
+KERNELSYMS+=   ${_KERNEL.${_K}}.symbols.gz
 
-netbsd.${_KERNEL}.gz: .NOTMAIN ${KERNOBJDIR}/${_KERNEL}/netbsd ${_IMAGE}
-       @echo "Populating ${_KERNEL} with ${_IMAGE}"
-       rm -f netbsd.tmp netbsd.tmp.gz
-       cp ${KERNOBJDIR}/${_KERNEL}/netbsd netbsd.tmp
-       ${MDSETIMAGE} -v netbsd.tmp ${_IMAGE}
-       ${NM} netbsd.tmp | gzip -9 > netbsd.${_KERNEL}.symbols.gz
+${_KERNEL.${_K}}.gz: .NOTMAIN ${KERNOBJDIR}/${_K}/netbsd ${_I}
+       @echo "Populating ${_K} with ${_I} into ${.TARGET}"
+       rm -f netbsd.tmp ${_KERNEL.${_K}}.symbols.gz
+       cp ${KERNOBJDIR}/${_K}/netbsd netbsd.tmp
+       ${MDSETIMAGE} -v netbsd.tmp ${_I}
+       ${NM} netbsd.tmp | gzip -9 > ${_KERNEL.${_K}}.symbols.gz
        ${STRIP} netbsd.tmp
-.if defined(netbsd.${_KERNEL}.post)
-       ${netbsd.${_KERNEL}.post}
+.if defined(${_KERNEL.${_K}}.post)
+       ${${_KERNEL.${_K}}.post}
 .endif
-       gzip -9 netbsd.tmp
+       gzip -9f netbsd.tmp
        mv netbsd.tmp.gz ${.TARGET}
 
 .endfor                                                        # }
diff -r 16cae73ba58c -r dfd84e11093f distrib/hp300/instkernel/Makefile
--- a/distrib/hp300/instkernel/Makefile Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/hp300/instkernel/Makefile Fri Apr 12 13:39:43 2002 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.7 2002/04/12 05:33:59 lukem Exp $
+#      $NetBSD: Makefile,v 1.8 2002/04/12 13:39:45 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       RAMDISK ${RAMDISK}
+MDSETTARGETS=  RAMDISK ${RAMDISK} -
 
 MDSETDIR=      binary/kernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/hpcmips/Makefile
--- a/distrib/hpcmips/Makefile  Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/hpcmips/Makefile  Fri Apr 12 13:39:43 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.15 2002/04/12 05:33:59 lukem Exp $
+#      $NetBSD: Makefile,v 1.16 2002/04/12 13:39:45 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
@@ -7,8 +7,8 @@
 
 MINIROOTOBJ!=  cd ${.CURDIR}/../miniroot && ${PRINTOBJDIR}
 MINIROOT=      ${MINIROOTOBJ}/miniroot.fs
-TARGETS=       RAMDISK         ${MINIROOT}     \
-               INSTALL_TX3912  ${MINIROOT}
+MDSETTARGETS=  RAMDISK         ${MINIROOT}     netbsd          \
+               INSTALL_TX3912  ${MINIROOT}     netbsd.TX3912
 
 ITARGET=       ${RELEASEDIR}/installation
 PBSDBOOTDIR=   ${KERNSRCDIR}/arch/${MACHINE}/stand/pbsdboot
diff -r 16cae73ba58c -r dfd84e11093f distrib/i386/floppies/kernel-ramdisk/Makefile
--- a/distrib/i386/floppies/kernel-ramdisk/Makefile     Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/i386/floppies/kernel-ramdisk/Makefile     Fri Apr 12 13:39:43 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.18 2002/04/12 05:33:59 lukem Exp $
+#      $NetBSD: Makefile,v 1.19 2002/04/12 13:39:46 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
@@ -14,11 +14,11 @@
 ${V}=          ${${V}DIR}/${F}.fs
 .endfor
 
-TARGETS=       INSTALL         ${RAMDISK_B}    \
-               INSTALL_LAPTOP  ${RAMDISK_B}    \
-               INSTALL_SMALL   ${RAMDISK_S}    \
-               INSTALL_TINY    ${RAMDISK_T}    \
-               INSTALL_PS2     ${RAMDISK_S}
+MDSETTARGETS=  INSTALL         ${RAMDISK_B}    -       \
+               INSTALL_LAPTOP  ${RAMDISK_B}    -       \
+               INSTALL_SMALL   ${RAMDISK_S}    -       \
+               INSTALL_TINY    ${RAMDISK_T}    -       \
+               INSTALL_PS2     ${RAMDISK_S}    -
 
 MDSETDIR=      binary/kernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/i386/floppies/kernel-rescue/Makefile
--- a/distrib/i386/floppies/kernel-rescue/Makefile      Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/i386/floppies/kernel-rescue/Makefile      Fri Apr 12 13:39:43 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.11 2002/04/12 05:33:59 lukem Exp $
+#      $NetBSD: Makefile,v 1.12 2002/04/12 13:39:46 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
@@ -13,8 +13,8 @@
 ${V}=          ${${V}DIR}/${F}.fs
 .endfor
 
-TARGETS=       INSTALL_SMALL   ${RAMDISK_S}    \
-               INSTALL_TINY    ${RAMDISK_T}
+MDSETTARGETS=  INSTALL_SMALL   ${RAMDISK_S}    -       \
+               INSTALL_TINY    ${RAMDISK_T}    -
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/mac68k/instkernel/instkernel/Makefile
--- a/distrib/mac68k/instkernel/instkernel/Makefile     Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/mac68k/instkernel/instkernel/Makefile     Fri Apr 12 13:39:43 2002 +0000
@@ -1,12 +1,12 @@
-#      $NetBSD: Makefile,v 1.12 2002/04/12 05:34:00 lukem Exp $
+#      $NetBSD: Makefile,v 1.13 2002/04/12 13:39:47 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       INSTALL         ${RAMDISK}      \
-               INSTALLSBC      ${RAMDISK}
+MDSETTARGETS=  INSTALL         ${RAMDISK}      netbsd-INSTALL          \
+               INSTALLSBC      ${RAMDISK}      netbsd-INSTALLSBC
 
 MDSETDIR=      installation/instkernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/macppc/floppies/md-kernel/Makefile
--- a/distrib/macppc/floppies/md-kernel/Makefile        Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/macppc/floppies/md-kernel/Makefile        Fri Apr 12 13:39:43 2002 +0000
@@ -1,12 +1,12 @@
-#      $NetBSD: Makefile,v 1.7 2002/04/12 05:34:00 lukem Exp $
+#      $NetBSD: Makefile,v 1.8 2002/04/12 13:39:47 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       INSTALL         ${RAMDISK}      \
-               GENERIC_MD      ${RAMDISK}
+MDSETTARGETS=  INSTALL         ${RAMDISK}      -       \
+               GENERIC_MD      ${RAMDISK}      -
 
 MDSETDIR=      binary/kernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/mvme68k/instkernel/Makefile
--- a/distrib/mvme68k/instkernel/Makefile       Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/mvme68k/instkernel/Makefile       Fri Apr 12 13:39:43 2002 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.4 2002/04/12 05:34:00 lukem Exp $
+#      $NetBSD: Makefile,v 1.5 2002/04/12 13:39:47 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       RAMDISK ${RAMDISK}
+MDSETTARGETS=  RAMDISK ${RAMDISK} -
 
 MDSETDIR=      installation/tapeimage
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/news68k/floppies/ramdisk-kernel/Makefile
--- a/distrib/news68k/floppies/ramdisk-kernel/Makefile  Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/news68k/floppies/ramdisk-kernel/Makefile  Fri Apr 12 13:39:43 2002 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.7 2002/04/12 05:34:00 lukem Exp $
+#      $NetBSD: Makefile,v 1.8 2002/04/12 13:39:47 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-TARGETS=       INSTALL ${RAMDISK}
+MDSETTARGETS=  INSTALL ${RAMDISK} netbsd
 
 MDSETDIR=      binary/kernel
 
diff -r 16cae73ba58c -r dfd84e11093f distrib/playstation2/Makefile
--- a/distrib/playstation2/Makefile     Fri Apr 12 13:33:42 2002 +0000
+++ b/distrib/playstation2/Makefile     Fri Apr 12 13:39:43 2002 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: Makefile,v 1.7 2002/04/12 05:34:01 lukem Exp $
+#      $NetBSD: Makefile,v 1.8 2002/04/12 13:39:48 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
 MINIROOTDIR!=  cd ${.CURDIR}/../miniroot && ${PRINTOBJDIR}
 MINIROOT=      ${MINIROOTDIR}/ramdisk.fs
-TARGETS=       RAMDISK ${MINIROOT}



Home | Main Index | Thread Index | Old Index