From 396433d0da721951e6e7abc02dc3b2f682495154 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 18 Dec 2008 18:49:47 -0800 Subject: [PATCH] Fix sdksyms.sh to work with Solaris/Sun compiler builds - Pass $(CPP) & $(AWK) settings from configure to sdksyms.sh - Only reset sdk variable (tracks if header is part of sdk) if a filename is included on the cpp # line, since Sun compilers omit filename when it is unchanged from previous line. --- hw/xfree86/loader/Makefile.am | 2 +- hw/xfree86/loader/sdksyms.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am index 19c7dabe3..8732a490a 100644 --- a/hw/xfree86/loader/Makefile.am +++ b/hw/xfree86/loader/Makefile.am @@ -24,4 +24,4 @@ libloader_la_SOURCES = \ CLEANFILES = sdksyms.c sdksyms.c: sdksyms.sh - $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) + CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh index 55f7206f2..05760106a 100755 --- a/hw/xfree86/loader/sdksyms.sh +++ b/hw/xfree86/loader/sdksyms.sh @@ -324,7 +324,7 @@ topdir=$1 shift LC_ALL=C export LC_ALL -cpp -DXorgLoader $@ sdksyms.c | awk -v topdir=$topdir ' +${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir ' BEGIN { sdk = 0; print("/*"); @@ -334,7 +334,7 @@ BEGIN { printf("/* topdir=%s */\n", topdir); print("_X_HIDDEN void *xorg_symbols[] = {"); } -/^# [0-9]+/ { +/^# [0-9]+ "/ { # Process text after a include in a relative path or when the # processed file has a basename matching $top_srcdir. # Note that indexing starts at 1; 0 means no match, and there