From 31f27b672c05df602fa1cc9cb5f64f0ef7cb3d80 Mon Sep 17 00:00:00 2001 From: Aaron Traas Date: Fri, 30 Jun 2017 15:56:46 -0400 Subject: [PATCH] Error message when you make if without retrieving git modules yet --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2e6997a..e9c0de3 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ SOURCES=$(OBJS:.o=.c) advent.h adventure.yaml Makefile control linenoise/linenoi advent: $(OBJS) linenoise.o dungeon.o $(CC) $(CCFLAGS) $(DBX) -o advent $(OBJS) dungeon.o linenoise.o $(LDFLAGS) $(LIBS) -main.o: advent.h dungeon.h +main.o: linenoise-gitmodule advent.h dungeon.h init.o: advent.h dungeon.h @@ -56,7 +56,7 @@ score.o: advent.h dungeon.h misc.o: advent.h dungeon.h -cheat.o: advent.h dungeon.h +cheat.o: linenoise-gitmodule advent.h dungeon.h saveresume.o: advent.h dungeon.h @@ -66,10 +66,13 @@ dungeon.o: dungeon.c dungeon.h dungeon.c dungeon.h: make_dungeon.py adventure.yaml python3 make_dungeon.py -linenoise.o: linenoise/linenoise.h +linenoise-gitmodule: + test -s linenoise/linenoise.h || { echo "\nlinenoise not present. Try: \n\n\tgit submodule update --recursive --remote --init\n"; exit 1; } + +linenoise.o: linenoise-gitmodule linenoise/linenoise.h $(CC) -c linenoise/linenoise.c -linenoise-dbg: linenoise/linenoise.h +linenoise-dbg: linenoise-gitmodule linenoise/linenoise.h $(CC) $(CCFLAGS) -c linenoise/linenoise.c clean: -- 2.31.1