#! /bin/bash

set -e
set -x

export CC=gcc-${USE_SYSTEM_GCC_VERSION}
export CXX=g++-${USE_SYSTEM_GCC_VERSION}


mkdir bazel-install
BAZEL_PREFIX=$PWD/bazel-install

wget https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-installer-linux-x86_64.sh
chmod +x bazel-0.29.1-installer-linux-x86_64.sh
./bazel-0.29.1-installer-linux-x86_64.sh --prefix=$BAZEL_PREFIX

export PATH=$BAZEL_PREFIX/bin:$PATH


bazel build -c opt --cxxopt='-std=c++17' //...

install -D bazel-bin/verilog/tools/syntax/verilog_syntax $PREFIX/bin/verilog_syntax

#! /bin/bash

set -e
set -x

export CC=gcc-${USE_SYSTEM_GCC_VERSION}
export CXX=g++-${USE_SYSTEM_GCC_VERSION}


mkdir bazel-install
BAZEL_PREFIX=$PWD/bazel-install

wget https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-installer-linux-x86_64.sh
chmod +x bazel-0.29.1-installer-linux-x86_64.sh
./bazel-0.29.1-installer-linux-x86_64.sh --prefix=$BAZEL_PREFIX

export PATH=$BAZEL_PREFIX/bin:$PATH

bazel run :install -c opt -- $PREFIX/bin


Use the bazel install target to install verible related tools.
Use the bazel install target to install verible related tools.

This will install not only verilog_syntax as it is now, but also
the linter and formatter. Even if not directly needed in our immediate
use-case (for sv-tests), it is useful to have these complete.

Signed-off-by: Henner Zeller <259ad50fabbfd39355f36ecd6c0afca541ea66ef@acm.org>
