Path: utzoo!attcan!uunet!samsung!usc!apple!sun-barr!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: Re: difficulty installing in other than /usr/[bin,lib,include]/X11 Message-ID: <39153@lll-winken.LLNL.GOV> Date: 21 Nov 89 18:51:10 GMT References: <8911202302.AA16113@kanga.lcs.mit.edu> <5036@fy.sei.cmu.edu> Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 45 It isn't hard to do what you want at all. It's only slightly confused by a problem in the meaning of DESTDIR in the distributed Makefile template. Basically, the traditional meaning of DESTDIR has been: when you actually perform the installation of files into BINDIR, LIBDIR, INCDIR, etc., prepend DESTDIR to the installation directory targets. This allows you to install a rooted installation tree somewhere other than root. This is useful if you're building a new system or distribution. This is done for 4BSD distributions when a new distribution tape is cut. CSRG still has to be able to work on the machines, but they obviously don't want to distribute a copy of their system. So the build a pristine distribution under /nbsd. Also obvious is the fact that they can't have all the Makefiles targeting into /nbsd or all the applications would try to find things under /nbsd instead of /, etc. So they compile everything normally, but then install by saying ``make install DESTDIR=/nbsd'' - DESTDIR is passed down automatically by Makefiles when subdirectories are recursively made. The problem with the X11.3 Makefile template is that it has lines in it of the form ``BINDIR=$(DESTDIR)/...'' when they should really read ``BINDIR=/...'' and the "install" target should prepend $(DESTDIR) as it installs files. Hopefully this will be fixed in R4. Luckily, since the R3 Makefile template passes DESTDIR down automatically just as the 4BSD Makefiles do, you can just configure and compile R3 with DESTDIR set to nothing and then use ``make install DESTDIR=/...'' when you install to pick where you want things actually installed. There may still be a couple of applications which give you problems: some applications automatically recompile themselves on an install even though already fully compiled because of weird dependencies. Those you'll just have to deal with by hand. Off hand I can't think of anything in the core distribution that has this problem. It also isn't that hard to change the default installation directories from /usr/lib, etc. You can do it all from site.def quite easily. I really hope that R4 drops the comment that they consider this to be a bad practice. It's unreasonable to expect that one choice of directories will work for everyone. Personally I install all non-stock software under /usr/local/{bin,lib,include}. Other sites have other reasons for installing software elsewhere ... Casey