diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2001-05-20 12:14:17 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2001-05-20 12:14:17 +0000 |
| commit | 2b1f35a9afacf9c3c324b99bdbb836be153fc41f (patch) | |
| tree | 436e62f1a65c752681e269ca2152081786184be7 | |
| parent | e5adc24bf884468b9dad9a757ee9213c14f229dd (diff) | |
Notes
| -rw-r--r-- | share/mk/bsd.obj.mk | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index 920d2005a616..bb3afe6bc16b 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -50,13 +50,28 @@ CANONICALOBJDIR:=/usr/obj${.CURDIR} .endif # -# Warn of unorthodox object directory +# Warn of unorthodox object directory. +# +# The following directories are tried in order for ${.OBJDIR}: +# +# 1. ${MAKEOBJDIRPREFIX}/`pwd` +# 2. ${MAKEOBJDIR} +# 3. obj.${MACHINE} +# 4. obj +# 5. /usr/obj/`pwd` +# 6. ${.CURDIR} +# +# If ${.OBJDIR} is constructed using canonical cases 1 or 5, or +# case 2 (using MAKEOBJDIR), don't issue a warning. Otherwise, +# issue a warning differentiating between cases 6 and (3 or 4). # objwarn: -.if !defined(NOOBJ) && ${.OBJDIR} != ${CANONICALOBJDIR} +.if !defined(NOOBJ) && ${.OBJDIR} != ${CANONICALOBJDIR} && \ + !(defined(MAKEOBJDIRPREFIX) && exists(${CANONICALOBJDIR}/)) && \ + !(defined(MAKEOBJDIR) && exists(${MAKEOBJDIR}/)) .if ${.OBJDIR} == ${.CURDIR} @${ECHO} "Warning: Object directory not changed from original ${.CURDIR}" -.elif !defined(MAKEOBJDIR) && !defined(MAKEOBJDIRPREFIX) +.elif exists(${.CURDIR}/obj.${MACHINE}/) || exists(${.CURDIR}/obj/) @${ECHO} "Warning: Using ${.OBJDIR} as object directory instead of\ canonical ${CANONICALOBJDIR}" .endif |
