From 5a225bdc8c7e76ed06e9b50332c284704dacf23b Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 21 Mar 1999 06:43:40 +0000 Subject: [PATCH] Restored objlink. The previous commit was confused about the difference between OBJLINK and objlink. --- share/mk/bsd.obj.mk | 12 +++++++++++- share/mk/bsd.subdir.mk | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index fe31e486f7d8..8498434ddab4 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -1,4 +1,4 @@ -# $Id: bsd.obj.mk,v 1.26 1998/08/30 20:33:27 jb Exp $ +# $Id: bsd.obj.mk,v 1.27 1999/03/14 20:41:13 markm Exp $ # # The include file handles creating the 'obj' directory # and cleaning up object files, etc. @@ -78,6 +78,16 @@ obj: _SUBDIR .endif .endif +.if !target(objlink) +objlink: _SUBDIR + @if test -d ${CANONICALOBJDIR}/; then \ + rm -f ${.CURDIR}/obj; \ + ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \ + else \ + echo "No ${CANONICALOBJDIR} to link to - do a make obj."; \ + fi +.endif + # # where would that obj directory be? # diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 0fe628b57db7..4cf445c7d9d4 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 -# $Id: bsd.subdir.mk,v 1.25 1998/08/08 07:02:08 peter Exp $ +# $Id: bsd.subdir.mk,v 1.26 1999/03/14 20:41:14 markm Exp $ # # The include file contains the default targets # for building subdirectories. @@ -33,7 +33,7 @@ # # afterdistribute, afterinstall, all, beforeinstall, checkdpadd, # clean, cleandepend, cleandir, depend, install, lint, maninstall, -# obj, realinstall, regress, tags +# obj, objlink, realinstall, regress, tags # .if !target(__initialized__) @@ -88,7 +88,7 @@ ${SUBDIR}:: .for __target in all checkdpadd clean cleandepend cleandir depend lint \ - maninstall obj regress tags + maninstall obj objlink regress tags .if !target(${__target}) ${__target}: _SUBDIRUSE .endif