From owner-freebsd-hackers Thu Jun 20 16:25:58 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA25536 for hackers-outgoing; Thu, 20 Jun 1996 16:25:58 -0700 (PDT) Received: from linus.demon.co.uk (linus.demon.co.uk [158.152.10.220]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA25513 for ; Thu, 20 Jun 1996 16:25:37 -0700 (PDT) Received: (from mark@localhost) by linus.demon.co.uk (8.7.5/8.7.3) id AAA04239; Fri, 21 Jun 1996 00:20:52 +0100 (BST) Message-Id: <199606202320.AAA04239@linus.demon.co.uk> From: mark@linus.demon.co.uk (Mark Valentine) Date: Fri, 21 Jun 1996 00:20:51 +0100 In-Reply-To: "Jordan K. Hubbard"'s message of Jun 20, 7:26am X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: "Jordan K. Hubbard" , hackers@freebsd.org Subject: Re: What do people think of this change to /usr/src/Makefile? Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > From: "Jordan K. Hubbard" > Date: Thu 20 Jun, 1996 > Subject: What do people think of this change to /usr/src/Makefile? Why is this necessary, when the following solution already exists? #!/bin/sh /usr/bin/true cd /usr/src && make world cp /my/hacked/binary /usr/bin Also, your pre-world is really start-of-world and post-world is end-of-world; the @/usr/bin/true looks ugly and superfluous. Mark. > Problem: > Sites want to be able to do their own things before or after > (or both) a make world without having to modify the Makefile > since sup sites will simply see it spammed again. Let's say > that you want to copy a special version of some package > in for building, so you want a `before hook' for world, or > after a make world your system is hosed because you have some > specially hacked binaries that have been replaced, and so > you want an `after hook'. > > Proposed Solution: > The following changes allow you to define pre-build and/or > post-build targets in /etc/make.conf and the world rule will > run them automatically. If they're not defined, the behavior > is the same as it is now. > > Diffs: > > Index: Makefile > =================================================================== > RCS file: /home/ncvs/src/Makefile,v > retrieving revision 1.81 > diff -u -r1.81 Makefile > --- Makefile 1996/06/19 21:19:56 1.81 > +++ Makefile 1996/06/20 09:01:51 > @@ -102,13 +102,21 @@ > > MK_FLAGS= -DNOMAN -DNOPROFILE > > -world: hierarchy mk $(WORLD_CLEANDIST) bootstrap include-tools includes lib-tools libraries build-tools > +.if !target(pre-build) > +pre-build: > + @/usr/bin/true > +.endif > + > +world: pre-build hierarchy mk $(WORLD_CLEANDIST) bootstrap include-tools includes lib-tools libraries build-tools > @echo "--------------------------------------------------------------" > @echo " Rebuilding ${DESTDIR} The whole thing" > @echo "--------------------------------------------------------------" > @echo > ${MAKE} depend all install > cd ${.CURDIR}/share/man && ${MAKE} makedb > +.if target(post-build) > + cd ${.CURDIR} && ${MAKE} post-build > +.endif > @echo "make world completed on `date`" > > bootstrap: > > Comments? > > Jordan -- Mark Valentine at Home