Do not output $(OBJDIR) when cleaning phony targets

This commit is contained in:
Pierre Pronchery 2018-03-08 01:14:15 +01:00
parent cd8c77733f
commit f4617b7615

View File

@ -1821,6 +1821,7 @@ static int _clean_targets(Makefile * makefile)
String * q;
size_t i;
char c;
int phony;
if((p = _makefile_get_config(makefile, NULL, "targets")) == NULL)
return 0;
@ -1859,9 +1860,11 @@ static int _clean_targets(Makefile * makefile)
if((prefix = _makefile_get_config(makefile, targets,
"prefix")) == NULL)
prefix = "$(PREFIX)";
_makefile_print(makefile, "\t%s%s%s%s%s%s\n", p,
" -c -P \"", prefix,
"\" -- \"$(OBJDIR)", targets, "\"");
phony = _makefile_is_phony(makefile, targets);
_makefile_print(makefile, "\t%s%s%s%s%s%s%s\n", p,
" -c -P \"", prefix, "\" -- \"",
phony ? "" : "$(OBJDIR)", targets,
"\"");
}
if(c == '\0')
break;