headers.sh 530 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. # Run headers_$1 command for all suitable architectures
  3. # Stop on error
  4. set -e
  5. do_command()
  6. {
  7. if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
  8. make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
  9. else
  10. printf "Ignoring arch: %s\n" ${arch}
  11. fi
  12. }
  13. archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)}
  14. for arch in ${archs}; do
  15. case ${arch} in
  16. um) # no userspace export
  17. ;;
  18. cris) # headers export are known broken
  19. ;;
  20. *)
  21. if [ -d ${srctree}/arch/${arch} ]; then
  22. do_command $1 ${arch}
  23. fi
  24. ;;
  25. esac
  26. done