[versions.mk] Make path to SUBMODULES.json based on srcdir (#3314)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 21 Jul 2016 17:49:26 +0000 (19:49 +0200)
committerZoltan Varga <vargaz@gmail.com>
Thu, 21 Jul 2016 17:49:26 +0000 (13:49 -0400)
commitd8d1fe64c14111dab63a99c3670115928dc6226b
tree7bf72c4d8aa7df3287a11bb7019ef6f3f564ceb2
parent635799108ea66412a1f80ae3cb82e8465198e773
[versions.mk] Make path to SUBMODULES.json based on srcdir (#3314)

Since acceptance-tests/Makefile (and llvm/Makefile) include scripts/submodules/versions.mk which evals versions.py which looks
for a SUBMODULES.json file in the current working directory we got confusing error messages if the build directory is not the src dir:

```
Traceback (most recent call last):
  File "../../mono/scripts/submodules/versions.py", line 22, in <module>
    submodules = json.load(open(CONFIG_FILE))
IOError: [Errno 2] No such file or directory: 'SUBMODULES.json'
```

Instead we now pass the path to SUBMODULES.json as a variable to versions.py and set it based on $(top_srcdir) so it works
even for out-of-tree builds.
.gitignore
acceptance-tests/versions.mk
llvm/Makefile.am
scripts/submodules/versions.mk
scripts/submodules/versions.py