Jan Kundrát | 5c6fbb7 | 2017-10-27 13:31:06 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if git rev-parse &> /dev/null; then |
| 4 | echo "Error: run this from a new build directory, not from within a git repo" |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | # Configure the local.mk with path to the individual repositories |
| 9 | CZECHLIGHT_BR2_EXT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| 10 | cat > local.mk <<EOF |
Jan Kundrát | a4fbff2 | 2019-03-01 11:03:21 +0100 | [diff] [blame] | 11 | DOCOPT_CPP_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/docopt.cpp |
| 12 | SPDLOG_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/spdlog |
| 13 | REPLXX_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/replxx |
Jan Kundrát | c901db0 | 2019-10-30 15:01:23 +0100 | [diff] [blame] | 14 | CPPCODEC_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/cppcodec |
Jan Kundrát | a4fbff2 | 2019-03-01 11:03:21 +0100 | [diff] [blame] | 15 | LIBYANG_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/libyang |
| 16 | SYSREPO_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/sysrepo |
| 17 | LIBNETCONF2_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/libnetconf2 |
| 18 | NETOPEER2_KEYSTORED_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/Netopeer2 |
| 19 | NETOPEER2_SERVER_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/Netopeer2 |
| 20 | NETOPEER2_CLI_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/dependencies/Netopeer2 |
Jan Kundrát | 5c6fbb7 | 2017-10-27 13:31:06 +0200 | [diff] [blame] | 21 | CLA_SYSREPO_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo |
Jan Kundrát | a4fbff2 | 2019-03-01 11:03:21 +0100 | [diff] [blame] | 22 | NETCONF_CLI_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/netconf-cli |
Jan Kundrát | 623bf87 | 2019-10-23 18:37:36 +0200 | [diff] [blame] | 23 | GAMMARUS_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/gammarus |
Jan Kundrát | 8248695 | 2020-01-21 14:51:09 +0100 | [diff] [blame] | 24 | PYBIND11_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/pybind11 |
Jan Kundrát | 7a9d8b0 | 2020-02-05 23:03:00 +0100 | [diff] [blame] | 25 | |
| 26 | define CZECHLIGHT_GIT_FIX_GITDIR |
| 27 | echo "gitdir: \$\$(git rev-parse --resolve-git-dir \$(SRCDIR)/.git)" > \$(@D)/.git |
| 28 | endef |
| 29 | CLA_SYSREPO_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR |
| 30 | NETCONF_CLI_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR |
| 31 | GAMMARUS_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR |
| 32 | |
Jan Kundrát | 5c6fbb7 | 2017-10-27 13:31:06 +0200 | [diff] [blame] | 33 | EOF |
| 34 | |
| 35 | # We have to run make first so that the proxy Makefile is created and the BR2_EXTERNAL is remembered |
| 36 | make O=$PWD -C ${CZECHLIGHT_BR2_EXT_LOC}/submodules/buildroot BR2_EXTERNAL=${CZECHLIGHT_BR2_EXT_LOC} outputmakefile |