]> git.ipfire.org Git - thirdparty/git.git/commit - Makefile
Makefile: build 'gitweb' in the default target
authorSZEDER Gábor <szeder.dev@gmail.com>
Tue, 28 Jun 2022 10:16:01 +0000 (12:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jun 2022 20:20:05 +0000 (13:20 -0700)
commitd3b827408c5a1148d7c7ec46d07380c31b0796e7
tree043020b4f4fa8d6ff30c5fc75ebb51731a71ee5b
parentaffc3b755cb4d1ac87096bbb93f5f2e57b703894
Makefile: build 'gitweb' in the default target

Our Makefile's default target used to build 'gitweb', though
indirectly: the 'all' target depended on 'git-instaweb', which in turn
depended on 'gitweb'.  Then e25c7cc146 (Makefile: drop dependency
between git-instaweb and gitweb, 2015-05-29) removed the latter
dependency, and for good reasons (quoting its commit message):

  "1. git-instaweb has no build-time dependency on gitweb; it
      is a run-time dependency

   2. gitweb is a directory that we want to recursively make
      in. As a result, its recipe is marked .PHONY, which
      causes "make" to rebuild git-instaweb every time it is
      run."

Since then a simple 'make' doesn't build 'gitweb'.

Luckily, installing 'gitweb' is not broken: although 'make install'
doesn't depend on the 'gitweb' target, it has a dependency on the
'install-gitweb' target, which does generate all the necessary files
for 'gitweb' and installs them.  However, if someone runs 'make &&
sudo make install', then those files in the 'gitweb' directory will be
generated and owned by root, which is not nice.

List 'gitweb' as a direct dependency of the default target, so a plain
'make' will build it.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile