--- Makefile (Asterisk 15.2) +++ Makefile (working copy) @@ -107,2 +107,5 @@ -# makeopts is required unless the goal is clean or distclean -ifeq ($(findstring clean,$(MAKECMDGOALS)),) +# makeopts is required unless the goal is just {dist{-}}clean +ifeq ($(MAKECMDGOALS),clean) +else ifeq ($(MAKECMDGOALS),distclean) +else ifeq ($(MAKECMDGOALS),dist-clean) +else