headers.sh 575 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 archheaders
  9. make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
  10. else
  11. printf "Ignoring arch: %s\n" ${arch}
  12. fi
  13. }
  14. archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)}
  15. for arch in ${archs}; do
  16. case ${arch} in
  17. um) # no userspace export
  18. ;;
  19. cris) # headers export are known broken
  20. ;;
  21. *)
  22. if [ -d ${srctree}/arch/${arch} ]; then
  23. do_command $1 ${arch}
  24. fi
  25. ;;
  26. esac
  27. done