substitute.sh 264 B

12345678910111213141516
  1. #!/bin/sh
  2. [ -n "$MAKE" ] || MAKE=make
  3. SED_COMMAND="sed -f `dirname $0`/substitutions.sed"
  4. SED_EXTRA=
  5. case $1 in
  6. *Makefile*.in)
  7. if ${MAKE} --version 2>&1 | fgrep -q "GNU Make"
  8. then
  9. SED_EXTRA="-e s/\$>/$^/g"
  10. fi
  11. ;;
  12. esac
  13. $SED_COMMAND $SED_EXTRA $1 > $2