Code

Merge branch 'master' of git://git.kernel.org/pub/scm/gitk/gitk
[git.git] / templates / Makefile
index 0eeee43feb97ac79406d196c735e4027c4e9cdfd..6f4dbd362fffdd85570c2223ad7d98015e7970ae 100644 (file)
@@ -1,9 +1,14 @@
 # make and install sample templates
 
+ifndef V
+       QUIET = @
+endif
+
 INSTALL ?= install
 TAR ?= tar
+RM ?= rm -f
 prefix ?= $(HOME)
-template_dir ?= $(prefix)/share/git-core/templates/
+template_dir ?= $(prefix)/share/git-core/templates
 # DESTDIR=
 
 # Shell quote (do not use $(call) to accommodate ancient setups);
@@ -18,7 +23,7 @@ all: boilerplates.made custom
 
 bpsrc = $(filter-out %~,$(wildcard *--*))
 boilerplates.made : $(bpsrc)
-       ls *--* 2>/dev/null | \
+       $(QUIET)ls *--* 2>/dev/null | \
        while read boilerplate; \
        do \
                case "$$boilerplate" in *~) continue ;; esac && \
@@ -29,16 +34,16 @@ boilerplates.made : $(bpsrc)
                *--) ;; \
                *) cp $$boilerplate blt/$$dst ;; \
                esac || exit; \
-       done || exit
+       done && \
        date >$@
 
 # If you need build-tailored templates, build them into blt/
 # directory yourself here.
 custom:
-       : no custom templates yet
+       $(QUIET): no custom templates yet
 
 clean:
-       rm -rf blt boilerplates.made
+       $(RM) -r blt boilerplates.made
 
 install: all
        $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'