Browse Source

do not depends on mkstructinfo.awk if test is not enabled

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@22 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.1
Xuefer 15 years ago
parent
commit
768c007dee
  1. 8
      Makefile.frag
  2. 7
      config.m4
  3. 2
      config.w32

8
Makefile.frag

@ -4,15 +4,15 @@ XCACHE_PROC_C=$(builddir)/processor_real.c
XCACHE_PROC_H=$(builddir)/processor.h
XCACHE_INCLUDES_SRC=$(srcdir)/includes.c
XCACHE_INCLUDES_I=$(builddir)/includes.i
XCACHE_STRUCT_OUT=$(builddir)/structinfo.m4
XCACHE_STRUCTINFO_OUT=$(builddir)/structinfo.m4
$(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_STRUCT_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/mkstructinfo.awk
$(AWK) -f $(srcdir)/mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCT_OUT)
$(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/mkstructinfo.awk
$(AWK) -W posix -f $(srcdir)/mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT)
$(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCT_OUT) $(XCACHE_PROC_SOURCES)
$(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCTINFO) $(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)

7
config.m4

@ -41,15 +41,22 @@ 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])
AC_PATH_PROGS([M4], [m4])
PHP_SUBST([M4])
AC_PATH_PROGS([GREP], [grep])
PHP_SUBST([GREP])
AC_PATH_PROGS([SED], [sed])
PHP_SUBST([SED])
AC_PATH_PROGS([INDENT], [indent cat])
case $INDENT in

2
config.w32

@ -100,9 +100,11 @@ 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