From ed0754d4e7faf0aca9773e8fec9b70129a011fc7 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 27 Apr 2010 12:59:52 -0400 Subject: [PATCH] added check in Makefile for populated refptr directory --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2018165..d09e61d 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,16 @@ DEPS := $(CXXDEPS) OBJS := $(CXXOBJS) LDFLAGS := -lpcre -all: $(TARGET) +all: submodule_check $(TARGET) + +.PHONY: submodule_check +submodule_check: + @if [ ! -e refptr/refptr.h ]; then \ + echo Error: \"refptr\" folder is not populated.; \ + echo Perhaps you forgot to do \"git checkout --recursive\"?; \ + echo You can remedy the situation with \"git submodule update --init\".; \ + exit 1; \ + fi $(TARGET): $(OBJS) $(CXX) -o $@ $^ $(LDFLAGS)