Source-Changes-HG archive

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

[src/trunk]: src/distrib - whitespace consistency cleanup



details:   https://anonhg.NetBSD.org/src/rev/78e56a7cc027
branches:  trunk
changeset: 526699:78e56a7cc027
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed May 08 21:44:53 2002 +0000

description:
- whitespace consistency cleanup
- build (mdset/nm/strip) into ${filename} as one rule, and move ${filename}.gz
  into separate rule
- rename MDSET.${filename}.nosymbols -> MDSET_NOSYMBOLS.${filename}
- rename MDSET.${filename}.post -> MDSET_POST.${filename}, and don't do
  suffix handling here
- rework suffix handling:
        - rename MDSET.${filename}.suffixes -> MDSET_SUFFIXES.${filename},
          and change from list of suffixes to list of "suffix cmdtobuildsuffix",
          where cmdtobuildsuffix is the name of the variable containing the
          command to build ${filename}.${suffix} (available as "${.TARGET}").
        - for each ${filename}.${suffix}, depend upon ${filename} and use
          ${cmdtobuildsuffix} to create the former.
        - add separate ${filename}.${suffix}.gz rule
- mipsco & pmax: rename "install.gz" to "netbsd-INSTALL.gz", for
  consistency and so the target to build the mdset kernel doesn't get
  confused with general "install" target

diffstat:

 distrib/acorn32/kernels/Makefile                 |   4 +-
 distrib/alpha/instkernel/instkernel/Makefile     |   4 +-
 distrib/arc/instkernel/Makefile                  |  17 ++---
 distrib/cats/instkernel/Makefile                 |  14 ++--
 distrib/common/Makefile.mdset                    |  77 ++++++++++++++---------
 distrib/evbarm/instkernel/instkernel/Makefile    |  15 ++--
 distrib/hp300/instkernel/Makefile                |   4 +-
 distrib/hpcmips/Makefile                         |   6 +-
 distrib/i386/floppies/kernel-ramdisk/Makefile    |  13 +--
 distrib/i386/floppies/kernel-rescue/Makefile     |   7 +-
 distrib/mac68k/instkernel/instkernel/Makefile    |   6 +-
 distrib/macppc/floppies/md-kernel/Makefile       |   6 +-
 distrib/mipsco/instkernel/Makefile               |  14 ++--
 distrib/mipsco/instkernel/list                   |   4 +-
 distrib/mvme68k/instkernel/Makefile              |   4 +-
 distrib/news68k/floppies/ramdisk-kernel/Makefile |   4 +-
 distrib/newsmips/floppies/instkernel/Makefile    |   4 +-
 distrib/playstation2/Makefile                    |   4 +-
 distrib/pmax/instkernel/Makefile                 |  16 ++--
 distrib/pmax/instkernel/list                     |   4 +-
 distrib/prep/floppies/kernel-ramdisk/Makefile    |   4 +-
 distrib/sandpoint/floppies/md-kernel/Makefile    |   4 +-
 distrib/shark/instkernel/instkernel/Makefile     |  13 ++-
 distrib/vax/ramdisk-kernel/Makefile              |   4 +-
 24 files changed, 133 insertions(+), 119 deletions(-)

diffs (truncated from 618 to 300 lines):

diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/acorn32/kernels/Makefile
--- a/distrib/acorn32/kernels/Makefile  Wed May 08 21:43:10 2002 +0000
+++ b/distrib/acorn32/kernels/Makefile  Wed May 08 21:44:53 2002 +0000
@@ -1,12 +1,12 @@
-#      $NetBSD: Makefile,v 1.14 2002/05/02 18:02:17 lukem Exp $
+#      $NetBSD: Makefile,v 1.15 2002/05/08 21:44:54 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-MDSETTARGETS=  INSTALL ${RAMDISK} -
 
+MDSETTARGETS=          INSTALL ${RAMDISK} -
 MDSET_RELEASEDIR=      installation/kernel
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/alpha/instkernel/instkernel/Makefile
--- a/distrib/alpha/instkernel/instkernel/Makefile      Wed May 08 21:43:10 2002 +0000
+++ b/distrib/alpha/instkernel/instkernel/Makefile      Wed May 08 21:44:53 2002 +0000
@@ -1,12 +1,12 @@
-#      $NetBSD: Makefile,v 1.24 2002/05/02 18:02:20 lukem Exp $
+#      $NetBSD: Makefile,v 1.25 2002/05/08 21:44:54 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-MDSETTARGETS=  INSTALL ${RAMDISK} netbsd
 
