Source-Changes-HG archive

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

[src/trunk]: src/share/mk Allow absolute directories in SUBDIR. There's prob...



details:   https://anonhg.NetBSD.org/src/rev/bee9af475ec4
branches:  trunk
changeset: 483512:bee9af475ec4
user:      aidan <aidan%NetBSD.org@localhost>
date:      Sat Mar 11 14:51:40 2000 +0000

description:
Allow absolute directories in SUBDIR.  There's probably a better fix that
can go in 'make'.

diffstat:

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

diffs (30 lines):

diff -r fa2f5309e9fc -r bee9af475ec4 share/mk/bsd.subdir.mk
--- a/share/mk/bsd.subdir.mk    Sat Mar 11 09:12:34 2000 +0000
+++ b/share/mk/bsd.subdir.mk    Sat Mar 11 14:51:40 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.subdir.mk,v 1.31 1999/02/11 05:01:39 tv Exp $
+#      $NetBSD: bsd.subdir.mk,v 1.32 2000/03/11 14:51:40 aidan Exp $
 #      @(#)bsd.subdir.mk       8.1 (Berkeley) 6/8/93
 
 .if !target(__initialized__)
@@ -22,9 +22,17 @@
 .for targ in ${TARGETS}
 .PHONY: ${targ}-${dir}
 ${targ}-${dir}: .MAKE
-       @echo "${targ} ===> ${_THISDIR_}${dir}"
-       @cd ${.CURDIR}/${dir}; \
-       ${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
+       @case "${dir}" in /*) \
+               echo "${targ} ===> ${dir}"; \
+               cd ${dir}; \
+               ${MAKE} "_THISDIR_=${dir}/" ${targ}; \
+               ;; \
+       *) \
+               echo "${targ} ===> ${_THISDIR_}${dir}"; \
+               cd ${.CURDIR}/${dir}; \
+               ${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}; \
+               ;; \
+       esac
 subdir-${targ}: ${targ}-${dir}
 ${targ}: subdir-${targ}
 .endfor



Home | Main Index | Thread Index | Old Index