[Midnightbsd-cvs] src: /src: add showconfig target.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Oct 5 17:14:02 EDT 2008
Log Message:
-----------
add showconfig target.
cleanup target option for kernel builds.
adjust list of targets.
Modified Files:
--------------
src:
Makefile (r1.7 -> r1.8)
Makefile.inc1 (r1.10 -> r1.11)
-------------- next part --------------
Index: Makefile.inc1
===================================================================
RCS file: /home/cvs/src/Makefile.inc1,v
retrieving revision 1.10
retrieving revision 1.11
diff -L Makefile.inc1 -L Makefile.inc1 -u -r1.10 -r1.11
--- Makefile.inc1
+++ Makefile.inc1
@@ -1157,3 +1157,8 @@
.endif
+#
+# showconfig - show build configuration.
+#
+showconfig:
+ @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort
Index: Makefile
===================================================================
RCS file: /home/cvs/src/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -L Makefile -L Makefile -u -r1.7 -r1.8
--- Makefile
+++ Makefile
@@ -9,17 +9,23 @@
# buildworld - Rebuild *everything*, including glue to help do
# upgrades.
# installworld - Install everything built by "buildworld".
-# world - buildworld + installworld.
+# world - buildworld + installworld, no kernel.
# buildkernel - Rebuild the kernel and the kernel-modules.
# installkernel - Install the kernel and the kernel-modules.
# installkernel.debug
# reinstallkernel - Reinstall the kernel and the kernel-modules.
# reinstallkernel.debug
# kernel - buildkernel + installkernel.
+# doxygen - Build API documentation of the kernel, needs doxygen.
# update - Convenient way to update your source tree (cvs).
-# check-old - Print a list of old files/directories in the system.
-# delete-old - Delete obsolete files and directories interactively.
-# delete-old-libs - Delete obsolete libraries interactively.
+# check-old - List obsolete directories/files/libraries.
+# check-old-dirs - List obsolete directories.
+# check-old-files - List obsolete files.
+# check-old-libs - List obsolete libraries.
+# delete-old - Delete obsolete directories/files/libraries.
+# delete-old-dirs - Delete obsolete directories.
+# delete-old-files - Delete obsolete files.
+# delete-old-libs - Delete obsolete libraries.
#
# This makefile is simple by design. The MidnightBSD make automatically reads
# the /usr/share/mk/sys.mk unless the -m argument is specified on the
@@ -37,7 +43,8 @@
# system, the simple instructions are:
#
# 1. `cd /usr/src' (or to the directory containing your source tree).
-# 2. `make world'
+# 2. Define `HISTORICAL_MAKE_WORLD' variable (see README).
+# 3. `make world'
#
# For individuals wanting to upgrade their sources (even if only a
# delta of a few days):
@@ -46,6 +53,7 @@
# 2. `make buildworld'
# 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
# 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
+# [steps 3. & 4. can be combined by using the "kernel" target]
# 5. `reboot' (in single user mode: boot -s from the loader prompt).
# 6. `mergemaster -p'
# 7. `make installworld'
@@ -56,8 +64,8 @@
#
# See src/UPDATING `COMMON ITEMS' for more complete information.
#
-# If TARGET_ARCH=arch (e.g. ia64, sparc64, ...) is specified you can
-# cross build world for other architectures using the buildworld target,
+# If TARGET=machine (e.g. amd64, sparc64, ...) is specified you can
+# cross build world for other machine types using the buildworld target,
# and once the world is built you can cross build a kernel using the
# buildkernel target.
#
@@ -68,16 +76,19 @@
# developer convenience only. They are intentionally not documented and
# completely subject to change without notice.
#
-TGTS= all all-man buildenv buildkernel buildworld check-old checkdpadd \
- clean cleandepend cleandir delete-old delete-old-libs depend \
- distribute distributeworld distrib-dirs distribution everything \
- hierarchy install installcheck installkernel installkernel.debug\
- reinstallkernel reinstallkernel.debug installworld \
- kernel-toolchain libraries lint maninstall \
- obj objlink regress rerelease tags toolchain update \
+TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
+ check-old check-old-dirs check-old-files check-old-libs \
+ checkdpadd clean cleandepend cleandir \
+ delete-old delete-old-dirs delete-old-files delete-old-libs \
+ depend distribute distributeworld distrib-dirs distribution doxygen \
+ everything hierarchy install installcheck installkernel \
+ installkernel.debug reinstallkernel reinstallkernel.debug \
+ installworld kernel-toolchain libraries lint maninstall \
+ obj objlink regress rerelease showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend \
build32 distribute32 install32
+TGTS+= ${SUBDIR_TARGETS}
BITGTS= files includes
BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
@@ -137,14 +148,14 @@
.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
.if exists(${BW_CANONICALOBJDIR}/)
-rm -rf ${BW_CANONICALOBJDIR}/*
- chflags -R 0 ${BW_CANONICALOBJDIR}
+ -chflags -R 0 ${BW_CANONICALOBJDIR}
rm -rf ${BW_CANONICALOBJDIR}/*
.endif
# To be safe in this case, fall back to a 'make cleandir'
${_+_}@cd ${.CURDIR}; ${_MAKE} cleandir
.else
-rm -rf ${.OBJDIR}/*
- chflags -R 0 ${.OBJDIR}
+ -chflags -R 0 ${.OBJDIR}
rm -rf ${.OBJDIR}/*
.endif
@@ -166,7 +177,7 @@
# world
#
# Attempt to rebuild and reinstall everything. This target is not to be
-# used for upgrading an existing FreeBSD system, because the kernel is
+# used for upgrading an existing MidnightBSD system, because the kernel is
# not included. One can argue that this target doesn't build everything
# then.
#
@@ -197,15 +208,12 @@
@echo "--------------------------------------------------------------"
.else
world:
- @echo "WARNING: make world will overwrite your existing FreeBSD"
+ @echo "WARNING: make world will overwrite your existing MidnightBSD"
@echo "installation without also building and installing a new"
@echo "kernel. This can be dangerous. Please read the handbook,"
@echo "'Rebuilding world', for how to upgrade your system."
- @echo "Define DESTDIR to where you want to install FreeBSD,"
+ @echo "Define DESTDIR to where you want to install MidnightBSD,"
@echo "including /, to override this warning and proceed as usual."
- @echo "You may get the historical 'make world' behavior by defining"
- @echo "HISTORICAL_MAKE_WORLD. You should understand the implications"
- @echo "before doing this."
@echo ""
@echo "Bailing out now..."
@false
@@ -261,41 +269,39 @@
# existing system is.
#
.if make(universe)
+TARGETS?=amd64 i386 sparc64 sun4v
+
universe: universe_prologue
universe_prologue:
@echo "--------------------------------------------------------------"
@echo ">>> make universe started on ${STARTTIME}"
@echo "--------------------------------------------------------------"
-.for target in i386 i386:pc98 sparc64 ia64 amd64
-.for arch in ${target:C/:.*$//}
-.for mach in ${target:C/^.*://}
-KERNCONFS!= cd ${.CURDIR}/sys/${mach}/conf && \
+.for target in ${TARGETS}
+KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \
find [A-Z]*[A-Z] -type f -maxdepth 0 \
! -name DEFAULTS ! -name LINT
KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/}
-universe: universe_${mach}
-.ORDER: universe_prologue universe_${mach} universe_epilogue
-universe_${mach}:
- @echo ">> ${mach} started on `LC_ALL=C date`"
+universe: universe_${target}
+.ORDER: universe_prologue universe_${target} universe_epilogue
+universe_${target}:
+ @echo ">> ${target} started on `LC_ALL=C date`"
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildworld \
- TARGET_ARCH=${arch} TARGET=${mach} \
+ TARGET=${target} \
__MAKE_CONF=/dev/null \
- > _.${mach}.buildworld 2>&1
- @echo ">> ${mach} buildworld completed on `LC_ALL=C date`"
-.if exists(${.CURDIR}/sys/${mach}/conf/NOTES)
- -cd ${.CURDIR}/sys/${mach}/conf && ${MAKE} LINT \
- > ${.CURDIR}/_.${mach}.makeLINT 2>&1
+ > _.${target}.buildworld 2>&1
+ @echo ">> ${target} buildworld completed on `LC_ALL=C date`"
+.if exists(${.CURDIR}/sys/${target}/conf/NOTES)
+ -cd ${.CURDIR}/sys/${target}/conf && ${MAKE} LINT \
+ > ${.CURDIR}/_.${target}.makeLINT 2>&1
.endif
.for kernel in ${KERNCONFS}
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \
- TARGET_ARCH=${arch} TARGET=${mach} \
+ TARGET=${target} \
KERNCONF=${kernel} \
__MAKE_CONF=/dev/null \
- > _.${mach}.${kernel} 2>&1
-.endfor
- @echo ">> ${mach} completed on `LC_ALL=C date`"
-.endfor
+ > _.${target}.${kernel} 2>&1
.endfor
+ @echo ">> ${target} completed on `LC_ALL=C date`"
.endfor
universe: universe_epilogue
universe_epilogue:
More information about the Midnightbsd-cvs
mailing list