*BSD News Article 3727


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!usc!sol.ctr.columbia.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: Naive "imake" questions
Message-ID: <1992Aug16.213313.17582@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University  (Ogden, UT)
References: <1992Aug16.160342.11490@NeoSoft.com>
Date: Sun, 16 Aug 92 21:33:13 GMT
Lines: 57

In article <1992Aug16.160342.11490@NeoSoft.com> karl@NeoSoft.com (Karl Lehenbauer) writes:
>OK, lots of X programs come with Imakefiles and need imake to generate
>a customized Makefile for the local machine.
>
>Firing up imake as distributed in X386 for 386BSD, it complains about
>not being about to find "Imake.tmpl".  I found that setting the env
>var IMAKEINCLUDE to "-I/usr/lib/X11/config" would get it to create
>makefiles OK, but not with quite the correct information to build
>the target, like library paths are wrong.
>
>Is there another place this is supposed to point to, to get to the right
>stuff?  If not, is there a copy or link that needs to be done?  Otherwise,
>what is the accepted way to set this up?

	The imake program uses a relative path (relative to TOP) to get
locations of everything.  The Makefile resulting from the imake is supposed
to know this for the invocation of imake for subsequent make files under
the creation heirarchy.

	There is a shell script called "xmkmf" (X make make file) available
(hit archie if it isn't in your X distribution).  Basically, it uses the
path-to-top specification option to imake.

	To use it, you can do one of two things:  Edit 'xmkmf' so that
it knows where TOP is (this is the directory which contains the 'config'
directory which contains imake), and use the following command from within
a directory containing an Imakefile you wish to become a makefile:

	xmkmf

-OR- you can specify that top level directory as a parameter.  For instance,
if your top level X heirarchy directory was "/X11R5/new/dist" and your
config directory was therefore "/X11R5/new/dist/config", the following
command would work with an uneditied xmkmf in the Imakefile directory:

	xmkmf /X11R5/new/dist/config

If you use the second method, you should probably be aware that it seems
to hate relative paths:  if you relocate your build directory relative to
the TOP directory, you will need to remake xmkmf.  If you use an absolute
path, as long as TOP doesn't move, you can move around the actual build
directory for what you are building, without adverse effect.  For instance,
I usually build new X apps in my home directory and test them out before
relocating them into my X heirarchy and building them there.


					Terry Lambert
					terry_lambert@gateway.novell.com
					terry@icarus.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                                       terry@icarus.weber.edu
 "I have an 8 user poetic license" - me
-------------------------------------------------------------------------------