From 92e39b26fa901193ca392b332401debe026ef5c1 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 28 Oct 2015 00:09:40 -0400 Subject: build system: remove dependency on compiler support of the --include switch. --- sysinfo/host/host.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sysinfo') 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 " | $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 " | $mb_compiler $mb_cflags \ + -E - > /dev/null 2>/dev/null \ && mb_hosthdr='machine/'$mb_header if [ x"$mb_hosthdr" = x ]; then -- cgit v1.2.3