marbru@attc.UUCP (Martin Brunecky) (03/22/91)
I am still having problems with the non-standard X11 installation. I need to have my X11 directory tree completely separate from anything else. Using a shared resource (a server), I can't use the common approach of creating links in /usr/local. Building X11 withe DESTDIR=mypath was easy and worked as expected. The problem is making anything that DEPENDS on MIT X11 (such as Wcl, Dirt...) using that non-standard X11 location. I did the obvious thing (and I got advice to do that). Modified my site.def to include definitions for my non-standard directories, such as BinDir, UsrLibDir, IncRoot, ManDirectoryRoot etc. using the following approach: #ifndef BinDir #define BinDir $(DESTDIR)/usr/local/bin/X11 #endif But I was still running into probles with make Makefiles target insisting on looking up Imake templates in standard -I/usr/local/lib/X11/config. I found that the whole problem is due to template definition: DESTDIR = DestDir However, putting macro DestDir=... on make command line was not enough, as the imake for subdirectories does not propagate it down. I ended up modifying the Imake.tmpl as follows: 649c649,650 < IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) --- > IMAKE_CMD = $(IMAKE) -DUseInstalled -DDestDir=$(DESTDIR) \ > -I$(IRULESRC) $(IMAKE_DEFINES) This finally did the job of making makefiles in subdirectories. However, beeing a really novice Imake user, I hope there is a cleaner solution to my problem (one that does not require Imake.tmpl changes). Any help ? -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky {...}sunpeaks!auto-trol!marbru (303) 252-2499 (sometimes also: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404
Erik.Hardy@sei.cmu.EDU (03/22/91)
[Martin Brunecky is still having problems getting the right location for include files in using Imake. He tried:] 649c649,650 < IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) --- > IMAKE_CMD = $(IMAKE) -DUseInstalled -DDestDir=$(DESTDIR) \ > -I$(IRULESRC) $(IMAKE_DEFINES) This'll work just fine. Another way is to set the environment variable IMAKEINCLUDE, e.g. setenv IMAKEINCLUDE "-I<yourdir>" This has the effect of adding "-I<yourdir>" to the command line. "." is always first on the list, followed by your directory. You can specify multiple directories, separated by spaces, but you need -I for each one. This also lets you put anything else on the command line implicitly, so that, for instance, you can define things using the -D option. Although this is non-standard usage, it can be really handy in cutting down on the amount of stuff you have to type. erik hardy sei/user interface project