From 5f8b579b46da948871b027748ef7beedc528ae14 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 11 Dec 2014 06:49:02 -0800 Subject: * configure (have_git): New variable and configure test for git. * Makefile (SRCS): Only set if git is available. (enforce): Fail if we don't have git. --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 56169677..2e762ff3 100644 --- a/Makefile +++ b/Makefile @@ -45,11 +45,14 @@ OBJS += arith.o hash.o utf8.o filter.o eval.o rand.o combi.o sysif.o OBJS-$(debug_support) += debug.o OBJS-$(have_syslog) += syslog.o OBJS-$(have_posix_sigs) += signal.o + +ifneq ($(have_git),) SRCS := $(addprefix $(top_srcdir)/,\ $(filter-out lex.yy.c y.tab.c y.tab.h,\ $(shell git --work-tree=$(top_srcdir) \ --git-dir=$(top_srcdir)/.git \ ls-files "*.c" "*.h" "*.l" "*.y"))) +endif # MPI objects MPI_OBJ_BASE=mpi.o mplogic.o @@ -233,9 +236,14 @@ endef .PHONY: enforce enforce: +ifneq ($(have_git),) $(call GREP_CHECK,'\