Skip to content

Commit 7897d84

Browse files
committed
Makefile: clean *.o files we create
The part that removes object files in the 'clean' target predates various Makefile macros that list object files we create, and instead removes the objects with shell glob, perpetually requiring updates whenever a new location that builds object files is added. Simplify the target by removing $(OBJECTS), which is supposed to have all the objects we create during the build. Signed-off-by: Junio C Hamano <[email protected]>
1 parent b8b4d93 commit 7897d84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,8 +2456,8 @@ profile-clean:
24562456
$(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))
24572457

24582458
clean: profile-clean coverage-clean
2459-
$(RM) *.o *.res refs/*.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o
2460-
$(RM) xdiff/*.o vcs-svn/*.o ewah/*.o builtin/*.o
2459+
$(RM) *.res
2460+
$(RM) $(OBJECTS)
24612461
$(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)
24622462
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
24632463
$(RM) $(TEST_PROGRAMS) $(NO_INSTALL)

0 commit comments

Comments
 (0)