>From: guido@gvr.win.tue.nl (Guido van Rooij)
authorRod Grimes <rgrimes@FreeBSD.org>
Tue, 5 Oct 1993 21:55:35 +0000 (21:55 +0000)
committerRod Grimes <rgrimes@FreeBSD.org>
Tue, 5 Oct 1993 21:55:35 +0000 (21:55 +0000)
Date: Tue, 5 Oct 1993 20:00:24 +0100 (MET)
I have a link : /usr/src->/disk3/src
this makes (a nice feature) the obj appear in /usr/obj/disk3/src/....
However, when make world cleans up the obj directories, it always
tries to find them in /usr/obj. Wrong according to me.

Rod:
Fixed by using the same algorith that the .mk files use to locate the
obj directory.

Makefile

index 34d08c0..cfbf4e5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #      @(#)Makefile    5.1.1.2 (Berkeley) 5/9/91
 #
 #      @(#)Makefile    5.1.1.2 (Berkeley) 5/9/91
 #
-#      $Id: Makefile,v 1.14 1993/09/14 00:37:15 rgrimes Exp $
+#      $Id: Makefile,v 1.15 1993/09/24 14:13:25 rgrimes Exp $
 #
 
 SUBDIR=
 #
 
 SUBDIR=
@@ -67,7 +67,8 @@ cleandist:
        @echo " Cleaning up the source tree, and rebuilding the obj tree"
        @echo "--------------------------------------------------------------"
        @echo
        @echo " Cleaning up the source tree, and rebuilding the obj tree"
        @echo "--------------------------------------------------------------"
        @echo
-       cd /usr/obj; rm -rf ${SUBDIR}
+       here=`pwd`; dest=/usr/obj/`echo $$here | sed 's,/usr/src,,'`; \
+       cd $$dest; rm -rf ${SUBDIR}
        find . -name obj | xargs -n30 rm -rf
        make cleandir
        make obj
        find . -name obj | xargs -n30 rm -rf
        make cleandir
        make obj