+MDSETTARGETS=          INSTALL ${RAMDISK} netbsd
 MDSET_RELEASEDIR=      installation/instkernel
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/arc/instkernel/Makefile
--- a/distrib/arc/instkernel/Makefile   Wed May 08 21:43:10 2002 +0000
+++ b/distrib/arc/instkernel/Makefile   Wed May 08 21:44:53 2002 +0000
@@ -1,20 +1,17 @@
-#      $NetBSD: Makefile,v 1.5 2002/05/03 15:22:57 lukem Exp $
+#      $NetBSD: Makefile,v 1.6 2002/05/08 21:44:54 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-MDSETTARGETS=  RAMDISK ${RAMDISK} -
+
+MDSETTARGETS=          RAMDISK ${RAMDISK} -
+MDSET_RELEASEDIR=      binary/kernel
 
-MDSET.-.suffixes=      ecoff
-MDSET.-.post=          OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
-                           ${OBJCOPY} -O ecoff-littlemips \
-                           -R .mdebug -R .ident \
-                           ${.TARGET:R} ${.TARGET:R}.ecoff && \
-                       gzip -9f ${.TARGET:R}.ecoff
-
-MDSET_RELEASEDIR=      binary/kernel
+MDSET_SUFFIXES.-=      ecoff create-ecoff
+create-ecoff=          ${OBJCOPY} -O ecoff-littlemips \
+                           -R .mdebug -R .ident ${.TARGET:R} ${.TARGET}
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
 
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/cats/instkernel/Makefile
--- a/distrib/cats/instkernel/Makefile  Wed May 08 21:43:10 2002 +0000
+++ b/distrib/cats/instkernel/Makefile  Wed May 08 21:44:53 2002 +0000
@@ -1,18 +1,18 @@
-#      $NetBSD: Makefile,v 1.8 2002/05/03 15:22:58 lukem Exp $
+#      $NetBSD: Makefile,v 1.9 2002/05/08 21:44:54 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-MDSETTARGETS=  INSTALL ${RAMDISK} netbsd.aout-INSTALL
+
+MDSETTARGETS=          INSTALL ${RAMDISK} netbsd.aout-INSTALL
+MDSET_RELEASEDIR=      binary/kernel
 
-MDSET.netbsd.aout-INSTALL.post=        \
-               OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
-                   ${KERNSRCDIR}/arch/arm/conf/elf2aout.sh \
-                   ${.TARGET:R} ${.TARGET:R}
+MDSET_POST.netbsd.aout-INSTALL=OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
+                           ${KERNSRCDIR}/arch/arm/conf/elf2aout.sh \
+                           ${.TARGET} ${.TARGET}
 
-MDSET_RELEASEDIR=      binary/kernel
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
 
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/common/Makefile.mdset
--- a/distrib/common/Makefile.mdset     Wed May 08 21:43:10 2002 +0000
+++ b/distrib/common/Makefile.mdset     Wed May 08 21:44:53 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.mdset,v 1.14 2002/05/07 03:34:17 lukem Exp $
+#      $NetBSD: Makefile.mdset,v 1.15 2002/05/08 21:44:55 lukem Exp $
 #
 # Makefile snippet to ${MDSETIMAGE} file system images into kernels
 #
@@ -21,25 +21,26 @@
 # Optional variables:
 #      MDSET_RELEASEDIR                Where to install release kernels.
 #
-#      MDSET.${FILENAME}.nosymbols     If defined, don't generate
+#      MDSET_NOSYMBOLS.${FILENAME}     If defined, don't generate
 #                                      ${FILENAME}.symbols.gz
 #
-#      MDSET.${FILENAME}.post          For each kernel named ${FILENAME},
+#      MDSET_POST.${FILENAME}          For each kernel named ${FILENAME},
 #                                      execute this after ${NM} / ${STRIP}.
-#                                      Kernel is available as "${.TARGET:R}"
-#                                      If MDSET.${FILENAME}.suffixes uses
-#                                      this to build extra kernels, the
-#                                      resultant file must be gzipped by this
-#                                      as "${.TARGET:R}.${suffix}.gz"
+#                                      Kernel is available as "${.TARGET}"
 #
