mkfixinc.sh 652 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. powerpc-*-eabisim* | \
  15. powerpc-*-eabi* | \
  16. powerpc-*-rtems* | \
  17. powerpcle-*-eabisim* | \
  18. powerpcle-*-eabi* | \
  19. *-*-vxworks7* | \
  20. *-musl* )
  21. # IF there is no include fixing,
  22. # THEN create a no-op fixer and exit
  23. (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
  24. ;;
  25. *)
  26. cat < ${srcdir}/fixinc.in > ${target} || exit 1
  27. ;;
  28. esac
  29. chmod 755 ${target}