summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-12-17 15:06:40 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-12-17 15:06:40 -0800
commitf0c592dcfd736060354426e3994fb110d33a8c46 (patch)
treece6ebe749289e3e48c444e1938b2c0aad610b131
parentMerge branch 'js/t7064-master-to-initial' (diff)
parentMakefile: don't use a versioned temp distribution directory (diff)
downloadtgif-f0c592dcfd736060354426e3994fb110d33a8c46.tar.xz
Merge branch 'rj/make-clean'
Build optimization. * rj/make-clean: Makefile: don't use a versioned temp distribution directory Makefile: don't try to clean old debian build product gitweb/Makefile: conditionally include ../GIT-VERSION-FILE Documentation/Makefile: conditionally include ../GIT-VERSION-FILE Documentation/Makefile: conditionally include doc.dep
-rw-r--r--Documentation/Makefile4
-rw-r--r--Makefile17
-rw-r--r--gitweb/Makefile2
3 files changed, 15 insertions, 8 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 69dbe4bb0b..b980407059 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -272,7 +272,9 @@ install-html: html
../GIT-VERSION-FILE: FORCE
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
+ifneq ($(MAKECMDGOALS),clean)
-include ../GIT-VERSION-FILE
+endif
#
# Determine "include::" file references in asciidoc files.
@@ -286,7 +288,9 @@ doc.dep : $(docdep_prereqs) $(wildcard *.txt) $(wildcard config/*.txt) build-doc
$(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \
mv $@+ $@
+ifneq ($(MAKECMDGOALS),clean)
-include doc.dep
+endif
cmds_txt = cmds-ancillaryinterrogators.txt \
cmds-ancillarymanipulators.txt \
diff --git a/Makefile b/Makefile
index 6fb86c5862..348f3bbf0b 100644
--- a/Makefile
+++ b/Makefile
@@ -3062,9 +3062,9 @@ GIT_TARNAME = git-$(GIT_VERSION)
GIT_ARCHIVE_EXTRA_FILES = \
--prefix=$(GIT_TARNAME)/ \
--add-file=configure \
- --add-file=$(GIT_TARNAME)/version \
+ --add-file=.dist-tmp-dir/version \
--prefix=$(GIT_TARNAME)/git-gui/ \
- --add-file=$(GIT_TARNAME)/git-gui/version
+ --add-file=.dist-tmp-dir/git-gui/version
ifdef DC_SHA1_SUBMODULE
GIT_ARCHIVE_EXTRA_FILES += \
--prefix=$(GIT_TARNAME)/sha1collisiondetection/ \
@@ -3076,13 +3076,14 @@ GIT_ARCHIVE_EXTRA_FILES += \
--add-file=sha1collisiondetection/lib/ubc_check.h
endif
dist: git-archive$(X) configure
- @mkdir -p $(GIT_TARNAME)
- @echo $(GIT_VERSION) > $(GIT_TARNAME)/version
- @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version
+ @$(RM) -r .dist-tmp-dir
+ @mkdir .dist-tmp-dir
+ @echo $(GIT_VERSION) > .dist-tmp-dir/version
+ @$(MAKE) -C git-gui TARDIR=../.dist-tmp-dir/git-gui dist-version
./git-archive --format=tar \
$(GIT_ARCHIVE_EXTRA_FILES) \
--prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar
- @$(RM) -r $(GIT_TARNAME)
+ @$(RM) -r .dist-tmp-dir
gzip -f -9 $(GIT_TARNAME).tar
rpm::
@@ -3159,8 +3160,8 @@ clean: profile-clean coverage-clean cocciclean
$(RM) -r bin-wrappers $(dep_dirs) $(compdb_dir) compile_commands.json
$(RM) -r po/build/
$(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope*
- $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
- $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
+ $(RM) -r .dist-tmp-dir .doc-tmp-dir
+ $(RM) $(GIT_TARNAME).tar.gz
$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
$(MAKE) -C Documentation/ clean
$(RM) Documentation/GIT-EXCLUDED-PROGRAMS
diff --git a/gitweb/Makefile b/gitweb/Makefile
index cd194d057f..f13e23c4de 100644
--- a/gitweb/Makefile
+++ b/gitweb/Makefile
@@ -48,7 +48,9 @@ HIGHLIGHT_BIN = highlight
../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
+ifneq ($(MAKECMDGOALS),clean)
-include ../GIT-VERSION-FILE
+endif
### Build rules