Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/common add multiple-include protection.
details: https://anonhg.NetBSD.org/src/rev/859c819eea5a
branches: trunk
changeset: 544091:859c819eea5a
user: lukem <lukem%NetBSD.org@localhost>
date: Tue Mar 11 07:18:38 2003 +0000
description:
add multiple-include protection.
clean up some comments.
diffstat:
distrib/common/Makefile.crunch | 11 ++++++++---
distrib/common/Makefile.distrib | 14 +++++++++++---
distrib/common/Makefile.image | 11 ++++++++---
distrib/common/Makefile.makedev | 11 ++++++++---
distrib/common/Makefile.mdset | 8 +++++++-
distrib/common/Makefile.parselist | 9 +++++----
distrib/common/Makefile.tarfloppy | 13 ++++++++-----
7 files changed, 55 insertions(+), 22 deletions(-)
diffs (231 lines):
diff -r ed528bd1fd0e -r 859c819eea5a distrib/common/Makefile.crunch
--- a/distrib/common/Makefile.crunch Tue Mar 11 05:14:58 2003 +0000
+++ b/distrib/common/Makefile.crunch Tue Mar 11 07:18:38 2003 +0000
@@ -1,9 +1,7 @@
-# $NetBSD: Makefile.crunch,v 1.11 2002/10/17 02:05:36 lukem Exp $
+# $NetBSD: Makefile.crunch,v 1.12 2003/03/11 07:18:38 lukem Exp $
#
# Makefile snippet to build a crunchgen(1)ed binary from the provided lists
#
-
-#
# Required variables:
# NETBSDSRCDIR top level of src tree (set by <bsd.own.mk>)
# CRUNCHBIN name of crunchgen(1)ed binary
@@ -23,6 +21,10 @@
# CRUNCHENV may get SMALLPROG=1 or SMALLPROG_INET6=1 added
#
+.if !defined(_MAKEFILE_CRUNCH_)
+_MAKEFILE_CRUNCH_=1
+
+
SMALLPROG?= 1
SMALLPROG_INET6?= 0
.if ${SMALLPROG} # {
@@ -58,3 +60,6 @@
${MAKE} -j 1 -f ${CRUNCHBIN}.mk clean; \
fi
rm -f ${CRUNCHBIN}.mk
+
+
+.endif # _MAKEFILE_CRUNCH_
diff -r ed528bd1fd0e -r 859c819eea5a distrib/common/Makefile.distrib
--- a/distrib/common/Makefile.distrib Tue Mar 11 05:14:58 2003 +0000
+++ b/distrib/common/Makefile.distrib Tue Mar 11 07:18:38 2003 +0000
@@ -1,20 +1,28 @@
-# $NetBSD: Makefile.distrib,v 1.1 2002/05/02 18:02:30 lukem Exp $
+# $NetBSD: Makefile.distrib,v 1.2 2003/03/11 07:18:38 lukem Exp $
#
# Makefile snippet to setup various make variables variables used in distrib/:
-# variables:
+#
+# Variables defined:
# DISTRIBDIR Top level of distrib
# DISTRIBREV NetBSD version without dots, as in "15ZD"
# DISTRIBVER NetBSD version with dots, as in "1.5ZD"
#
-# commands:
+# Commands defined:
# MAKESUMS runs sets/makesums with the appropriate environment
# RELEASE_INSTALL installs release binaries
#
#
+.if !defined(_MAKEFILE_DISTRIB_)
+_MAKEFILE_DISTRIB_=1
+
+
DISTRIBDIR= ${NETBSDSRCDIR}/distrib
DISTRIBREV!= sh ${NETBSDSRCDIR}/sys/conf/osrelease.sh -s
DISTRIBVER!= sh ${NETBSDSRCDIR}/sys/conf/osrelease.sh
MAKESUMS= CKSUM=${CKSUM:Q} sh ${DISTRIBDIR}/sets/makesums
RELEASE_INSTALL=${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${NONBINMODE}
+
+
+.endif # _MAKEFILE_DISTRIB_
diff -r ed528bd1fd0e -r 859c819eea5a distrib/common/Makefile.image
--- a/distrib/common/Makefile.image Tue Mar 11 05:14:58 2003 +0000
+++ b/distrib/common/Makefile.image Tue Mar 11 07:18:38 2003 +0000
@@ -1,10 +1,8 @@
-# $NetBSD: Makefile.image,v 1.19 2003/01/03 15:34:32 lukem Exp $
+# $NetBSD: Makefile.image,v 1.20 2003/03/11 07:18:38 lukem Exp $
#
# Makefile snippet to build a tree from the provided lists,
# and make an ffs file system image from that tree
#
-
-#
# Required variables:
# NETBSDSRCDIR top level of src tree (set by <bsd.own.mk>)
# CRUNCHBIN name of crunchgen(1)ed binary
@@ -28,6 +26,10 @@
# IMAGETAR_RELEASEDIR where to install ${IMAGETAR}
#
+.if !defined(_MAKEFILE_IMAGE_)
+_MAKEFILE_IMAGE_=1
+
+
WORKDIR?= work
WORKSPEC?= work.spec
WORKBUILT?= work.built
@@ -117,3 +119,6 @@
.endif
.endif # ! defined(IMAGETAR) # }
+
+
+.endif # _MAKEFILE_IMAGE_
diff -r ed528bd1fd0e -r 859c819eea5a distrib/common/Makefile.makedev
--- a/distrib/common/Makefile.makedev Tue Mar 11 05:14:58 2003 +0000
+++ b/distrib/common/Makefile.makedev Tue Mar 11 07:18:38 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.makedev,v 1.4 2003/03/10 23:42:45 lukem Exp $
+# $NetBSD: Makefile.makedev,v 1.5 2003/03/11 07:18:38 lukem Exp $
#
# Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
# (if set), otherwise copy etc.${MACHINE}/MAKEDEV to ./dev
@@ -6,8 +6,6 @@
# If this is to be used with Makefile.image, then this file should be
# .include-d first.
#
-
-#
# Required variables:
# NETBSDSRCDIR top level of src tree (set by <bsd.own.mk>)
# MACHINE machine name (set externally by build framework)
@@ -19,6 +17,10 @@
# MTREECONF may get "devices.spec" added to it
#
+.if !defined(_MAKEFILE_MAKEDEV_)
+_MAKEFILE_MAKEDEV_=1
+
+
MAKEDEVSPEC?= devices.spec
CLEANFILES+= ${MAKEDEVSPEC} ${MAKEDEVSPEC}.tmp
@@ -56,3 +58,6 @@
${MAKEDEVSPEC}: .PHONY
.endif # ! MAKEDEVTARGETS
+
+
+.endif # _MAKEFILE_MAKEDEV_
diff -r ed528bd1fd0e -r 859c819eea5a distrib/common/Makefile.mdset
--- a/distrib/common/Makefile.mdset Tue Mar 11 05:14:58 2003 +0000
+++ b/distrib/common/Makefile.mdset Tue Mar 11 07:18:38 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.mdset,v 1.20 2003/03/11 05:14:58 lukem Exp $
+# $NetBSD: Makefile.mdset,v 1.21 2003/03/11 07:18:38 lukem Exp $
#
# Makefile snippet to ${MDSETIMAGE} file system images into kernels
#
@@ -49,6 +49,9 @@
# KERNELSYMS List of kernel .symbol.gz files to build
#
+.if !defined(_MAKEFILE_MDSET_)
+_MAKEFILE_MDSET_=1
+
.include <bsd.kernobj.mk>
.for _K _I _F in ${MDSETTARGETS} # {
@@ -129,3 +132,6 @@
${RELEASE_INSTALL} ${KERNELS} ${KERNELSYMS} \
${RELEASEDIR}/${MACHINE}/${MDSET_RELEASEDIR}
.endif
+
+
+.endif # _MAKEFILE_MDSET_
diff -r ed528bd1fd0e -r 859c819eea5a distrib/common/Makefile.parselist
--- a/distrib/common/Makefile.parselist Tue Mar 11 05:14:58 2003 +0000
+++ b/distrib/common/Makefile.parselist Tue Mar 11 07:18:38 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.parselist,v 1.2 2002/04/26 15:50:27 lukem Exp $
+# $NetBSD: Makefile.parselist,v 1.3 2003/03/11 07:18:38 lukem Exp $
#
# Makefile snippet to setup parselist.awk related variables:
# PARSELISTENV environment variables to pass to parselist.awk
@@ -7,8 +7,8 @@
# PARSELIST run ${PARSELISTENV} awk -f ${PARSELISTDEP}
#
-.if !defined(_PARSELIST_MK_)
-_PARSELIST_MK_=1
+.if !defined(_MAKEFILE_PARSELIST_)
+_MAKEFILE_PARSELIST_=1
PARSELISTENV+= NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
@@ -23,4 +23,5 @@
PARSELISTDEP= ${DISTRIBDIR}/common/parselist.awk
PARSELIST= ${PARSELISTENV} awk -f ${PARSELISTDEP}
-.endif # _PARSELIST_MK_
+
+.endif # _MAKEFILE_PARSELIST_
diff -r ed528bd1fd0e -r 859c819eea5a distrib/common/Makefile.tarfloppy
--- a/distrib/common/Makefile.tarfloppy Tue Mar 11 05:14:58 2003 +0000
+++ b/distrib/common/Makefile.tarfloppy Tue Mar 11 07:18:38 2003 +0000
@@ -1,10 +1,8 @@
-# $NetBSD: Makefile.tarfloppy,v 1.7 2003/01/03 15:34:32 lukem Exp $
+# $NetBSD: Makefile.tarfloppy,v 1.8 2003/03/11 07:18:38 lukem Exp $
#
# Makefile snippet to create a set of ustar floppies.
# Each floppy has an 8KB header, followed by part or all of the ustar archive.
#
-
-#
# Required variables:
# NETBSDSRCDIR Top level of src tree (set by <bsd.own.mk>)
# FLOPPYBASE Basename of floppies. Floppy number ${n} will
@@ -13,8 +11,6 @@
# FLOPPYFILES Files to write to floppy.
# Usually set to "boot ${FLOPPYMETAFILE} netbsd"
#
-
-#
# Optional variables:
# FLOPPY_BOOT Bootstrap to use as "boot".
# FLOPPY_BOOT_STRIP If yes, strip "boot" before use.
@@ -31,6 +27,10 @@
# FLOPPY_RELEASEDIR Where to install release floppies.
#
+.if !defined(_MAKEFILE_TARFLOPPY_)
+_MAKEFILE_TARFLOPPY_=1
+
+
.if defined(FLOPPY_BOOT) # {
CLEANFILES+= boot
boot: ${FLOPPY_BOOT}
@@ -83,3 +83,6 @@
${RELEASEDIR}/${MACHINE}/${FLOPPY_RELEASEDIR}/${FLOPPYBASE}${FLOPPYSUFFIX}; \
fi
.endif
+
+
+.endif # _MAKEFILE_TARFLOPPY_
Home |
Main Index |
Thread Index |
Old Index