summaryrefslogtreecommitdiff
path: root/processor
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2013-11-13 04:53:37 +0000
committerXuefer <xuefer@gmail.com>2013-11-13 04:53:37 +0000
commit8f51668e2ecd35f1c6be18797315673a97c96761 (patch)
treead212fa6fc7809f37dd67273df294f01229de709 /processor
parentba88593733c55a94c08a38f1b032f4e981732afa (diff)
downloadxcache-8f51668e2ecd35f1c6be18797315673a97c96761.tar.gz
xcache-8f51668e2ecd35f1c6be18797315673a97c96761.zip
processor: avoid using srcdir dstdir marco for m4
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1473 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'processor')
-rw-r--r--processor/head.m42
-rw-r--r--processor/main.m428
-rw-r--r--processor/processor.m42
3 files changed, 17 insertions, 15 deletions
diff --git a/processor/head.m4 b/processor/head.m4
index f22839f..5bd88cf 100644
--- a/processor/head.m4
+++ b/processor/head.m4
@@ -52,8 +52,6 @@ m4_errprint(`AUTOCHECK INFO: runtime autocheck Disabled (optimized build)')
')
ifdef(`DEBUG_SIZE', `static int xc_totalsize = 0;')
-sinclude(builddir`/structinfo.m4')
-
#ifndef NDEBUG
# undef inline
#define inline
diff --git a/processor/main.m4 b/processor/main.m4
index 3a91abd..7b7c43b 100644
--- a/processor/main.m4
+++ b/processor/main.m4
@@ -17,6 +17,10 @@ ifdef(`len', `
define(`m4_len', defn(`len'))
undefine(`len')
')
+define(`dirof', `patsubst(`$1', `[/\\][^/\\]*$', `')')
+ifdef(`__dir__', `', `
+define(`__dir__', `dirof(__file__)')
+')
define(`XCACHE_STRS', `($1), (sizeof($1))')
define(`XCACHE_STRL', `($1), (sizeof($1) - 1)')
define(`SRC', `ifelse(`$1', `', `src', `src->$1')')
@@ -248,37 +252,37 @@ EXPORT_PROCESSOR(`dasm', `zend_function')
EXPORT_PROCESSOR(`dasm', `zend_class_entry')
EXPORT_PROCESSOR(`dprint', `zval')
-include(srcdir`/processor/hashtable.m4')
-include(srcdir`/processor/string.m4')
-include(srcdir`/processor/struct.m4')
-include(srcdir`/processor/process.m4')
-include(srcdir`/processor/head.m4')
+include(__dir__`/hashtable.m4')
+include(__dir__`/string.m4')
+include(__dir__`/struct.m4')
+include(__dir__`/process.m4')
+include(__dir__`/head.m4')
-REDEF(`PROCESSOR_TYPE', `calc') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `calc') include(__dir__`/processor.m4')
pushdef(`RELOCATE_EX', `$2 = ptradd($1 *, notnullable($2), processor->relocatediff);')
-REDEF(`PROCESSOR_TYPE', `store') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `store') include(__dir__`/processor.m4')
popdef(`RELOCATE_EX')
-REDEF(`PROCESSOR_TYPE', `restore') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `restore') include(__dir__`/processor.m4')
pushdef(`PTR_FROM_VIRTUAL_EX', `ptradd($1 *, notnullable($2), ptrdiff)')
pushdef(`RELOCATE_EX', `$2 = ptradd($1 *, notnullable($2), relocatediff);')
pushdef(`SRC', defn(`DST'))
-REDEF(`PROCESSOR_TYPE', `relocate') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `relocate') include(__dir__`/processor.m4')
popdef(`SRC')
popdef(`RELOCATE_EX')
popdef(`PTR_FROM_VIRTUAL_EX')
#ifdef HAVE_XCACHE_DPRINT
-REDEF(`PROCESSOR_TYPE', `dprint') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `dprint') include(__dir__`/processor.m4')
#endif /* HAVE_XCACHE_DPRINT */
#ifdef HAVE_XCACHE_DISASSEMBLER
-REDEF(`PROCESSOR_TYPE', `dasm') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `dasm') include(__dir__`/processor.m4')
#endif /* HAVE_XCACHE_DISASSEMBLER */
undefine(`PROCESSOR_TYPE')
-include(srcdir`/processor/foot.m4')
+include(__dir__`/foot.m4')
ifdef(`EXIT_PENDING', `m4exit(EXIT_PENDING)')
diff --git a/processor/processor.m4 b/processor/processor.m4
index e483d78..9eaedb4 100644
--- a/processor/processor.m4
+++ b/processor/processor.m4
@@ -912,7 +912,7 @@ DEF_STRUCT_P_FUNC(`zend_op_array', , `dnl {{{
#else
dnl zend_cv.m4 is illegal to be made public, don not ask me for it
IFDASM(`
- sinclude(srcdir`/processor/zend_cv.m4')
+ sinclude(__dir__`/zend_cv.m4')
')
#endif