makerelease.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. #
  3. # This script exists primarily to document some of the
  4. # steps needed when building an "official libarchive distribution".
  5. # Feel free to hack it up as necessary to adjust to the peculiarities
  6. # of a particular build environment.
  7. #
  8. PATH=/usr/local/gnu-autotools/bin/:$PATH
  9. export PATH
  10. # Start from one level above the build directory
  11. if [ -f version ]; then
  12. cd ..
  13. fi
  14. if [ \! -f build/version ]; then
  15. echo "Can't find source directory"
  16. exit 1
  17. fi
  18. # BSD make's "OBJDIR" support freaks out the automake-generated
  19. # Makefile. Effectively disable it.
  20. export MAKEOBJDIRPREFIX=/junk
  21. set -ex
  22. #
  23. # Scrub the local tree before running the build tests below.
  24. #
  25. /bin/sh build/clean.sh
  26. #
  27. # Verify the CMake-generated build
  28. #
  29. mkdir -p _cmtest
  30. cd _cmtest
  31. cmake ..
  32. make
  33. make test
  34. cd ..
  35. rm -rf _cmtest
  36. # TODO: Build distribution using cmake
  37. #
  38. # Construct and verify the autoconf build system
  39. #
  40. export MAKE_LIBARCHIVE_RELEASE="1"
  41. /bin/sh build/autogen.sh
  42. # Get the newest config.guess/config.sub from savannah.gnu.org
  43. curl 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' > build/autoconf/config.guess
  44. curl 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' > build/autoconf/config.sub
  45. ./configure
  46. make distcheck
  47. make dist-zip