librarian.sh 363 B

12345678910111213141516171819
  1. #! /bin/sh
  2. #
  3. # Build static libraries, hiding (some) ickiness from the makefile
  4. ACTION=$1; shift
  5. LIBRARY=$1; shift
  6. VERSION=$1; shift
  7. case "$ACTION" in
  8. make) /usr/bin/ar crv $LIBRARY.a "$@"
  9. /usr/bin/ranlib $LIBRARY.a
  10. rm -f $LIBRARY
  11. /bin/ln -s $LIBRARY.a $LIBRARY
  12. ;;
  13. files) echo "${LIBRARY}.a"
  14. ;;
  15. install)/usr/bin/install -m 644 ${LIBRARY}.a $1
  16. ;;
  17. esac