On Sat, Apr 16, 2016 at 12:06 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Junio C Hamano <gitster@xxxxxxxxx> writes: > >> Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: >> >>> This keeps top dir a bit less crowded. And because these programs are >>> for testing purposes, it makes sense that they stay somewhere in t/ >> >> But leaves many *.o files after "make clean". Even "distclean" does >> not clean them. > > Perhaps something like this as a preparatory patch, to protect us > from future breakages similar to this change. Yes. Much better than adding t/helper/*.o there. Thanks. > > -- >8 -- > Subject: 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 <gitster@xxxxxxxxx> > --- > Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index fe0bf7d..69d32bf 100644 > --- a/Makefile > +++ b/Makefile > @@ -2456,8 +2456,8 @@ profile-clean: > $(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) > > clean: profile-clean coverage-clean > - $(RM) *.o *.res refs/*.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o > - $(RM) xdiff/*.o vcs-svn/*.o ewah/*.o builtin/*.o > + $(RM) *.res > + $(RM) $(OBJECTS) > $(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB) > $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X > $(RM) $(TEST_PROGRAMS) $(NO_INSTALL) -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html