-#      MDSET.${FILENAME}.suffixes      List of extra install kernel suffixes.
-#                                      The extra kernels are usually created
-#                                      by MDSET.${FILENAME}.post.
+#      MDSET_SUFFIXES.${FILENAME}      List of extra install kernel suffixes
+#                                      and build commands to create from
+#                                      ${FILENAME} after its created by
+#                                      ${MDSET} ; ${NM} ; ${STRIP}:
+#                                              SUFFIX  COMMANDVAR
+#                                      "${.TARGET}" is "${FILENAME}.${SUFFIX}"
+#                                      COMMANDVAR is the name of the variable
+#                                      containing the command to build
+#                                      ${.TARGET}.
 #
 # Variables modified by this:
 #      KERNELS                 List of kernel .gz files to build
 #      KERNELSYMS              List of kernel .symbol.gz files to build
-#      _KERNEL.${KERNEL}       Target filename for ${KERNEL}
 #
 
 .include <bsd.kernobj.mk>
@@ -53,33 +54,51 @@
 .endif
 
 KERNELS+=      ${_KERNEL.${_K}}.gz
-.for suf in ${MDSET.${_FILENAME}.suffixes}
-KERNELS+=      ${_KERNEL.${_K}}.${suf}.gz
-CLEANFILES+=   ${_KERNEL.${_K}}.${suf}
-.endfor
-.if !defined(MDSET.${_FILENAME}.nosymbols)
+
+.for _S _C in ${MDSET_SUFFIXES.${_FILENAME}}           # {
+KERNELS+=      ${_KERNEL.${_K}}.${_S}.gz
+CLEANFILES+=   ${_KERNEL.${_K}}.${_S}
+
+${_KERNEL.${_K}}.${_S}: ${_KERNEL.${_K}}
+.if defined(${_C})
+       ${${_C}}
+.else
+       @echo "No such variable \"${_C}\""
+       false
+.endif
+
+${_KERNEL.${_K}}.${_S}.gz: ${_KERNEL.${_K}}.${_S}
+       -rm -f ${.TARGET}
+       gzip -9c ${.ALLSRC} > ${.TARGET}
+
+.endfor                                                        # }
+
+.if !defined(MDSET_NOSYMBOLS.${_FILENAME})
 KERNELSYMS+=   ${_KERNEL.${_K}}.symbols.gz
 .endif
 
-.if defined(MDSET.${_FILENAME}.post)
-_POST.${_KERNEL.${_K}}:= ${MDSET.${_FILENAME}.post}
+.if defined(MDSET_POST.${_FILENAME})
+_POST.${_KERNEL.${_K}}:= ${MDSET_POST.${_FILENAME}}
 .endif
 
-${_KERNEL.${_K}}.gz: .NOTMAIN ${KERNOBJDIR}/${_K}/netbsd ${_I}
+${_KERNEL.${_K}}: .NOTMAIN ${KERNOBJDIR}/${_K}/netbsd ${_I}
        @echo "mdsetimage: ${KERNOBJDIR}/${_K}/netbsd"
        @echo "      with: ${_I}"
        @echo "      into: ${.TARGET}"
-       @rm -f ${.TARGET:R} ${.TARGET:R}.symbols.gz
-       @cp ${KERNOBJDIR}/${_K}/netbsd ${.TARGET:R}
-       ${MDSETIMAGE} -v ${.TARGET:R} ${_I}
-.if !defined(MDSET.${_FILENAME}.nosymbols)
-       ${NM} ${.TARGET:R} | gzip -9 > ${.TARGET:R}.symbols.gz
+       @rm -f ${.TARGET} ${.TARGET}.symbols.gz
+       @cp ${KERNOBJDIR}/${_K}/netbsd ${.TARGET}
+       ${MDSETIMAGE} -v ${.TARGET} ${_I}
+.if !defined(MDSET_NOSYMBOLS.${_FILENAME})
+       ${NM} ${.TARGET} | gzip -9 > ${.TARGET}.symbols.gz
 .endif
-       ${STRIP} ${.TARGET:R}
-.if defined(_POST.${.TARGET:R})
-       ${_POST.${.TARGET:R}}
+       ${STRIP} ${.TARGET}
+.if defined(MDSET_POST.${_FILENAME})
+       ${_POST.${.TARGET}}
 .endif
