Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.lang.c Subject: Re: Problems with Makefile executing "make" in sub directories Message-ID: <1990Jan21.220652.1686@virtech.uucp> Date: 21 Jan 90 22:06:52 GMT References: <926@telesci.UUCP> Distribution: na Organization: Virtual Technologies Inc. Lines: 32 In article <926@telesci.UUCP>, jpoplaws@telesci.UUCP (Joseph E Poplawski) writes: > qccs: lib > cd \ > qccs > $(MAKE) this wont work. The $(MAKE) will run in the current directory, not in the sub-directory. > qmas: > ( cd qmas ; make ) The reason for the problem with this is that qmas exists in the current directory and since it has no dependencies it doesn't need to be made. A second issue, while not a real problem, is that the parens are not needed for this. All you need is: cd wherever; make > lib: > ( cd libs ; make ) > $ make lib > ( cd libs ; make ) > *** Error code 1 Since you dont show the Makefile in libs, I can't tell you why you get this error. There is nothing wrong with the lines in this makefile. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+