Browse Source

use mkstructinfo no matter if test is enabled, but ignore the awk error

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@30 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.1
Xuefer 15 years ago
parent
commit
758e4255f9
  1. 5
      Makefile.frag
  2. 3
      config.m4
  3. 4
      config.w32

5
Makefile.frag

@ -10,9 +10,10 @@ $(XCACHE_INCLUDES_I): $(XCACHE_INCLUDES_SRC) $(srcdir)/xcache.h
$(CC) -I. -I$(srcdir) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -E $(XCACHE_INCLUDES_SRC) -o $(XCACHE_INCLUDES_I)
$(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/mkstructinfo.awk
$(AWK) -f $(srcdir)/mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT)
@echo $(XCACHE_STRUCTINFO_OUT) is optional if XCache test is not enabled, feel free if it awk failed to produce it
-$(AWK) -f $(srcdir)/mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT).tmp && mv -f $(XCACHE_STRUCTINFO_OUT).tmp $(XCACHE_STRUCTINFO_OUT)
$(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCTINFO) $(XCACHE_PROC_SOURCES)
$(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCTINFO_OUT) $(XCACHE_PROC_SOURCES)
$(M4) -D srcdir="$(srcdir)" -D builddir="$(builddir)" $(XCACHE_ENABLE_TEST) -E $(XCACHE_PROC_SRC) > $(XCACHE_PROC_OUT).tmp
mv -f $(XCACHE_PROC_OUT).tmp $(XCACHE_PROC_OUT)

3
config.m4

@ -44,13 +44,10 @@ if test "$PHP_XCACHE" != "no"; then
if test "$PHP_XCACHE_TEST" != "no"; then
XCACHE_ENABLE_TEST=-DXCACHE_ENABLE_TEST
AC_DEFINE([HAVE_XCACHE_TEST], 1, [Define to enable XCache self test])
XCACHE_STRUCTINFO='$(XCACHE_STRUCTINFO_OUT)'
else
XCACHE_ENABLE_TEST=
XCACHE_STRUCTINFO=
fi
PHP_SUBST([XCACHE_ENABLE_TEST])
PHP_SUBST([XCACHE_STRUCTINFO])
AC_PATH_PROGS([AWK], [gawk awk])
PHP_SUBST([AWK])

4
config.w32

@ -91,6 +91,8 @@ if (PHP_XCACHE != "no") {
frag = frag.replace(/.*\$\(CC\).* -E (.*) -o (.*)/, ccrule + " /E $1 > $2");
frag = frag.replace(/ -o /g, " /Fo");
frag = frag.replace(/mv -f /g, "move ");
frag = frag.replace(/ || /g, "\r\n\tif errorlevel 1 ");
frag = frag.replace(/ && /g, "\r\n\tif not errorlevel 1 ");
if (indent == '') {
frag = frag.replace(/\| +\$\(XCACHE_INDENT\)/, '');
frag = frag.replace(/\$\(XCACHE_INDENT\) < /, 'type ');
@ -103,11 +105,9 @@ if (PHP_XCACHE != "no") {
if (PHP_XCACHE_TEST != "no") {
ADD_FLAG("XCACHE_ENABLE_TEST", "-DXCACHE_ENABLE_TEST");
AC_DEFINE("HAVE_XCACHE_TEST", 1, "Define to enable XCache self test");
ADD_FLAG("XCACHE_STRUCTINFO", "$(XCACHE_STRUCTINFO_OUT)");
}
else {
ADD_FLAG("XCACHE_ENABLE_TEST", "");
ADD_FLAG("XCACHE_STRUCTINFO", "");
}
XCACHE_PROC_SOURCES=glob(srcdir + "\\processor\\*.m4").join(' ');

Loading…
Cancel
Save