delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/13/19:48:25

Date: Tue, 13 Jun 2000 19:48:21 -0400
Message-Id: <200006132348.TAA26312@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <01BFD5E6.4D7E9940@LEON.caresystems.com.au> (message from Leon on
Wed, 14 Jun 2000 09:52:49 +1000)
Subject: Re: example of autodependency in make.exe
References: <01BFD5E6 DOT 4D7E9940 AT LEON DOT caresystems DOT com DOT au>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

I do this, but it only really works if the sources and objects are all
in the same directory as the Makefile:

%.o : %.c (or whatever rule)
	gcc -MMD ...

DEPS=$(wildcard *.d)
ifneq ($(DEPS),)
include $(DEPS)
endif

- Raw text -


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