[comp.windows.x] Makefiles

bob@osu-eddie.UUCP (03/04/87)

When installing X v10r4 on our systems, I ran across some things in
the Makefiles that make life unnecessarily difficult.  Every Makefile
in the distribution has a line something like:
	CONFDIR= /usr/new
with the comment that this will decide where the executables go when
you `make install'.  As it turns out, the one-level-down makefiles
also expect to put the libraries in CONFDIR/lib, All very nice, if you
are running a stock 4.3 system, and if you like things to go in
/usr/new.  Unfortunately, we are in neither situation.

Since Time Immemorial, our executables have gone into `/u/osu/bin',
with libraries in `/u/osu/lib'.  When I changed CONFDIR to point to
`/u/osu/bin' (as the Makefile comments led me), I found a directory
`/u/osu/bin/lib' being created.  When I changed CONFDIR to point to
`/u/osu' I found libraries being put into `/u/osu/lib', but the
executables going into `/u/osu'.  Not at all what I wanted.  Some
careful editing of the Makefiles got things going where I wanted them,
but there is an easier solution, and thus the point of my suggestion:

To the X v11 authors and distribution kit-makers: Please structure the
next release of the Makefiles with two major symbols: One that points
directly to the directories where the executables are to go, and
another that points directly to where the libraries are intended to
reside.  None of this unimplied offsetting stuff!  In the distribution
version, these could be something like:
	BINDIR= /usr/new
	LIBDIR= /usr/new/lib
and all would behave as it does now.  `make reconfig' would still be
able, with a little twiddling, to propagate changes down through the
directories.  It would really help those of us with non-"standard"
layouts.  Thanks!
------
 Bob Sutterfield, Department of Computer and Information Science
 The Ohio State University; 2036 Neil Ave. Columbus OH USA 43210-1277
 bob@ohio-state.{arpa,csnet} or ...!cb{osgd,att}!osu-eddie!bob
 (614) 292 - 0915 or (614) 292 - 5813

peterson@MCC.COM.UUCP (03/04/87)

In article <3279@osu-eddie.UUCP>, cbatt!osu-eddie!bob@ucbvax.Berkeley.EDU (Bob Sutterfield) writes:
> In the distribution
> version, these could be something like:
>       BINDIR= /usr/new
>       LIBDIR= /usr/new/lib

As another example, the Andrew distribution has the following symbols
defined,

BINDIR - directory for all executable binarys
LIBDIR - directory for libraries
INCLDIR - directory for include files
HELPDIR - directory for help and man pages
DOCDIR - directory for documentation
FONTDIR - directory for fonts
ETCDIR - directory for system maintenace programs and random files

and each use of these directories is prefixed by DESTDIR which is
assumed to be the root of the whole subtree.  This allows you to
test the installation into /tmp by setting DESTDIR=/tmp, or  
whereever.  By leaving DESTDIR blank, everything starts at /

To save having to define these in every Makefile, they define a
special program which puts a wrapper around the Makfile and then
invokes make on it.  The wrapper defines all these variables (and
some more like the CFLAGS and INSTALL command options).
-- 
James Peterson
peterson@mcc.com  or  ...sally!im4u!milano!peterson