[comp.windows.x] mit/config/Imakefile bug + patch

bin@primate.wisc.edu (Brain in Neutral) (08/03/90)

[also posted to xbugs.  Anyone care to comment?]

VERSION:
    R4

CLIENT MACHINE and OPERATING SYSTEM:
	Irrelevant

DISPLAY TYPE:
	Irrelevant

WINDOW MANAGER:
	Irrelevant

AREA:
	Configuration

SYNOPSIS:
	mit/config/Imakefile doesn't rebuild imake properly if BOOTSTRAPCFLAGS
	is non-empty.

DESCRIPTION:
	``make World'' does a ``make clean'' after making all the Makefiles.
	In particular, this cleans out mit/config and throws away imake.
	If at a later time you do ``make Makefile'' anywhere in the source
	tree, imake needs to be rebuilt.  The ImakeDependency() rule is clever
	enough to check whether imake exists and to rebuild it if necessary,
	BUT if imake is rebuilt using config/Makefile there can be a problem,
	viz., BOOTSTRAPCFLAGS needs to be specified (if it has a non-empty
	value) when imake.c is compiled, but is not passed to the cc command.

	This means you end up with a bad imake, and generically-configured
	Makefiles.  ``make Makefile BOOTSTRAPCFLAGS=whatever'' does not fix
	the problem either.

	The fix is simply to add BOOTSTRAPCFLAGS to DEFINES.

REPEAT BY:
	(Only works if BOOTSTRAPCFLAGS isn't empty)
	in ${TOP}:
		make World BOOTSTRAPCFLAGS=whatever
	in any directory in source tree (${TOP} is good enough):
		make Makefile

	You now have a generically-configured Makefile.

Patch follows:
------------------------------------------------------------------------------
*** Imakefile~	Tue Dec 12 11:37:30 1989
--- Imakefile	Thu Aug  2 13:38:23 1990
***************
*** 8,14 ****
  DEPLIBS = 
  HEADERS = imakemdep.h 
  CFFILES = $(HEADERS) Imake.rules Imake.tmpl Project.tmpl site.def *.bac *.cf
! DEFINES = $(SIGNAL_DEFINES)
  
  #undef ImakeDependency
  #define ImakeDependency(dummy) @@\
--- 8,14 ----
  DEPLIBS = 
  HEADERS = imakemdep.h 
  CFFILES = $(HEADERS) Imake.rules Imake.tmpl Project.tmpl site.def *.bac *.cf
! DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS)
  
  #undef ImakeDependency
  #define ImakeDependency(dummy) @@\