Subject: Makefiles, obj links & uninstall
To: None <current-users@NetBSD.ORG>
From: VaX#n8 <>
List: current-users
Date: 12/30/1994 07:31:53
If your /usr/src and /usr/obj are symlinks, and thus the physical directories
differ, symlinks will not be created; obj dirs are created in the same
hierarchy.  One (of a few) solution(s) is to "cd /usr/obj; pwd" and use the
output of that command for the BSDOBJDIR directory.  Same for some of the
I noticed this behaviour because my /usr dir is just symlinks to the real
mount points in /mnt/sd0? or whatever.  I know, ick, but my /usr got too big,
so I had to split it.  I figured the /usr/{src,bin,lib} stuff would change
less often, so I put it in its own partition.  But that was before sup :)

I was thinking of fixing this, and possibly putting in a few clean/uninstall
type targets.  I always thought that it should be easier to install/deinstall
programs in Unix, and an uninstall target would help.

Any reason not to do so?  What's the current thinking on /usr/share/mk files?
I've seen some pretty comprehensive makefiles somewhere in one of the pieces
of software I've installed.  Archive-related targets (a la tar and cpio, not
the ar kind), distclean-type stuff, etc.  Certainly some target to remove
all the obj links/dirs is in order?  (yes yes,
"find . -name obj -exec rmdir -- {} \;" works, but that's beside the point).

Would it be possible to do depth-first make-install-clean routines?  It would
be nice (for those with limited disk space) to be able to make the world
without having all those .o files existing simultaneously.  Even more
generally, how about depth-first any-sequence-of-make-targets?
My disk routinely gets so full a make in /usr/src/usr.bin alone won't complete.
VaX#n8 (vak-sa-nate) - n, CS senior++ and Unix junkie -
Just the vax-man.  Read my MIPS, no new VAXes!        - PGP key on request