From cb0f15741e7b2c3a76968698344f9b1000bfd05b Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 11 Aug 2003 00:25:17 +0000 Subject: [PATCH] Add the 'wmake' script to /usr/bin and wmake support to Makefile.inc1. This script allows you to build any element within /usr/src using a buildworld environment and is extremely useful for debugging or development work. Instead of having to restart the buildworld (even with -DNOCLEAN -DNOTOOLS it can take a while) this script can be used to immediately build whatever piece of the world you are working on. --- Makefile.inc1 | 9 ++++++++- usr.bin/Makefile | 3 ++- usr.bin/wmake/Makefile | 5 +++++ usr.bin/wmake/wmake.sh | 20 ++++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 usr.bin/wmake/Makefile create mode 100644 usr.bin/wmake/wmake.sh diff --git a/Makefile.inc1 b/Makefile.inc1 index a01e242487..7dd343e91f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $ -# $DragonFly: src/Makefile.inc1,v 1.6 2003/08/08 19:22:45 dillon Exp $ +# $DragonFly: src/Makefile.inc1,v 1.7 2003/08/11 00:25:14 dillon Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -757,4 +757,11 @@ ${entry}.${__target}__D: .PHONY par-${__target}: ${SUBDIR:S/$/.${__target}__D/} .endfor +# The wmake target is used by /usr/bin/wmake to run make in a +# world build environment. +# +wmake: + @echo '${WMAKEENV} ${MAKE} ${WMAKE_ARGS}' + .include + diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 05db53e303..109204cfea 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,6 +1,6 @@ # From: @(#)Makefile 8.3 (Berkeley) 1/7/94 # $FreeBSD: src/usr.bin/Makefile,v 1.144.2.17 2003/01/04 17:17:07 obrien Exp $ -# $DragonFly: src/usr.bin/Makefile,v 1.5 2003/08/05 07:45:43 asmodai Exp $ +# $DragonFly: src/usr.bin/Makefile,v 1.6 2003/08/11 00:25:15 dillon Exp $ # XXX MISSING: deroff diction graph learn plot # spell spline struct xsend @@ -195,6 +195,7 @@ SUBDIR= alias \ who \ whois \ window \ + wmake \ write \ xargs \ xinstall \ diff --git a/usr.bin/wmake/Makefile b/usr.bin/wmake/Makefile new file mode 100644 index 0000000000..8ec79996d9 --- /dev/null +++ b/usr.bin/wmake/Makefile @@ -0,0 +1,5 @@ +# $DragonFly: src/usr.bin/wmake/Makefile,v 1.1 2003/08/11 00:25:17 dillon Exp $ + +SCRIPTS=wmake.sh + +.include diff --git a/usr.bin/wmake/wmake.sh b/usr.bin/wmake/wmake.sh new file mode 100644 index 0000000000..74ec5db6d7 --- /dev/null +++ b/usr.bin/wmake/wmake.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# $DragonFly: src/usr.bin/wmake/wmake.sh,v 1.1 2003/08/11 00:25:17 dillon Exp $ +# +# This script was written by Matt dillon and has been placed in the +# public domain. + +path=$PWD +while [ "$path" != "" ]; do + if [ -f $path/Makefile.inc1 ]; then + break + fi + path=${path%/*} +done +if [ "$path" = "" ]; then + echo "Unable to locate Makefile.inc through parent dirs" +fi + +eval `cd $path; make WMAKE_ARGS="$@" -f Makefile.inc1 wmake` + -- 2.41.0