build 952 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. distdir=/var/tmp/dist/[% project %]
  4. mkdir -p /var/tmp/dist
  5. tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
  6. export PATH="/var/tmp/dist/cmake/bin:$PATH"
  7. mkdir -p /var/tmp/build
  8. cd /var/tmp/build
  9. tar -xf $rootdir/[% c('input_files_by_name/llvm') %]
  10. tar -xf $rootdir/[% c('input_files_by_name/cfe') %]
  11. tar -xf $rootdir/[% c('input_files_by_name/libcxx') %]
  12. tar -xf $rootdir/[% c('input_files_by_name/libcxxabi') %]
  13. mv cfe-* clang
  14. mv libcxx-* libcxx
  15. mv libcxxabi-* libcxxabi
  16. mv clang llvm-*/tools
  17. mv libcxx llvm-*/projects
  18. mv libcxxabi llvm-*/projects
  19. cd llvm-*
  20. export LLVM_HOME=$(pwd)
  21. mkdir build
  22. cd build
  23. cmake .. -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$distdir -DCMAKE_BUILD_TYPE:STRING=Release $LLVM_HOME
  24. make -j[% c("buildconf/num_procs") %]
  25. make install
  26. cd /var/tmp/dist
  27. [% c('tar', {
  28. tar_src => [ project ],
  29. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  30. }) %]