Files
OpenNetworkLinux/setup.env
Jeffrey Townsend 67c67470d2 Add a post-merge githook to invalidate the local module manifest.
The Builder module manifest is generated once from the local tree if its missing.
When new code is merged from a remote the manifest must be regenerated in order to
reference and build the new libraries.

At setup time a post-merge hook is now added to the local repository to clear the
module manifest after merging.
2016-04-11 17:14:57 +00:00

47 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
############################################################
#
# The settings in this script are required
# and should be sourced into you local build shell.
#
############################################################
# The root of the ONL build tree is here
export ONL=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
# The ONL package dir is here:
export ONLPM_OPTION_PACKAGEDIRS="$ONL/packages:$ONL/builds"
# The ONL repo dir is here:
export ONLPM_OPTION_REPO="$ONL/REPO"
# The ONL build tools should be included in the local path:
export PATH="$ONL/tools/scripts:$ONL/tools:$PATH"
# Parallel Make Jobs
# Default parallel build settings
export ONL_MAKE_PARALLEL=-j16
# Version files
$ONL/tools/make-versions.py --import-file=$ONL/tools/onlvi --class-name=OnlVersionImplementation --output-dir $ONL/make
# Make version values available in the package environment
export ONLPM_OPTION_INCLUDE_ENV_JSON="$ONL/make/version-onl.json"
#
# buildroot download mirror. We suggest you setup a local repository containing these contents for faster local builds.
#
export BUILDROOTMIRROR=${BUILDROOTMIRROR:-"https://raw.githubusercontent.com/opennetworklinux/buildroot-download-cache/master/dl"}
# These submodules are required for almost everything.
$ONL/tools/submodules.py $ONL sm/infra
$ONL/tools/submodules.py $ONL sm/bigcode
# Export the current debian suite
export ONL_DEBIAN_SUITE=$(lsb_release -c -s)
# Enable local post-merge githook
if [ ! -f $ONL/.git/hooks/post-merge ]; then
cp $ONL/tools/scripts/post-merge.hook $ONL/.git/hooks/post-merge
fi