added check in Makefile for populated refptr directory

This commit is contained in:
Josh Holtrop 2010-04-27 12:59:52 -04:00
parent c02077275d
commit ed0754d4e7

View File

@ -7,7 +7,16 @@ DEPS := $(CXXDEPS)
OBJS := $(CXXOBJS) OBJS := $(CXXOBJS)
LDFLAGS := -lpcre 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) $(TARGET): $(OBJS)
$(CXX) -o $@ $^ $(LDFLAGS) $(CXX) -o $@ $^ $(LDFLAGS)