docs: Update macos doc to clang-format

Type: docs

Change-Id: Ibf825ac8b1591e8109be0b3b8d56ee85ae5145a4
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
This commit is contained in:
Nathan Skrzypczak
2021-01-26 11:49:03 +01:00
committed by Ole Tr�an
parent d5a3380c65
commit 452cd7e3be

View File

@ -13,17 +13,14 @@ This is a first attempt to support Cross compilation of VPP on MacOS for develop
.. code-block:: console
$ pip3 install ply pyyaml jsonschema
$ brew install diffutils gnu-sed pkg-config ninja crosstool-ng
$ brew install gnu-sed pkg-config ninja crosstool-ng
* You'll also need to install ``gnu-ident 2.2.11`` to be able to ``make checkstyle``. This can be done with :ref:`this doc<install_indent_2_2_11>`
* You'll also need to install ``clang-format 10.0.0`` to be able to ``make checkstyle``. This can be done with :ref:`this doc<install_clang_format_10_0_0>`
* You should link the binaries to make them available in your path with their original names e.g. :
.. code-block:: console
$ ln -s $(which gsed) /usr/local/bin/sed
$ ln -s $(which gindent) /usr/local/bin/indent
$ ln -s /usr/local/Cellar/diffutils/3.7/bin/diff /usr/local/bin/diff
**Setup**
@ -54,19 +51,20 @@ This should build vpp on MacOS
Good luck :)
.. _install_indent_2_2_11 :
.. _install_clang_format_10_0_0 :
Installing indent 2.2.11
------------------------
Installing clang-format 10.0.0
------------------------------
In order to install indent on macos :
In order to install clang-format on macos :
.. code-block:: bash
$ wget http://mirror.sergal.org/gnu/indent/indent-2.2.11.tar.gz
$ tar -xzvf indent-2.2.11.tar.gz
$ cd indent-2.2.11
$ ./configure --disable-dependency-tracking --disable-debug --program-prefix=g --prefix=/usr/local/Cellar/gnu-indent/2.2.11
$ wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang-10.0.0.src.tar.xz
$ tar -xvf clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz
$ mv clang+llvm-10.0.0-x86_64-apple-darwin /usr/local/Cellar/
$ sudo ln -s ../Cellar/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-format /usr/local/bin/clang-format
$ sudo ln -s ../Cellar/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-format /usr/local/bin/clang-format-10
$ sudo ln -s ../Cellar/clang+llvm-10.0.0-x86_64-apple-darwin/share/clang/clang-format-diff.py /usr/local/bin/clang-format-diff-10
Install will exit with an error code, but indent 2.2.11 will still be installed in ``/usr/local/bin/gindent``
Other mirrors can be found on the `GNU website <https://www.gnu.org/prep/ftp.html>`_
Source `Clang website <https://releases.llvm.org/download.html#git>`_