diff options
author | midipix <writeonce@midipix.org> | 2015-10-28 00:09:40 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-10 23:35:23 -0500 |
commit | 92e39b26fa901193ca392b332401debe026ef5c1 (patch) | |
tree | 1b0768d4d40af3c9e9c2bdd1b94b722e7a1b607a /sysinfo | |
parent | afc8efbc127c28e996fd77f1dc4b388afb08b7fe (diff) | |
download | perk-92e39b26fa901193ca392b332401debe026ef5c1.tar.bz2 perk-92e39b26fa901193ca392b332401debe026ef5c1.tar.xz |
build system: remove dependency on compiler support of the --include switch.
Diffstat (limited to 'sysinfo')
-rwxr-xr-x | sysinfo/host/host.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sysinfo/host/host.sh b/sysinfo/host/host.sh index 2d1439e..5d963c9 100755 --- a/sysinfo/host/host.sh +++ b/sysinfo/host/host.sh @@ -27,19 +27,19 @@ host_endian_h() rm -f "$mb_hdrdir"/$mb_header # portable - $mb_compiler $mb_cflags \ - --include=$mb_header -E - < /dev/null > /dev/null 2>/dev/null \ + printf "#include <$mb_header>" | $mb_compiler $mb_cflags \ + -E - > /dev/null 2>/dev/null \ && return 0 # non-portable mb_hosthdr= - [ -z $mb_hosthdr ] && $mb_compiler $mb_cflags \ - --include='sys/'$mb_header -E - < /dev/null > /dev/null 2>/dev/null \ + [ -z $mb_hosthdr ] && printf "#include <sys/$mb_header>" | $mb_compiler $mb_cflags \ + -E - > /dev/null 2>/dev/null \ && mb_hosthdr='sys/'$mb_header - [ -z $mb_hosthdr ] && $mb_compiler $mb_cflags \ - --include='machine/'$mb_header -E - < /dev/null > /dev/null 2>/dev/null \ + [ -z $mb_hosthdr ] && printf "#include <machine/$mb_header>" | $mb_compiler $mb_cflags \ + -E - > /dev/null 2>/dev/null \ && mb_hosthdr='machine/'$mb_header if [ x"$mb_hosthdr" = x ]; then |