Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk We mustn't search in the path for ${dir}.${MACHINE}...



details:   https://anonhg.NetBSD.org/src/rev/e753bb5b71cf
branches:  trunk
changeset: 750142:e753bb5b71cf
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 19 00:14:43 2009 +0000

description:
We mustn't search in the path for ${dir}.${MACHINE}; make sure we only
find the ones relative to ${.CURDIR}.

diffstat:

 share/mk/bsd.subdir.mk |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 24b7e32cac41 -r e753bb5b71cf share/mk/bsd.subdir.mk
--- a/share/mk/bsd.subdir.mk    Fri Dec 18 23:37:38 2009 +0000
+++ b/share/mk/bsd.subdir.mk    Sat Dec 19 00:14:43 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.subdir.mk,v 1.50 2009/11/29 16:00:00 uebayasi Exp $
+#      $NetBSD: bsd.subdir.mk,v 1.51 2009/12/19 00:14:43 christos Exp $
 #      @(#)bsd.subdir.mk       8.1 (Berkeley) 6/8/93
 
 .include <bsd.init.mk>
@@ -6,11 +6,26 @@
 .if !defined(NOSUBDIR)                                 # {
 
 .for dir in ${SUBDIR}
+.if "${dir}" == ".WAIT"
+# Don't play with .WAI
+__REALSUBDIR+=${dir}
+.else
+.if "${dir:H}" != ""
+# It is a relative path; make it absolute so exists can't search the path.
+.if exists(${.CURDIR}/${dir}.${MACHINE})
+__REALSUBDIR+=${dir}.${MACHINE}
+.else
+__REALSUBDIR+=${dir}
+.endif
+.else
+# It is an absolute path; leave it alone
 .if exists(${dir}.${MACHINE})
 __REALSUBDIR+=${dir}.${MACHINE}
 .else
 __REALSUBDIR+=${dir}
 .endif
+.endif
+.endif
 .endfor
 
 __recurse: .USE



Home | Main Index | Thread Index | Old Index