Simple Makefile target helper https://pagure.io/mkit

make 688B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # mkit - simple install helper
  3. # See LICENSE file for copyright and license details.
  4. die() {
  5. echo "$@" && exit 9
  6. }
  7. export MKIT_VERSION=0.0.6+dirty
  8. export MKIT_DIR=${MKIT_DIR:-$(dirname "$0")}
  9. export MKIT_LOCAL=${MKIT_LOCAL:-.mkit}
  10. export MKIT_DRY=${MKIT_DRY:-false}
  11. export MKIT_DEFAULT_DESTDIR=${MKIT_DEFAULT_DESTDIR:-/}
  12. export MKIT_DEBUG=${MKIT_DEBUG:-false}
  13. . "$MKIT_DIR/include/mkit.sh" || die "failed to init; check if MKIT_DIR is set properly: $MKIT_DIR"
  14. case "$1" in
  15. --version-semver) echo "$MKIT_VERSION"; exit 0 ;;
  16. --version) echo "Mkit (Simple Makefile target helper) $MKIT_VERSION"
  17. exit 0 ;;
  18. esac
  19. mkit_init
  20. route "$@"