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 | |
| 5 | # Cleanup |
| 6 | sudo ./waf distclean -j1 --color=yes |
| 7 | |
| 8 | COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" ) |
| 9 | |
| 10 | sudo rm -Rf /usr/local/include/ndn-cxx |
| 11 | sudo rm -f /usr/local/lib/libndn-cxx* |
| 12 | sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx* |
| 13 | |
| 14 | # Configure |
| 15 | CXXFLAGS="-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 |
| 22 | sudo ./waf -j1 --color=yes install |
| 23 | sudo ldconfig || true |