1
0
Fork 0

refactor: fix build for optimizer, use mod_* directories

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1003 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2012-07-19 06:51:33 +00:00
parent dd7e0168dc
commit 5c0dfec523
48 changed files with 28 additions and 16 deletions

6
README
View File

@ -1 +1,5 @@
Please check http://xcache.lighttpd.net/ and https://groups.google.com/forum/?fromgroups#!forum/xcache for help
XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load.
It is tested (on linux) and supported on all of the latest version of PHP popular release branches.
ThreadSafe/Windows is also perfectly supported.
Please check http://xcache.lighttpd.net/ and https://groups.google.com/group/xcache for help

View File

@ -4,7 +4,7 @@ AC_DEFUN([XCACHE_MODULE], [
PHP_ARG_ENABLE(xcache-$1, for XCache $1,
[ --enable-xcache-$2 XCache: $4], no, no)
if test "$PHP_$3" != "no"; then
xcache_sources="$xcache_sources submodules/xc_$1.c"
xcache_sources="$xcache_sources mod_$1/xc_$1.c"
XCACHE_MODULES="$XCACHE_MODULES $1"
HAVE_$3=1
AC_DEFINE([HAVE_$3], 1, [Define for XCache: $4])

View File

@ -44,7 +44,7 @@ if (PHP_XCACHE != "no") {
var uname = name.toUpperCase();
var withval = eval("PHP_XCACHE_" + uname);
if (withval != "no") {
xcache_sources += " submodules/xc_" + name + ".c";
xcache_sources += " mod_" + name + "/xc_" + name + ".c";
XCACHE_MODULES += " " + name;
STDOUT.WriteLine("Enabling XCache Module: " + name);
AC_DEFINE("HAVE_XCACHE_" + uname, 1, "Define for XCache: " + name)

View File

@ -80,7 +80,13 @@ reb*)
export PATH=$PHPDIRS/$phpbasename/bin:$PATH
phpize --clean \
&& phpize \
&& CFLAGS="-Wall -Wno-unused -W -Wshadow -std=gnu99" ./configure --enable-xcache-disassembler --enable-xcache-test --enable-xcache-constant \
&& CFLAGS="-Wall -Wno-unused -W -Wshadow -std=gnu99" ./configure \
--enable-xcache-cacher \
--enable-xcache-optimizer \
--enable-xcache-encoder \
--enable-xcache-decoder \
--enable-xcache-disassembler \
--enable-xcache-test --enable-xcache-constant \
&& make clean all
exit
;;
@ -134,10 +140,10 @@ val*)
tracer=(valgrind --gen-suppressions=all)
;;
dc)
exec ./php-cli -c devel.ini ./bin/phpdc.phpr "${args[@]}" | tee decompiled.php
exec ./php-cli -c devel.ini ./mod_disassembler/bin/phpdc.phpr "${args[@]}" | tee decompiled.php
;;
dop)
exec ./php-cli -c devel.ini ./bin/phpdop.phpr "${args[@]}"
exec ./php-cli -c devel.ini ./mod_disassembler/bin/phpdop.phpr "${args[@]}"
;;
retest)
exec make xcachetest "$@" TESTS="`grep '^/.*\.phpt$' php_test_results_*.txt | uniq | xargs`"

View File

@ -2,15 +2,17 @@
# define XCACHE_DEBUG
#endif
#include "utils.h"
#include "optimizer.h"
#include "xcache/xc_utils.h"
#include "xc_optimizer.h"
/* the "vector" stack */
#include "stack.h"
#include "util/xc_stack.h"
#include "util/xc_trace.h"
#include "xcache_globals.h"
#ifdef XCACHE_DEBUG
# include "processor.h"
# include "const_string.h"
#error 1
# include "xc_processor.h"
# include "xcache/xc_const_string.h"
# include "ext/standard/php_var.h"
#endif

View File

@ -28,17 +28,17 @@
#endif
#ifdef HAVE_XCACHE_OPTIMIZER
# include "submodules/xc_optimizer.h"
# include "mod_optimizer/xc_optimizer.h"
#else
# define XCACHE_OPTIMIZER_FUNCTIONS()
#endif
#ifdef HAVE_XCACHE_COVERAGER
# include "submodules/xc_coverager.h"
# include "mod_coverager/xc_coverager.h"
#else
# define XCACHE_COVERAGER_FUNCTIONS()
#endif
#ifdef HAVE_XCACHE_DISASSEMBLER
# include "submodules/xc_disassembler.h"
# include "mod_disassembler/xc_disassembler.h"
#else
# define XCACHE_DISASSEMBLER_FUNCTIONS()
#endif

View File

@ -1 +1 @@
#include "../xc_processor.c.h"
#include "xc_processor.c.h"

View File

@ -6,7 +6,7 @@
#include "zend_vm.h"
#endif
#include "xc_opcode_spec.h"
#include "../util/xc_trace.h"
#include "util/xc_trace.h"
#ifndef max
#define max(a, b) ((a) < (b) ? (b) : (a))