Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jun 1996 00:20:51 +0100
From:      mark@linus.demon.co.uk (Mark Valentine)
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>, hackers@freebsd.org
Subject:   Re: What do people think of this change to /usr/src/Makefile?
Message-ID:  <199606202320.AAA04239@linus.demon.co.uk>
In-Reply-To: "Jordan K. Hubbard"'s message of Jun 20,  7:26am

next in thread | raw e-mail | index | archive | help
> From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
> 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 <mailto:mv@pobox.com> <http://www.pobox.com/~mv/>;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606202320.AAA04239>