mkfixinc.sh 638 B

123456789101112131415161718192021222324252627282930313233
  1. #! /bin/sh
  2. if [ $# -ne 1 ]
  3. then
  4. echo "Usage: $0 <target-mach-triplet>"
  5. exit 1
  6. fi
  7. machine=$1
  8. target=fixinc.sh
  9. # Check for special fix rules for particular targets
  10. case $machine in
  11. i?86-*-cygwin* | \
  12. i?86-*-mingw32* | \
  13. x86_64-*-mingw32* | \
  14. i?86-*-interix* | \
  15. powerpc-*-eabisim* | \
  16. powerpc-*-eabi* | \
  17. powerpc-*-rtems* | \
  18. powerpcle-*-eabisim* | \
  19. powerpcle-*-eabi* )
  20. # IF there is no include fixing,
  21. # THEN create a no-op fixer and exit
  22. (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
  23. ;;
  24. *)
  25. cat < ${srcdir}/fixinc.in > ${target} || exit 1
  26. ;;
  27. esac
  28. chmod 755 ${target}