headers.sh 477 B

1234567891011121314151617181920212223242526272829
  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. *)
  19. if [ -d ${srctree}/arch/${arch} ]; then
  20. do_command $1 ${arch}
  21. fi
  22. ;;
  23. esac
  24. done