diff options
| author | tv <tv@NetBSD.org> | 2002-01-03 16:45:18 +0000 |
|---|---|---|
| committer | tv <tv@NetBSD.org> | 2002-01-03 16:45:18 +0000 |
| commit | b6ed0d753ce2bd63f87314ee0462decdb062c906 (patch) | |
| tree | e42b71d78e38d4a83431597404c2f5a1ca33e7a1 /tools/Makefile.gnuhost | |
| parent | ff6a46630eeb9de60ebc2a30776b8ef8e04c2111 (diff) | |
* Honor BUILD on "make install" (will do "make all" first).
* Make "make all" update the .build_done timestamp more intelligently;
if no files changed in the build tree, don't touch the timestamp.
(This allows UPDATE and BUILD to function correctly.)
Diffstat (limited to 'tools/Makefile.gnuhost')
| -rw-r--r-- | tools/Makefile.gnuhost | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/Makefile.gnuhost b/tools/Makefile.gnuhost index f10f7985715..ee2a32340a4 100644 --- a/tools/Makefile.gnuhost +++ b/tools/Makefile.gnuhost @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gnuhost,v 1.11 2001/12/13 19:36:22 tv Exp $ +# $NetBSD: Makefile.gnuhost,v 1.12 2002/01/03 16:45:18 tv Exp $ # # Rules used when building a GNU host package. Expects MODULE to be set. # @@ -67,11 +67,17 @@ INSTALL_TARGET?=install @(cd build && ${CONFIGURE_ENV} sh ${DIST}/configure ${CONFIGURE_ARGS}) @touch $@ +# The .build_done timestamp is only updated if a file actually changes +# in the build tree during "make all". This way, if nothing has changed, +# a "make install UPDATE=" will do nothing. + .build_done: .configure_done @(cd build && ${MAKE} ${MAKE_ARGS} ${ALL_TARGET}) - @touch $@ + @if [ ! -f .build_done ] || \ + find build -type f -newer .build_done -print | grep -q ''; \ + then echo build changed; touch $@; fi -.install_done: +.install_done: ${BUILD:D.build_done} .if defined(UPDATE) @if [ ! -f .install_done ] || [ .build_done -nt .install_done ]; then \ (cd ${.OBJDIR}/build && ${MAKE} ${MAKE_ARGS} ${INSTALL_TARGET}); \ @@ -81,6 +87,8 @@ INSTALL_TARGET?=install .endif @touch $@ +.PHONY: .build_done + # Mapping to standard targets. .if ${USETOOLS} == "yes" |
