www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/21/14:34:55

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199604211817.AA143600669@relay1.geis.com>
Date: Sun, 21 Apr 96 18:05:00 UTC 0000
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: [Q:] Recursive make ??

Reply to message 3539740    from ELIZ AT IS DOT ELTA. on 04/21/96  4:38AM


>Better still, just change those lines to something that COMMAND.COM can
>grok (it doesn't understand multiple commands on a single line).  Try
>this:
>
>default all verif clean depend install:
>	cd FirstDir
>	make $@
>	cd ..
>	cd SecondDir
>	make $@
>	cd ..
>
>(You should always `cd ..' at the end, since in DOS the directory isn't
>restored when the sub-Make exits.)

That's very odd... according to what the Make docs say, that shouldn't
work.  Oh, well.

Anyway, to be safe you really should use $(MAKE) $@ instead of
invoking make by name.  And if you don't want to be plagued by seeing
all those cd commands, prefix 'em with @

default all verif clean depend install:
	@cd FirstDir
	@$(MAKE) $@
	@cd ..
	@cd SecondDir
	@$(MAKE) $@
	@cd ..

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019