Changeset 1473


Ignore:
Timestamp:
2013-11-13T05:53:37+01:00 (5 months ago)
Author:
moo
Message:

processor: avoid using srcdir dstdir marco for m4

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.frag

    r1274 r1473  
    1212$(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/gen_structinfo.awk 
    1313    @echo $(XCACHE_STRUCTINFO_OUT) is optional if XCache test is not enabled, feel free if it awk failed to produce it 
    14     -$(XCACHE_AWK) -f $(srcdir)/gen_structinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT).tmp && mv $(XCACHE_STRUCTINFO_OUT).tmp $(XCACHE_STRUCTINFO_OUT) 
     14    $(XCACHE_AWK) -f $(srcdir)/gen_structinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT).tmp || echo > $(XCACHE_STRUCTINFO_OUT) 
     15    mv $(XCACHE_STRUCTINFO_OUT).tmp $(XCACHE_STRUCTINFO_OUT) 
    1516 
    1617$(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCTINFO_OUT) $(XCACHE_PROC_SOURCES) 
    17     $(M4) -D srcdir=$(XCACHE_BACKTICK)"$(srcdir)'" -D builddir=$(XCACHE_BACKTICK)"$(builddir)'" $(XCACHE_ENABLE_TEST) $(XCACHE_PROC_SRC) > $(XCACHE_PROC_OUT).tmp 
     18    $(M4) $(XCACHE_ENABLE_TEST) $(XCACHE_STRUCTINFO_OUT) $(XCACHE_PROC_SRC) > $(XCACHE_PROC_OUT).tmp 
    1819    mv $(XCACHE_PROC_OUT).tmp $(XCACHE_PROC_OUT) 
    1920 
  • trunk/config.m4

    r1414 r1473  
    110110  fi 
    111111  PHP_SUBST([M4]) 
    112   XCACHE_BACKTICK="'"'`'"'" 
    113   PHP_SUBST([XCACHE_BACKTICK]) 
    114112  AC_PATH_PROGS([GREP], [grep]) 
    115113  PHP_SUBST([GREP]) 
  • trunk/config.w32

    r1418 r1473  
    7171        } 
    7272    } 
    73     DEFINE("XCACHE_BACKTICK", "`") 
    7473    PATH_PROG("gawk", null, "XCACHE_AWK") || PATH_PROG("awk", null, "XCACHE_AWK"); 
    7574 
     
    135134    frag = frag.replace(/cp /g, "copy "); 
    136135    frag = frag.replace(/mv /g, "move "); 
    137     frag = frag.replace(/ \|\| /g, "\r\n\tif errorlevel 1 "); 
    138     frag = frag.replace(/ && /g, "\r\n\tif not errorlevel 1 "); 
    139136    if (indent == '') { 
    140137        frag = frag.replace(/\| *\$\(XCACHE_INDENT\)/g, ''); 
  • trunk/processor/head.m4

    r1469 r1473  
    5353ifdef(`DEBUG_SIZE', `static int xc_totalsize = 0;') 
    5454 
    55 sinclude(builddir`/structinfo.m4') 
    56  
    5755#ifndef NDEBUG 
    5856#   undef inline 
  • trunk/processor/main.m4

    r1472 r1473  
    1717define(`m4_len', defn(`len')) 
    1818undefine(`len') 
     19') 
     20define(`dirof', `patsubst(`$1', `[/\\][^/\\]*$', `')') 
     21ifdef(`__dir__', `', ` 
     22define(`__dir__', `dirof(__file__)') 
    1923') 
    2024define(`XCACHE_STRS', `($1), (sizeof($1))') 
     
    249253EXPORT_PROCESSOR(`dprint', `zval') 
    250254 
    251 include(srcdir`/processor/hashtable.m4') 
    252 include(srcdir`/processor/string.m4') 
    253 include(srcdir`/processor/struct.m4') 
    254 include(srcdir`/processor/process.m4') 
    255 include(srcdir`/processor/head.m4') 
    256  
    257 REDEF(`PROCESSOR_TYPE', `calc') include(srcdir`/processor/processor.m4') 
     255include(__dir__`/hashtable.m4') 
     256include(__dir__`/string.m4') 
     257include(__dir__`/struct.m4') 
     258include(__dir__`/process.m4') 
     259include(__dir__`/head.m4') 
     260 
     261REDEF(`PROCESSOR_TYPE', `calc') include(__dir__`/processor.m4') 
    258262 
    259263pushdef(`RELOCATE_EX', `$2 = ptradd($1 *, notnullable($2), processor->relocatediff);') 
    260 REDEF(`PROCESSOR_TYPE', `store') include(srcdir`/processor/processor.m4') 
     264REDEF(`PROCESSOR_TYPE', `store') include(__dir__`/processor.m4') 
    261265popdef(`RELOCATE_EX') 
    262266 
    263 REDEF(`PROCESSOR_TYPE', `restore') include(srcdir`/processor/processor.m4') 
     267REDEF(`PROCESSOR_TYPE', `restore') include(__dir__`/processor.m4') 
    264268 
    265269pushdef(`PTR_FROM_VIRTUAL_EX', `ptradd($1 *, notnullable($2), ptrdiff)') 
    266270pushdef(`RELOCATE_EX', `$2 = ptradd($1 *, notnullable($2), relocatediff);') 
    267271pushdef(`SRC', defn(`DST')) 
    268 REDEF(`PROCESSOR_TYPE', `relocate') include(srcdir`/processor/processor.m4') 
     272REDEF(`PROCESSOR_TYPE', `relocate') include(__dir__`/processor.m4') 
    269273popdef(`SRC') 
    270274popdef(`RELOCATE_EX') 
     
    272276 
    273277#ifdef HAVE_XCACHE_DPRINT 
    274 REDEF(`PROCESSOR_TYPE', `dprint') include(srcdir`/processor/processor.m4') 
     278REDEF(`PROCESSOR_TYPE', `dprint') include(__dir__`/processor.m4') 
    275279#endif /* HAVE_XCACHE_DPRINT */ 
    276280#ifdef HAVE_XCACHE_DISASSEMBLER 
    277 REDEF(`PROCESSOR_TYPE', `dasm') include(srcdir`/processor/processor.m4') 
     281REDEF(`PROCESSOR_TYPE', `dasm') include(__dir__`/processor.m4') 
    278282#endif /* HAVE_XCACHE_DISASSEMBLER */ 
    279283 
    280284undefine(`PROCESSOR_TYPE') 
    281285 
    282 include(srcdir`/processor/foot.m4') 
     286include(__dir__`/foot.m4') 
    283287 
    284288ifdef(`EXIT_PENDING', `m4exit(EXIT_PENDING)') 
  • trunk/processor/processor.m4

    r1471 r1473  
    913913    dnl zend_cv.m4 is illegal to be made public, don not ask me for it 
    914914    IFDASM(` 
    915         sinclude(srcdir`/processor/zend_cv.m4') 
     915        sinclude(__dir__`/zend_cv.m4') 
    916916        ') 
    917917#endif 
Note: See TracChangeset for help on using the changeset viewer.