@matheusbsbs / matheus-bagliano / commits / 8c51242873
Fork 0

Make sure 'make install' does not have to rebuild templates.

The dependency rule in templates directory forced 'make install' that immediately followed 'make all' to rebuild boilerplates. This was problematic for a workflow that built first as yourself and then installed as root, from a working tree that is on an NFS mounted filesystem that is unwritable by root. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Oct 8, 2005 at 18:01 UTC 8c51242873d63cfaf87fa2e2e407198a6ad2c3d0
1 file changed +6 -3
templates/Makefile
+6 -3
@@ -6,13 +6,15 @@ prefix ?= $(HOME)
6 template_dir ?= $(prefix)/share/git-core/templates/
7 # DESTDIR=
8
9 -all: boilerplates custom
9 +all: boilerplates.made custom
10 find blt
11
12 # Put templates that can be copied straight from the source
13 # in a file direc--tory--file in the source. They will be
14 # just copied to the destination.
15 -boilerplates:
15 +
16 +bpsrc = $(filter-out %~,$(wildcard *--*))
17 +boilerplates.made : $(bpsrc)
18 ls *--* 2>/dev/null | \
19 while read boilerplate; \
20 do \
@@ -25,6 +27,7 @@ boilerplates:
27 *) cp $$boilerplate blt/$$dst ;; \
28 esac || exit; \
29 done || exit
30 + date >$@
31
32 # If you need build-tailored templates, build them into blt/
33 # directory yourself here.
@@ -32,7 +35,7 @@ custom:
35 : no custom templates yet
36
37 clean:
35 - rm -rf blt
38 + rm -rf blt boilerplates.made
39
40 install: all
41 $(INSTALL) -d -m755 $(DESTDIR)$(template_dir)