On Fri, Oct 24, 2008 at 4:37 PM, Philip Guenther <[EMAIL PROTECTED]> wrote: > On Fri, Oct 24, 2008 at 1:59 PM, Peng Yu <[EMAIL PROTECTED]> wrote: >> I have the following code. I'm wondering how to put them together into >> one if statement? >> >> ifeq ($(MAKECMDGOALS), all) >> -include .dep >> endif >> >> ifeq ($(MAKECMDGOALS), ) >> -include .dep >> endif > > Don't you _really_ want to test whether they are doing a "make clean"? If so: > > # don't include .dep if they're doing a make clean > ifeq ($(filter clean,$(MAKECMDGOALS)),) > -include .dep > endif > > If there are other fake targets that should disable .dep inclusion, > just include them in the first argument to $(filter)
No. I'm not asking how to make clean. I just want to know how to combine the two if statements. The commands inside each if statements can be anything, but they are the same. ifeq ($(MAKECMDGOALS), all) some command endif ifeq ($(MAKECMDGOALS), ) same as above command endif Thanks, Peng _______________________________________________ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make