[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recursive make for 'all' and 'clean' targets
From: |
Todd Showalter |
Subject: |
Re: Recursive make for 'all' and 'clean' targets |
Date: |
Wed, 24 Mar 2010 10:00:47 -0400 |
On Wed, Mar 24, 2010 at 9:58 AM, Todd Showalter <address@hidden> wrote:
> This is what I usually do:
>
>> <Makefile>
>>
>> ############ actual scenario
>> SUBPRODSBLD = prod*
>
> SUBPRODSBLD_CLEAN = $(patsubst %,%.clean,$(SUBPRODSBLD))
>
> .PHONY: $(SUBPRODSBLD_CLEAN)
> $(SUBPRODSBLD_CLEAN):
> address@hidden -C $(@:.clean=) clean
Of course, I forgot one critical bit:
.PHONY: clean
clean: $(SUBPRODSBLD_CLEAN)
Without that, nothing will actually trigger the clean.
Todd.
--
Todd Showalter, President,
Electron Jump Games, Inc.