Skip to content

Commit 8c51242

Browse files
author
Junio C Hamano
committed
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>
1 parent e1e9c25 commit 8c51242

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

templates/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ prefix ?= $(HOME)
66
template_dir ?= $(prefix)/share/git-core/templates/
77
# DESTDIR=
88

9-
all: boilerplates custom
9+
all: boilerplates.made custom
1010
find blt
1111

1212
# Put templates that can be copied straight from the source
1313
# in a file direc--tory--file in the source. They will be
1414
# just copied to the destination.
15-
boilerplates:
15+
16+
bpsrc = $(filter-out %~,$(wildcard *--*))
17+
boilerplates.made : $(bpsrc)
1618
ls *--* 2>/dev/null | \
1719
while read boilerplate; \
1820
do \
@@ -25,14 +27,15 @@ boilerplates:
2527
*) cp $$boilerplate blt/$$dst ;; \
2628
esac || exit; \
2729
done || exit
30+
date >$@
2831

2932
# If you need build-tailored templates, build them into blt/
3033
# directory yourself here.
3134
custom:
3235
: no custom templates yet
3336

3437
clean:
35-
rm -rf blt
38+
rm -rf blt boilerplates.made
3639

3740
install: all
3841
$(INSTALL) -d -m755 $(DESTDIR)$(template_dir)

0 commit comments

Comments
 (0)