Xref: news2.mv.net comp.os.msdos.djgpp:886 From: Broeker AT axp04 DOT physik DOT rwth-aachen DOT de (Hans-Bernhard Broeker) Newsgroups: comp.os.msdos.djgpp Subject: Re: Problem with make Date: 6 Feb 96 12:15:03 GMT Organization: RWTH -Aachen / Rechnerbetrieb Informatik Lines: 40 Message-ID: References: NNTP-Posting-Host: axp04.physik.rwth-aachen.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp piet AT stego DOT cs DOT ruu DOT nl (Piet van Oostrum) writes: >>>>>> coomar AT iitk DOT ernet DOT in (KS) writes: >KS> Hello! >KS> I am having some problem with dmake 3.8 . >KS> Consider the following lines ina makefile for eg: >KS> libraries: config.h >KS> (cd sources; make) >KS> when I type 'make libraries', It takes the line (cd sources; make) as single >KS> line and hence gives 'BAD COMMAND OR FILENAME' message. I am running it on >KS> DOS 6.22. Same problem happens with gnu make 3.7.1 also. Any solutions? >First, the () are unnecessary, even on Unix. I'm doubt that: if the () were absent, the shell would cd to sources, call make, and *never switch back* to the starting directory. For a single command in the rule, that's OK, because the shell that got called by make will exit, and you're back to make's working directory. *But* if you call any other programs, that might mess it all up. >Second, I don't think the MS-DOS CLI accepts more than one command on a >line. >Probably it will accept the commands on separate lines, as the working >directory is global in MS-DOS. this also means that you must do a cd .. >afterwards. Just forget about using any DOS programs: since this is for DJGPP, and by now probably all DJGPP'ers are using GNU make, why not do it the GNU way? libraries: config.h $(MAKE) -C sources Works absolutely perfect, at least with the recent (V2-based) make from DJ. Hans-Bernhard Broeker