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