Makefile: Fix "make clean" in "unconfigured" source directory
PATCH 1/1 Makefile: Fix "make clean" in "unconfigured" source directory
Recent commit "Makefile: Reuse all's recursion machinery for clean and install" broke targets clean and distclean in the source directory before running configure:
$ make clean
LD recurse-clean.mo
cc: fatal error: no input files
compilation terminated.
make: *** [rules.mak:118: recurse-clean.mo] Error 1Root cause is missing .PHONY. Fix that.
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -518,6 +518,7 @@ ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) $(ROM_DIRS_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),) +.PHONY: recurse-all recurse-clean recurse-install recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS)) recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS)) recurse-install: $(addsuffix /install, $(TARGET_DIRS))
Signature · 1 line
2.21.0
Quoted 10 lines · Markus Armbruster
Recent commit "
Makefile: Reuse all's recursion machinery for clean and install" broke targets clean and distclean in the source directory before running configure:$ make clean LD recurse-clean.mo cc: fatal error: no input files compilation terminated. make: *** [rules.mak:118: recurse-clean.mo] Error 1
Quoted 5 lines
Root cause is missing .PHONY. Fix that.
Fixes 1338a4b72659ce08eacb9de0205fe16202a22d9cReported-by Christian Borntraeger <[email protected]>Signed-off-by Markus Armbruster <[email protected]>
Quoted 17 lines
--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +1
-0@@ -518,6 +518,7 @@ ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) $(ROM_DIRS_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),) +.PHONY: recurse-all recurse-clean recurse-install recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS)) recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS)) recurse-install: $(addsuffix /install, $(TARGET_DIRS))
Quoted 25 lines · Markus Armbruster
Recent commit "
Makefile: Reuse all's recursion machinery for clean and install" broke targets clean and distclean in the source directory before running configure:$ make clean LD recurse-clean.mo cc: fatal error: no input files compilation terminated. make: *** [rules.mak:118: recurse-clean.mo] Error 1Root cause is missing .PHONY. Fix that.
Fixes 1338a4b72659ce08eacb9de0205fe16202a22d9cReported-by Christian Borntraeger <[email protected]>Signed-off-by Markus Armbruster <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +0
-0
Makefile ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) · line 524
Quoted 7 lines
Makefile +1
-0@@ -518,6 +518,7 @@ ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) $(ROM_DIRS_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),) +.PHONY: recurse-all recurse-clean recurse-install recurse-all: $(addsuffix /all, $(TARGET_DIRS) $(ROM_DIRS)) recurse-clean: $(addsuffix /clean, $(TARGET_DIRS) $(ROM_DIRS)) recurse-install: $(addsuffix /install, $(TARGET_DIRS))
Peter Maydell
AppliedQuoted 11 lines · Markus Armbruster
Recent commit "
Makefile: Reuse all's recursion machinery for clean and install" broke targets clean and distclean in the source directory before running configure:$ make clean LD recurse-clean.mo cc: fatal error: no input files compilation terminated. make: *** [rules.mak:118: recurse-clean.mo] Error 1
Quoted 5 lines
Root cause is missing .PHONY. Fix that.
Fixes 1338a4b72659ce08eacb9de0205fe16202a22d9cReported-by Christian Borntraeger <[email protected]>Signed-off-by Markus Armbruster <[email protected]>
Applied to master, thanks.
-- PMM