X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: 12 Nov 2003 08:59:55 +0200 Message-Id: From: Eli Zaretskii To: djgpp AT delorie DOT com In-reply-to: (nospam@none.com) Subject: Re: makefile question References: 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 Precedence: bulk > From: nospam AT none DOT com > Newsgroups: comp.os.msdos.djgpp > Date: Wed, 12 Nov 2003 03:36:47 +0000 (UTC) > > Hi, does anyone know of a way to extend the following make so that > in addition to run make on all the subdirs, doing make clean will > call make clean on all the subdirs as well? Does the following Makefile work if you say "make cleanall"? (It's untested, so beware.) TARGET = .PHONY: all cleanall subdirs $(SUBDIRS) all: subdirs subdirs: $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ $(TARGET) cleanall: $(MAKE) TARGET=clean This assumes that each Makefile in every subdir has a clean: target.