#!/usr/bin/env zsh # Output all the files included by gcc when requiring some header files. emulate -LR zsh if [[ $# -eq 0 ]] then echo "Usage: gccheaders header_file | gcc_option ..." >&2 return 1 fi set -x printf '#include <%s>\n' "${@:#-*}" | \ "${CC:-gcc}" -H -E "${(M)@:#-*}" - 2>&1 >/dev/null # $Id: gccheaders 21379 2008-02-21 16:03:58Z lefevre $