Skip to content

Commit

Permalink
Automatically init submodules if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Mar 9, 2018
1 parent 414d1eb commit 1f706a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ EXECUTABLE=$(BUILD_PATH)/$(NAME).bin
SELF_EXECUTABLE=$(BUILD_PATH)/update-$(NAME).uf2
SELF_EXECUTABLE_INO=$(BUILD_PATH)/update-$(NAME).ino

all: dirs $(EXECUTABLE) $(SELF_EXECUTABLE)
SUBMODULES = lib/uf2/README.md

all: $(SUBMODULES) dirs $(EXECUTABLE) $(SELF_EXECUTABLE)

r: run
b: burn
Expand Down Expand Up @@ -178,3 +180,6 @@ all-boards:
for f in `cd boards; ls` ; do "$(MAKE)" BOARD=$$f drop-board || break; done

drop: all-boards drop-pkg

$(SUBMODULES):
git submodule update --init --recursive

1 comment on commit 1f706a1

@dhalbert
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Git notes there is no newline at the end of the Makefile.

Please sign in to comment.