[comp.sources.wanted] needed: xmkmf

sxdal@acad3.alaska.edu (03/04/91)

on making x-trek ?I found that it calls for the use of a program called xmkmf
does anyone know where I can get a copy of this?
-- 
Don Levinson == sxdal@acad3.alaska.edu == sxdal@alaska

jik@athena.mit.edu (Jonathan I. Kamens) (03/05/91)

In article <1991Mar4.074306.1@acad3.alaska.edu>, sxdal@acad3.alaska.edu writes:
|> on making x-trek ?I found that it calls for the use of a program called xmkmf
|> does anyone know where I can get a copy of this?

  Xmkmf is part of the standard X distribution.  It should be installed on
your system if X11R4 is not installed on your system.

  If it isn't, then you should be able to do "imake -DUseInstalled
-I/usr/lib/X11/config", which is (in essence) what xmkmf does.

  Oh, what the heck, the shell script is so short, I've included it below.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710

#!/bin/sh

#
# generate a Makefile from an Imakefile from inside or outside the sources!
# 

usage="usage:  $0 [top_of_sources_pathname [current_directory]]"

topdir=
curdir=.

case $# in 
    0) ;;
    1) topdir=$1 ;;
    2) topdir=$1  curdir=$2 ;;
    *) echo "$usage" 1>&2; exit 1 ;;
esac

case "$topdir" in
    -*) echo "$usage" 1>&2; exit 1 ;;
esac

if [ -f Makefile ]; then 
    echo mv Makefile Makefile.bak
    mv Makefile Makefile.bak
fi

if [ "$topdir" = "" ]; then
    args="-DUseInstalled "-I/usr/lib/X11/config
else
    args="-I$topdir/config -DTOPDIR=$topdir -DCURDIR=$curdir"
fi

echo imake $args
imake $args