From b1bed0a69f972ec6643ae458a6797a7fe4ba01f8 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Fri, 7 Aug 2020 12:33:46 -0400 Subject: try to fix submodule updates --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 42272ec..4eb2a85 100644 --- a/Makefile +++ b/Makefile @@ -123,18 +123,22 @@ endif include user.mk -UPGRADE_SUBMODULES = $(shell a=$$(git status -uno -s) && [ -z "$$a" ] && echo y) - -.PHONY: submodule $(SUBMODULES) +.PHONY: submodules build-submodules $(SUBMODULES) $(SUBMODULES): stack - $(if $(UPGRADE_SUBMODULES),, [ -e $@/Makefile ] ||) git submodule update --init + a=$$(cd $@ && git status -uno -s) && (if test -z "$$a"; then git submodule update --init $@/; fi) $(MAKE) -C $@ $(cmd) +submodules: build-submodules + build-submodules: cmd= build-submodules: $(SUBMODULES) +.PHONY: update-submodules +update-submodules: + git submodule update --init + install-submodules: cmd=install -install-submodules: $(INSTALL_SUBMODULES) +install-submodules: update-submodules $(INSTALL_SUBMODULES) rootfs = samizdat export rootfs -- cgit v1.2.3