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-no> <filename> line,
   since Sun compilers omit filename when it is unchanged from
   previous line.
This commit is contained in:
Alan Coopersmith 2008-12-18 18:49:47 -08:00
parent aea6f19f25
commit 396433d0da
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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