Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!husc6!uwvax!gjetost!solomon From: solomon@gjetost.cs.wisc.edu (Marvin Solomon) Newsgroups: comp.windows.x Subject: re: Imakefiles Summary: Bug in imake.includes/Imake.rules Keywords: imake.rules imake Imakefile Message-ID: <6165@spool.cs.wisc.edu> Date: 23 Aug 88 22:25:15 GMT References: <8808201230.AA03056@EXPO.LCS.MIT.EDU> Sender: news@spool.cs.wisc.edu Reply-To: solomon@gjetost.cs.wisc.edu (Marvin Solomon) Followup-To: jim@EXPO.LCS.MIT.EDU Organization: U of Wisconsin CS Dept Lines: 84 There is a bug in util/imake.includes/Imake.rules that prevents imake from working correctly if invoked from a directory that is not a descendent of the root of the X source tree. The 'subdirMakefiles:' rule recursively invokes imake in a subdirectory, with TOPDIR set to '$(TOP)/..'. But if the path to the top from here is (e.g.) ../Xsrc, the path to the top from a subdir is '../../Xsrc', not '../Xsrc/..'. The current rules only work if you are a descendent of TOP, so that $(TOP) is entirely composed of '../..'. Context diffs follow. *** /tmp/,RCSt1001753 Tue Aug 23 17:02:14 1988 --- Imake.rules Tue Aug 23 17:01:46 1988 *************** *** 461,467 subdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(TOP)/..; \ @@\ $(MAKE) $(MFLAGS) Makefiles @@\ @@\ subsubdirMakefiles: @@\ --- 461,467 ----- subdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../$(TOP); \ @@\ $(MAKE) $(MFLAGS) Makefiles @@\ @@\ subsubdirMakefiles: @@\ *************** *** 467,473 subsubdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(TOP)/../..; \ @@\ $(MAKE) $(MFLAGS) Makefiles @@\ @@\ subsubsubdirMakefiles: @@\ --- 467,473 ----- subsubdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../$(TOP); \ @@\ $(MAKE) $(MFLAGS) Makefiles @@\ @@\ subsubsubdirMakefiles: @@\ *************** *** 473,479 subsubsubdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(TOP)/../../..; \ @@\ $(MAKE) $(MFLAGS) Makefiles @@\ @@\ subsubsubsubdirMakefiles: @@\ --- 473,479 ----- subsubsubdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../../$(TOP); \ @@\ $(MAKE) $(MFLAGS) Makefiles @@\ @@\ subsubsubsubdirMakefiles: @@\ *************** *** 479,483 subsubsubsubdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(TOP)/../../../..; \ @@\ $(MAKE) $(MFLAGS) Makefiles --- 479,483 ----- subsubsubsubdirMakefiles: @@\ $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak @@\ -$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak @@\ ! cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../../../$(TOP); \ @@\ $(MAKE) $(MFLAGS) Makefiles Marvin Solomon Computer Sciences Department University of Wisconsin, Madison WI solomon@cs.wisc.edu ...seismo!uwvax!solomon