Date: Thu, 20 Jun 1996 07:26:51 -0700 From: "Jordan K. Hubbard" <jkh@time.cdrom.com> To: hackers@freebsd.org Subject: What do people think of this change to /usr/src/Makefile? Message-ID: <3363.835280811@time.cdrom.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3363.835280811>
