Hi,

I have created makefile as follow, which work fine in recursive (plus
parallel build) for 'allprodbld' target.

The problem I am facing is how can I have recursive 'clean' target? In
following case 'clean' is not working.

<Makefile>

############ actual scenario
SUBPRODSBLD = prod*

.PHONY:: $(SUBPRODSBLD)
$(SUBPRODSBLD)::
    $(MAKE) -C $@ allprodbld

.PHONY:: subprodsbld
subprodsbld:: $(SUBPRODSBLD)
    @echo "dep: $^"

.PHONY:: allprodbld
allprodbld::
    $(MAKE) subprodsbld

### Following would not work as prod1 dir will be call for 'make clean'
SUBPRODSCLR = prod*

.PHONY:: $(SUBPRODSCLR)
$(SUBPRODSCLR)::
    $(MAKE) -C $@ clean

.PHONY:: subprodsclr
subprodsclr:: $(SUBPRODSCLR)
    @echo "dep: $^"

clean::
    # $(MAKE) subprodsclr

</Makefile>

Thank you in advance.
-Hiral


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to