Problems with Makefile executing "make" in sub directories

Conor P. Cahill cpcahil at virtech.uucp
Mon Jan 22 09:06:52 AEST 1990


In article <926 at telesci.UUCP>, jpoplaws at 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     |
+-----------------------------------------------------------------------+



More information about the Comp.lang.c mailing list