build: automatically handle GIT submodule checkout for dtc
commitaef45d51d1204f3335fb99de6658e0c5612c2b67
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 29 Sep 2017 10:11:56 +0000 (29 11:11 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Oct 2017 12:46:44 +0000 (16 14:46 +0200)
tree3dd65cf0fd7f685cfd245e6f14f591f53de24126
parentf90ea7ba7c5ae7010ee0ce062207ae42530f57d6
build: automatically handle GIT submodule checkout for dtc

Currently if DTC is required by configure and not available in the host
OS install, we exit with an error message telling the user to checkout a
git submodule or install the library.

This introduces automatic handling of the git submodule checkout process
and enables it for dtc. This only runs if building from GIT, so users of
release tarballs still need the system library install. The current state
of the git checkout is stashed in .git-submodule-status, and a helper
program is used to determine if this state matches the desired submodule
state. A dependency against 'Makefile' ensures that the submodule state
is refreshed at the start of the build process

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170929101201.21039-2-berrange@redhat.com

[ kraxel: use /bin/sh not bash for scripts/git-submodule.sh ]
[ kraxel: fix Makefile dependencies ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
[fixup] Makefile dep
.gitignore
MAINTAINERS
Makefile
configure
scripts/git-submodule.sh [new file with mode: 0755]