Automatically run 'git submodule update' if necessary
authorKeith Packard <keithp@keithp.com>
Fri, 13 May 2016 01:05:14 +0000 (18:05 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 13 May 2016 01:05:14 +0000 (18:05 -0700)
This makes sure pdclib exists by updating for the all and
all-recursive targets

Signed-off-by: Keith Packard <keithp@keithp.com>
Makefile.am

index c1ba753..4145946 100644 (file)
@@ -6,6 +6,12 @@ MAINTAINERCLEANFILES = ChangeLog
 
 .PHONY: ChangeLog
 
+all: pdclib/Makefile
+all-recursive: pdclib/Makefile
+
+pdclib/Makefile:
+       git submodule update
+
 ChangeLog:
        (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || \
        (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)