blob: 24e76e114ad40bee97c6e00ad1a9d57e84a4a2f5 [file] [log] [blame]
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04001#!/usr/bin/env bash
2set -x
Alexander Afanasyev33ce4c32014-10-24 11:19:45 -07003set -e
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04004
5# Cleanup
6sudo ./waf distclean -j1 --color=yes
7
8COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" )
9
10sudo rm -Rf /usr/local/include/ndn-cxx
11sudo rm -f /usr/local/lib/libndn-cxx*
12sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
13
14# Configure
15CXXFLAGS="-std=c++03 -pedantic -Wall -Wno-long-long -O2 -g -Werror" \
16 ./waf -j1 configure --color=yes --with-tests --without-pch $COVERAGE
17
18# Build
19./waf --color=yes -j1
20
21# Install
22sudo ./waf -j1 --color=yes install
23sudo ldconfig || true