Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!helios.ee.lbl.gov!nosc!ucsd!orion.cf.uci.edu!uci-ics!venera.isi.edu!raveling From: raveling@vaxb.isi.edu (Paul Raveling) Newsgroups: comp.windows.x Subject: Re: Stupid Imake question Message-ID: <7660@venera.isi.edu> Date: 1 Mar 89 17:09:05 GMT References: <33500006@iuvax> Sender: news@venera.isi.edu Reply-To: raveling@isi.edu (Paul Raveling) Organization: USC-Information Sciences Institute Lines: 86 In article <33500006@iuvax> jec@iuvax.cs.indiana.edu writes: > > I have a question concerning the various packages that have been >distributed on the net that use Imake. My question is basically how do I >use Imake? The easiest way is with a script such as that provided in the X sources in util/scripts/ximake.sh. However, we had a minor problem with this script. We use a separate shadow tree as a build tree, with symbolic links to files in the original source tree. In part, we want to avoid modifying the original source tree files. The original script followed the symbolic link for Makefile back to the source tree and updated the wrong tree. To cure this we inserted these lines in the script & called it just ximake: 35a36,40 > if [ -f $what ]; then > cp $what $what.bak # Break symbolic link, if any > rm $what > fi > (Sorry, HP-UX doesn't include cdiff) Normal procedure to use it is... setenv xs cd ximake $xs Since it's short, I'll append the modified script to this message. ---------------- Paul Raveling Raveling@isi.edu ------------------------------------------------------------------------- : # # script to generate a Makefile from an Imakefile. Sometimes useful for # generating Makefiles for stuff outside the X sources. # progname=$0 xtop=$1 what=$2 if [ x"$xtop" = x ]; then echo "usage: $progname xsourcespath [whattomake]" exit 1 fi if [ x"$what" = x ]; then what="Makefile" fi if [ ! -d $xtop ]; then echo "$progname"": no such directory $xtop" exit 1 fi if [ ! -d $xtop/util -o ! -d $xtop/util/imake.includes ]; then echo "$progname"": no X configuration files under $xtop" exit 1 fi if [ ! -f Imakefile ]; then echo "$progname"": can't find `pwd`/Imakefile" exit 1 fi if [ -f $what ]; then cp $what $what.bak # Break symbolic link, if any rm $what fi echo "Making $what from Imakefile" PATH=$xtop/util/imake:$PATH \ imake -DTOPDIR=$xtop -TImake.tmpl -I$xtop/util/imake.includes -s Makefile $what