Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Alexander Afanasyev | 33ce4c3 | 2014-10-24 11:19:45 -0700 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 4 | |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 7 | |
| 8 | sudo rm -Rf /usr/local/include/ndn-cxx |
| 9 | sudo rm -f /usr/local/lib/libndn-cxx* |
| 10 | sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx* |
| 11 | |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 12 | # Cleanup |
| 13 | sudo ./waf -j1 --color=yes distclean |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 14 | |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 15 | # Configure/build static library in debug mode with precompiled headers |
| 16 | ./waf -j1 --color=yes configure --enable-static --disable-shared --with-tests --debug |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 17 | ./waf -j1 --color=yes build |
| 18 | |
| 19 | # Cleanup |
| 20 | sudo ./waf -j1 --color=yes distclean |
| 21 | |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 22 | # Configure/build static and shared library in optimized mode without tests with precompiled headers |
| 23 | ./waf -j1 --color=yes configure --enable-shared --enable-static |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 24 | ./waf -j1 --color=yes build |
| 25 | |
| 26 | # Cleanup |
| 27 | sudo ./waf -j1 --color=yes distclean |
| 28 | |
Joao Pereira | 2096e18 | 2015-07-20 12:09:25 -0400 | [diff] [blame] | 29 | # Configure/build shared library in debug mode with examples without precompiled headers |
Alexander Afanasyev | 1884694 | 2015-08-18 23:17:15 -0700 | [diff] [blame] | 30 | if [[ "$JOB_NAME" == *"code-coverage" ]]; then |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 31 | COVERAGE="--with-coverage" |
| 32 | fi |
Joao Pereira | 2096e18 | 2015-07-20 12:09:25 -0400 | [diff] [blame] | 33 | ./waf -j1 --color=yes configure --debug --enable-shared --disable-static --with-tests --without-pch --with-examples $COVERAGE |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 34 | ./waf -j1 --color=yes build |
| 35 | |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 36 | # (tests will be run against debug version) |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 37 | |
| 38 | # Install |
| 39 | sudo ./waf -j1 --color=yes install |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 40 | |
| 41 | if has Linux $NODE_LABELS; then |
| 42 | sudo ldconfig |
| 43 | elif has FreeBSD $NODE_LABELS; then |
| 44 | sudo ldconfig -a |
| 45 | fi |