summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Luke <chrisy@flirble.org>2016-09-22 20:52:26 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2016-09-23 07:52:28 +0000
commit36d25063828f65a6e864bc56b488bef3c4abcaa4 (patch)
tree2b98ad600a6eaf33eb74d5424b24f8b08d8e4d17
parentb1136586a094f867f9bf2f3d76af2694026c78c8 (diff)
Enable doc building on MacOS
Simple tweak to the Makefiles to allow "make doxygen" to work natively on Macs - assuming the appropriate things have been installed first, which it tests for. Change-Id: I1a3e72759d533270a0512de38595c3bc3f71dee0 Signed-off-by: Chris Luke <chrisy@flirble.org>
-rw-r--r--Makefile3
-rw-r--r--doxygen/Makefile26
2 files changed, 28 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b3bd8d3c906..59f14e3ee76 100644
--- a/Makefile
+++ b/Makefile
@@ -24,8 +24,11 @@ GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
#
# OS Detection
#
+# We allow Darwin (MacOS) for docs generation; VPP build will still fail.
+ifneq ($(shell uname),Darwin)
OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+endif
DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache
DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd
diff --git a/doxygen/Makefile b/doxygen/Makefile
index 97225f3cd57..7031e84d523 100644
--- a/doxygen/Makefile
+++ b/doxygen/Makefile
@@ -23,11 +23,20 @@ all: doxygen
# These should be passed in by the root Makefile
WS_ROOT ?= $(CURDIR)/..
BR ?= $(WS_ROOT)/build-root
+
+# We support MacOS for docs generation
+ifeq ($(shell uname),Darwin)
+OS_ID = darwin
+endif
+
+# Work out the OS if we haven't already
OS_ID ?= $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
# Package dependencies
DOC_DEB_DEPENDS = doxygen graphviz python-pyparsing python-jinja2
DOC_RPM_DEPENDS = doxygen graphviz pyparsing python-jinja2
+DOC_MAC_BIN_DEPENDS = doxygen dot git
+DOC_MAC_PY_DEPENDS = pyparsing jinja2
# Doxygen configuration and our utility scripts
DOXY_DIR ?= $(WS_ROOT)/doxygen
@@ -130,8 +139,23 @@ ifeq ($(OS_ID),ubuntu)
fi
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo yum install $(CONFIRM) $(DOC_RPM_DEPENDS)
+else ifeq ($(OS_ID),darwin)
+ @set -e; \
+ for bin in $(DOC_MAC_BIN_DEPENDS); do \
+ which -s $${bin} || (\
+ echo "Program '$${bin}' not found, please install it."; \
+ false; \
+ ); \
+ done
+ @set -e; \
+ for py in $(DOC_MAC_PY_DEPENDS); do \
+ python -c "import $${py}" >/dev/null 2>&1 || (\
+ echo "Python package '$${py}' not found, please install it."; \
+ false; \
+ ); \
+ done
else
- $(error "This option currently works only on Ubuntu or Centos systems")
+ $(error "Building documentation currently works only on Ubuntu, CentOS or MacOS systems.")
endif
@touch $@
.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2015 Cisco and/or its affiliates.
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at:

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>io.fd.honeycomb.common</groupId>
        <artifactId>impl-parent</artifactId>
        <version>1.16.12-SNAPSHOT</version>
        <relativePath>../../common/impl-parent</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>io.fd.honeycomb</groupId>
    <artifactId>translate-api</artifactId>
    <name>${project.artifactId}</name>
    <version>1.16.12-SNAPSHOT</version>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-api</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>