| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | nospam AT none DOT com |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: makefile question |
| Date: | Wed, 12 Nov 2003 19:17:04 +0000 (UTC) |
| Organization: | University of California, Berkeley |
| Lines: | 47 |
| Sender: | Raymond Chi <chiry AT soda DOT csua DOT berkeley DOT edu> |
| Message-ID: | <bou0vg$15os$1@agate.berkeley.edu> |
| References: | <20031112061038 DOT 12690 DOT qmail AT web41509 DOT mail DOT yahoo DOT com> |
| NNTP-Posting-Host: | soda.csua.berkeley.edu |
| X-Trace: | agate.berkeley.edu 1068664624 38684 128.32.112.233 (12 Nov 2003 19:17:04 GMT) |
| X-Complaints-To: | usenet AT agate DOT berkeley DOT edu |
| NNTP-Posting-Date: | Wed, 12 Nov 2003 19:17:04 +0000 (UTC) |
| User-Agent: | tin/1.5.12-20020427 ("Sugar") (UNIX) (FreeBSD/4.7-STABLE (i386)) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Tony Zhou <johnerzhou AT yahoo DOT com> wrote:
>> .PHONY: all clean subdirs $(SUBDIRS)
>>
>> all: subdirs
>>
>> subdirs: $(SUBDIRS)
>>
>> $(SUBDIRS):
>> $(MAKE) -C $@
>>
> Try this
> $(MAKE) -kC $(wildcard $@)
> $(MAKE) -kC $(wildcard $@) clean
Hi, thanks for the response. I am not sure I understand this
completely, do you mean having a rule like
clean:
$(MAKE) -kC $(wildcard $@) clean
it doesn't work, because $@ gets substituted by clean, so the code runs
make -kC clean clean
the original line
$(SUBDIRS):
$(MAKE) -C $@
works because it's basically like
dir1 dir2 dir3:
make -C $@
I want to specify a rule
clean:
for each directory in $(SUBDIRS)
run $(MAKE) -C dir clean
except I can't seem to find a way to do this...
Thanks again.
Raymond
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |