From: Stefano Lattarini Date: Thu, 19 Jul 2012 07:50:01 +0000 (+0200) Subject: build: "make clean" should not remove configure-generated files X-Git-Tag: v1.7.12-rc0~4^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dc7ace5f776f30fe4e10d8a3fa8146ad21893544;p=git.git build: "make clean" should not remove configure-generated files Those filed hold variables, settings and information set by the configuration process run by './configure'; in Autotools-based build system that kind of stuff should only be removed by "make distclean". Having it removed by "make clean" is not only inconsistent, but causes real confusion for that part of the Git audience that is used to the Autotools semantics; for example, an autotools old-timer that has run: ./configure --prefix /opt/git in the past, without running "make distclean" afterwards, would expect a "make install" issued after a "make clean" to rebuild and install git in '/opt/git'; but with the current behaviour, the "make clean" invocation removes (among the other things) the file 'config.mak.autogen', so that the "make install" falls back to the default prefix of '$HOME', thus installing git in the user's home directory -- definitely unexpected. Signed-off-by: Stefano Lattarini Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index 285c660e1..88a76a398 100644 --- a/Makefile +++ b/Makefile @@ -2742,6 +2742,9 @@ dist-doc: distclean: clean $(RM) configure + $(RM) config.log config.status config.cache + $(RM) config.mak.autogen config.mak.append + $(RM) -r autom4te.cache profile-clean: $(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) @@ -2756,8 +2759,6 @@ clean: profile-clean $(RM) -r $(dep_dirs) $(RM) -r po/build/ $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h $(ETAGS_TARGET) tags cscope* - $(RM) -r autom4te.cache - $(RM) config.log config.mak.autogen config.mak.append config.status config.cache $(RM) -r $(GIT_TARNAME) .doc-tmp-dir $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz $(RM) $(htmldocs).tar.gz $(manpages).tar.gz