blob: 59ed40adc6b9cccd6e27005ecd5ae5106b5c8eaf [file] [log] [blame]
Jan Kundrát5c6fbb72017-10-27 13:31:06 +02001#!/bin/bash
2
Václav Kubernát767ac402022-01-11 10:52:34 +01003if [[ "$(git rev-parse --show-toplevel 2> /dev/null)" = "$(dirname -- "${BASH_SOURCE[0]}")" ]]; then
Václav Kubernát4531aa62022-01-05 10:29:31 +01004 echo "Error: run this from a new build directory, not from within the br2-external git repo"
Jan Kundrát5c6fbb72017-10-27 13:31:06 +02005 exit 1
6fi
7
8# Configure the local.mk with path to the individual repositories
9CZECHLIGHT_BR2_EXT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
10cat > local.mk <<EOF
Jan Kundrát32ca34f2022-03-23 19:40:44 +010011REPLXX_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/replxx
Jan Kundrát32ca34f2022-03-23 19:40:44 +010012SDBUS_CPP_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/sdbus-cpp
Jan Kundrát2f100fc2020-11-02 22:10:16 +010013
Jan Kundrát32ca34f2022-03-23 19:40:44 +010014LIBYANG_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/libyang
15LIBYANG_CPP_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/libyang-cpp
16SYSREPO_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/sysrepo
17SYSREPO_CPP_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/sysrepo-cpp
Jan Kundrát2f100fc2020-11-02 22:10:16 +010018HOST_SYSREPO_POST_RSYNC_HOOKS += HOST_SYSREPO_PATCH_USE_FAKE_DEV_SHM
Jan Kundrát32ca34f2022-03-23 19:40:44 +010019LIBNETCONF2_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/libnetconf2
Jan Kundrát337f3372022-03-28 16:07:21 +020020LIBNETCONF2_CPP_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/libnetconf2-cpp
Jan Kundrát32ca34f2022-03-23 19:40:44 +010021NETOPEER2_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/dependencies/Netopeer2
Jan Kundrát2f100fc2020-11-02 22:10:16 +010022
Jan Kundrát5c6fbb72017-10-27 13:31:06 +020023CLA_SYSREPO_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo
Jan Kundráta4fbff22019-03-01 11:03:21 +010024NETCONF_CLI_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/netconf-cli
Jan Kundrát623bf872019-10-23 18:37:36 +020025GAMMARUS_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/gammarus
Tomáš Peckac5897502020-07-13 16:49:28 +020026VELIA_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/velia
Jan Kundrát02cbb812021-03-02 10:13:35 +010027ROUSETTE_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/rousette
Tomáš Pecka742c7ec2022-10-03 13:49:57 +020028SYSREPO_IETF_ALARMS_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/sysrepo-ietf-alarms
Jan Kundrát7a9d8b02020-02-05 23:03:00 +010029
30define CZECHLIGHT_GIT_FIX_GITDIR
31 echo "gitdir: \$\$(git rev-parse --resolve-git-dir \$(SRCDIR)/.git)" > \$(@D)/.git
32endef
Jan Kundrátb0b2dc52024-01-16 12:37:09 +010033CZECHLIGHT_HACK_GIT_DIR = GIT_DIR=.git
Jan Kundrát7a9d8b02020-02-05 23:03:00 +010034CLA_SYSREPO_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR
Jan Kundrátb0b2dc52024-01-16 12:37:09 +010035CLA_SYSREPO_BUILD_ENV += \$(CZECHLIGHT_HACK_GIT_DIR)
Jan Kundrát7a9d8b02020-02-05 23:03:00 +010036NETCONF_CLI_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR
Jan Kundrátb0b2dc52024-01-16 12:37:09 +010037NETCONF_CLI_BUILD_ENV += \$(CZECHLIGHT_HACK_GIT_DIR)
Jan Kundrát7a9d8b02020-02-05 23:03:00 +010038GAMMARUS_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR
Jan Kundrátb0b2dc52024-01-16 12:37:09 +010039GAMMARUS_BUILD_ENV += \$(CZECHLIGHT_HACK_GIT_DIR)
Tomáš Peckac5897502020-07-13 16:49:28 +020040VELIA_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR
Jan Kundrátb0b2dc52024-01-16 12:37:09 +010041VELIA_BUILD_ENV += \$(CZECHLIGHT_HACK_GIT_DIR)
Jan Kundrát02cbb812021-03-02 10:13:35 +010042ROUSETTE_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR
Jan Kundrátb0b2dc52024-01-16 12:37:09 +010043ROUSETTE_BUILD_ENV += \$(CZECHLIGHT_HACK_GIT_DIR)
Tomáš Pecka742c7ec2022-10-03 13:49:57 +020044SYSREPO_IETF_ALARMS_POST_RSYNC_HOOKS += CZECHLIGHT_GIT_FIX_GITDIR
Jan Kundrátb0b2dc52024-01-16 12:37:09 +010045SYSREPO_IETF_ALARMS_BUILD_ENV += \$(CZECHLIGHT_HACK_GIT_DIR)
Jan Kundrát7a9d8b02020-02-05 23:03:00 +010046
Jan Kundrát5c6fbb72017-10-27 13:31:06 +020047EOF
48
49# We have to run make first so that the proxy Makefile is created and the BR2_EXTERNAL is remembered
50make O=$PWD -C ${CZECHLIGHT_BR2_EXT_LOC}/submodules/buildroot BR2_EXTERNAL=${CZECHLIGHT_BR2_EXT_LOC} outputmakefile