]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Makefile: set default goals in makefiles
authorAdam Dinwoodie <adam@dinwoodie.org>
Sat, 15 Feb 2025 21:19:03 +0000 (21:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 17:02:26 +0000 (09:02 -0800)
Explicitly set the default goal at the very top of various makefiles.
This is already present in some makefiles, but not all of them.

In particular, this corrects a regression introduced in a38edab7c8
(Makefile: generate doc versions via GIT-VERSION-GEN, 2024-12-06).  That
commit added some config files as build targets for the Documentation
directory, and put the target configuration in a sensible place.
Unfortunately, that sensible place was above any other build target
definitions, meaning the default goal changed to being those
configuration files only, rather than the HTML and man page
documentation.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
Helped-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
Documentation/Makefile
contrib/credential/libsecret/Makefile
contrib/credential/osxkeychain/Makefile
contrib/credential/wincred/Makefile
contrib/diff-highlight/Makefile
contrib/diff-highlight/t/Makefile
contrib/mw-to-git/Makefile
contrib/mw-to-git/t/Makefile
contrib/persistent-https/Makefile
contrib/subtree/t/Makefile
git-gui/Makefile
git-gui/po/glossary/Makefile
t/interop/Makefile
t/perf/Makefile
templates/Makefile

index 3392e1ce7ebc540784912476847380d9c1775ac8..22c476fae52f1a1e2254134b56c24086e5a31d10 100644 (file)
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
 # Import tree-wide shared Makefile behavior and libraries
 include ../shared.mak
 
@@ -236,7 +239,7 @@ DEFAULT_EDITOR_SQ = $(subst ','\'',$(DEFAULT_EDITOR))
 ASCIIDOC_EXTRA += -a 'git-default-editor=$(DEFAULT_EDITOR_SQ)'
 endif
 
-all: html man
+all:: html man
 
 html: $(DOC_HTML)
 
index 3e67552cc5b5ba1dbb12e806b48fc43e86bfca42..97ce9c92fb8ae57bc48c29a32d2bbb0fb76ccb76 100644 (file)
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
 MAIN:=git-credential-libsecret
 all:: $(MAIN)
 
index 238f5f8c36fd63a5e59356a19d224b62f562d5e2..0948297e20f196c904fb57b7d0f2f16ac474d797 100644 (file)
@@ -1,3 +1,4 @@
+# The default target of this Makefile is...
 all:: git-credential-osxkeychain
 
 CC = gcc
index 6e992c08667d0b2b6a3c2d42314e3f500eb7502a..5b795fc9fe0cc8ee356a27d43e2659aff9b6f217 100644 (file)
@@ -1,4 +1,5 @@
-all: git-credential-wincred.exe
+# The default target of this Makefile is...
+all:: git-credential-wincred.exe
 
 -include ../../../config.mak.autogen
 -include ../../../config.mak
index f2be7cc92437191219d16ddf1536883da23541c0..33c2ccc9f70d8b4b0a9c0f37c4fd3710a99a2155 100644 (file)
@@ -1,4 +1,5 @@
-all: diff-highlight
+# The default target of this Makefile is...
+all:: diff-highlight
 
 PERL_PATH = /usr/bin/perl
 -include ../../config.mak
index 5ff5275496c55639a70056863fbc9047cfacc885..2a985414774c4b04e4c7058beb8543f55f6894c1 100644 (file)
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
 -include ../../../config.mak.autogen
 -include ../../../config.mak
 
@@ -6,7 +9,7 @@ SHELL_PATH ?= $(SHELL)
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
 
-all: test
+all:: test
 test: $(T)
 
 .PHONY: help clean all test $(T)
index 4e603512a39fe209b537cdc47c344c99f7cc38f1..497ac434d608a2efae1c72bad8c2532053f00c6f 100644 (file)
@@ -12,6 +12,9 @@
 #
 #   make install
 
+# The default target of this Makefile is...
+all::
+
 GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
 SCRIPT_PERL=git-remote-mediawiki.perl
 SCRIPT_PERL+=git-mw.perl
@@ -27,7 +30,7 @@ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
 
-all: build
+all:: build
 
 test: all
        $(MAKE) -C t
index f422203fa069fce4e482833db975ffb28b970929..6c9f377caac3302fcf90f375a2f1bcb8fa7e3509 100644 (file)
@@ -8,7 +8,8 @@
 #
 ## Test git-remote-mediawiki
 
-all: test
+# The default target of this Makefile is...
+all:: test
 
 -include ../../../config.mak.autogen
 -include ../../../config.mak
index 52b84ba3d4396e13c3aae3af4fe78aac5ddd55ca..691737e76be7080ce78e1701bee286440e73cc68 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# The default target of this Makefile is...
+all::
+
 BUILD_LABEL=$(shell cut -d" " -f3 ../../GIT-VERSION-FILE)
 TAR_OUT=$(shell go env GOOS)_$(shell go env GOARCH).tar.gz
 
-all: git-remote-persistent-https git-remote-persistent-https--proxy \
+all:: git-remote-persistent-https git-remote-persistent-https--proxy \
        git-remote-persistent-http
 
 git-remote-persistent-https--proxy: git-remote-persistent-https
index 093399c788178f3d4f005fc9d580e7c030e2d40a..2a85f5ee8496886182296415ad9c20105a313927 100644 (file)
@@ -3,6 +3,9 @@
 # Copyright (c) 2005 Junio C Hamano
 #
 
+# The default target of this Makefile is...
+all::
+
 -include ../../../config.mak.autogen
 -include ../../../config.mak
 
@@ -31,7 +34,7 @@ TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
 TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
 THELPERS = $(sort $(filter-out $(T),$(wildcard *.sh)))
 
-all: $(DEFAULT_TEST_TARGET)
+all:: $(DEFAULT_TEST_TARGET)
 
 test: pre-clean $(TEST_LINT)
        $(MAKE) aggregate-results-and-cleanup
index 667c39ed564a55f13145c071cf5b4d81fac4b3a8..6c5a12bc320d7de535196221bb807f42362fabce 100644 (file)
@@ -1,3 +1,4 @@
+# The default target of this Makefile is...
 all::
 
 # Define V=1 to have a more verbose compile.
index 749aa2e7ec1b02e6af3427516b1197f77bd48795..e656b0d2b0fbd03487e4b89ecd8561a066cc4e33 100644 (file)
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+update-po::
+
 PO_TEMPLATE = git-gui-glossary.pot
 
 ALL_POFILES = $(wildcard *.po)
index 6911c2915a74b16647c0075cabda39d415d2562a..4ff4ed0616e6896cb81a5b4b0a9117c929c042d8 100644 (file)
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
 # Import tree-wide shared Makefile behavior and libraries
 include ../../shared.mak
 
@@ -8,7 +11,7 @@ SHELL_PATH ?= $(SHELL)
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 T = $(sort $(wildcard i[0-9][0-9][0-9][0-9]-*.sh))
 
-all: $(T)
+all:: $(T)
 
 $(T):
        @echo "*** $@ ***"; '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
index e4808aebed08bfb87d0cc9ab6ccd2a70eee3c84e..9b3090c4edeca454a89405bb487d0adde2de495f 100644 (file)
@@ -1,10 +1,13 @@
+# The default target of this Makefile is...
+all::
+
 # Import tree-wide shared Makefile behavior and libraries
 include ../../shared.mak
 
 -include ../../config.mak
 export GIT_TEST_OPTIONS
 
-all: test-lint perf
+all:: test-lint perf
 
 perf: pre-clean
        ./run
index bd1e9e30c120032b209fb1d221b9d93eea31c649..722755338dbe9d6c549af44bfb269e8a25c0a42f 100644 (file)
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
 # Import tree-wide shared Makefile behavior and libraries
 include ../shared.mak
 
@@ -23,7 +26,7 @@ PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 template_instdir_SQ = $(subst ','\'',$(template_instdir))
 
-all: boilerplates.made custom
+all:: boilerplates.made custom
 
 # Put templates that can be copied straight from the source
 # in a file direc--tory--file in the source.  They will be