From 994cab188cba4f990cabc88e3ec804899a26e848 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 24 Oct 2008 12:54:24 +0200 Subject: [PATCH] TopGit: small Makefile nitpichink Make 'prefix' replacement more explicit using ?= Use simple substitution assignment := when there are some expansions in place. This is a good practice to speed up builds, maybe not particularly useful with such a simple Makefile. Signed-off-by: Antonio Ospite --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 2c627af..3ce39a5 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ -prefix = $(HOME) -bindir = $(prefix)/bin -cmddir = $(prefix)/libexec/topgit -sharedir = $(prefix)/share/topgit -hooksdir = $(cmddir)/hooks +prefix ?= $(HOME) +bindir := $(prefix)/bin +cmddir := $(prefix)/libexec/topgit +sharedir := $(prefix)/share/topgit +hooksdir := $(cmddir)/hooks -commands_in = $(wildcard tg-*.sh) +commands_in := $(wildcard tg-*.sh) hooks_in = hooks/pre-commit.sh -commands_out = $(patsubst %.sh,%,$(commands_in)) -hooks_out = $(patsubst %.sh,%,$(hooks_in)) -help_out = $(patsubst %.sh,%.txt,$(commands_in)) +commands_out := $(patsubst %.sh,%,$(commands_in)) +hooks_out := $(patsubst %.sh,%,$(hooks_in)) +help_out := $(patsubst %.sh,%.txt,$(commands_in)) all:: tg $(commands_out) $(hooks_out) $(help_out) -- 2.30.2