-       gzip -9f ${.TARGET:R}
+
+${_KERNEL.${_K}}.gz: ${_KERNEL.${_K}}
+       -rm -f ${.TARGET}
+       gzip -9c ${.ALLSRC} > ${.TARGET}
 
 CLEANFILES+=   ${_KERNEL.${_K}} 
 
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/evbarm/instkernel/instkernel/Makefile
--- a/distrib/evbarm/instkernel/instkernel/Makefile     Wed May 08 21:43:10 2002 +0000
+++ b/distrib/evbarm/instkernel/instkernel/Makefile     Wed May 08 21:44:53 2002 +0000
@@ -1,19 +1,18 @@
-#      $NetBSD: Makefile,v 1.6 2002/05/03 15:22:58 lukem Exp $
+#      $NetBSD: Makefile,v 1.7 2002/05/08 21:44:55 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-MDSETTARGETS=  TEAMASA_NPWR_INSTALL ${RAMDISK} -
+
+MDSETTARGETS=          TEAMASA_NPWR_INSTALL ${RAMDISK} -
+MDSET_RELEASEDIR=      installation/instkernel
 
-MDSET.-.suffixes= srec bin
-MDSET.-.post=  ${OBJCOPY} -O srec ${.TARGET:R} ${.TARGET:R}.srec && \
-               gzip -9f ${.TARGET:R}.srec ; \
-               ${OBJCOPY} -O binary ${.TARGET:R} ${.TARGET:R}.bin && \
-               gzip -9f ${.TARGET:R}.bin
+MDSET_SUFFIXES.-=      srec create-srec  bin create-bin
+create-srec=           ${OBJCOPY} -O srec ${.TARGET:R} ${.TARGET}
+create-bin=            ${OBJCOPY} -O binary ${.TARGET:R} ${.TARGET}
 
-MDSET_RELEASEDIR=      installation/instkernel
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
 
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/hp300/instkernel/Makefile
--- a/distrib/hp300/instkernel/Makefile Wed May 08 21:43:10 2002 +0000
+++ b/distrib/hp300/instkernel/Makefile Wed May 08 21:44:53 2002 +0000
@@ -1,12 +1,12 @@
-#      $NetBSD: Makefile,v 1.10 2002/05/02 18:02:34 lukem Exp $
+#      $NetBSD: Makefile,v 1.11 2002/05/08 21:44:55 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
 RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
-MDSETTARGETS=  RAMDISK ${RAMDISK} -
 
+MDSETTARGETS=          RAMDISK ${RAMDISK} -
 MDSET_RELEASEDIR=      binary/kernel
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/hpcmips/Makefile
--- a/distrib/hpcmips/Makefile  Wed May 08 21:43:10 2002 +0000
+++ b/distrib/hpcmips/Makefile  Wed May 08 21:44:53 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.20 2002/05/07 03:34:16 lukem Exp $
+#      $NetBSD: Makefile,v 1.21 2002/05/08 21:44:55 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -7,9 +7,9 @@
 
 MINIROOTOBJ!=  cd ${.CURDIR}/../miniroot && ${PRINTOBJDIR}
 MINIROOT=      ${MINIROOTOBJ}/miniroot.fs
-MDSETTARGETS=  RAMDISK         ${MINIROOT}     netbsd          \
-               INSTALL_TX3912  ${MINIROOT}     netbsd.TX3912
 
+MDSETTARGETS=          RAMDISK         ${MINIROOT}     netbsd          \
+                       INSTALL_TX3912  ${MINIROOT}     netbsd.TX3912
 MDSET_RELEASEDIR=      installation
 
 PBSDBOOTDIR=   ${KERNSRCDIR}/arch/${MACHINE}/stand/pbsdboot
diff -r 4b65290bf2c7 -r 78e56a7cc027 distrib/i386/floppies/kernel-ramdisk/Makefile
--- a/distrib/i386/floppies/kernel-ramdisk/Makefile     Wed May 08 21:43:10 2002 +0000
+++ b/distrib/i386/floppies/kernel-ramdisk/Makefile     Wed May 08 21:44:53 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.21 2002/05/02 18:02:37 lukem Exp $
+#      $NetBSD: Makefile,v 1.22 2002/05/08 21:44:56 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -14,12 +14,11 @@
 ${V}=          ${${V}DIR}/${F}.fs
 .endfor
 
-MDSETTARGETS=  INSTALL         ${RAMDISK_B}    -       \
-               INSTALL_LAPTOP  ${RAMDISK_B}    -       \
-               INSTALL_SMALL   ${RAMDISK_S}    -       \
-               INSTALL_TINY    ${RAMDISK_T}    -       \
-               INSTALL_PS2     ${RAMDISK_S}    -
-



Home | Main Index | Thread Index | Old Index