source: trunk/Makefile.frag @ 215

Last change on this file since 215 was 215, checked in by moo, 8 years ago

script that help to run php test cases

File size: 2.3 KB
Line 
1XCACHE_PROC_SRC=$(srcdir)/processor/main.m4
2XCACHE_PROC_OUT=$(builddir)/processor.out
3XCACHE_PROC_C=$(builddir)/processor_real.c
4XCACHE_PROC_H=$(builddir)/processor.h
5XCACHE_INCLUDES_SRC=$(srcdir)/includes.c
6XCACHE_INCLUDES_I=$(builddir)/includes.i
7XCACHE_STRUCTINFO_OUT=$(builddir)/structinfo.m4
8
9$(XCACHE_INCLUDES_I): $(XCACHE_INCLUDES_SRC) $(srcdir)/xcache.h
10    $(CC) -I. -I$(srcdir) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -E $(XCACHE_INCLUDES_SRC) -o $(XCACHE_INCLUDES_I)
11
12$(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/mkstructinfo.awk
13    @echo $(XCACHE_STRUCTINFO_OUT) is optional if XCache test is not enabled, feel free if it awk failed to produce it
14    -$(AWK) -f $(srcdir)/mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT).tmp && mv -f $(XCACHE_STRUCTINFO_OUT).tmp $(XCACHE_STRUCTINFO_OUT)
15
16$(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCTINFO_OUT) $(XCACHE_PROC_SOURCES)
17    $(M4) -D srcdir="$(srcdir)" -D builddir="$(builddir)" $(XCACHE_ENABLE_TEST) $(XCACHE_PROC_SRC) > $(XCACHE_PROC_OUT).tmp
18    mv -f $(XCACHE_PROC_OUT).tmp $(XCACHE_PROC_OUT)
19
20$(XCACHE_PROC_H): $(XCACHE_PROC_OUT)
21    $(GREP) 'export: ' $(XCACHE_PROC_OUT) | $(SED) 's/.*export:\(.*\):export.*/\1/g' | $(XCACHE_INDENT) > $(XCACHE_PROC_H).tmp
22    mv -f $(XCACHE_PROC_H).tmp $(XCACHE_PROC_H)
23
24$(XCACHE_PROC_C): $(XCACHE_PROC_OUT) $(XCACHE_PROC_H)
25    $(XCACHE_INDENT) < $(XCACHE_PROC_OUT) > $(XCACHE_PROC_C).tmp
26    mv -f $(XCACHE_PROC_C).tmp $(XCACHE_PROC_C)
27
28$(builddir)/processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) $(srcdir)/processor.c
29processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) $(srcdir)/processor.c
30
31$(builddir)/disassembler.lo: $(XCACHE_PROC_H) $(srcdir)/processor.c
32disassembler.lo: $(XCACHE_PROC_H) $(srcdir)/processor.c
33
34$(builddir)/xcache.lo: $(XCACHE_PROC_H) $(srcdir)/xc_shm.h $(srcdir)/stack.h $(srcdir)/xcache_globals.h $(srcdir)/xcache.c $(srcdir)/foreachcoresig.h
35xcache.lo: $(XCACHE_PROC_H) $(srcdir)/xc_shm.h $(srcdir)/stack.h $(srcdir)/xcache_globals.h $(srcdir)/xcache.c $(srcdir)/foreachcoresig.h
36
37xcachesvnclean: clean
38    cat $(srcdir)/.cvsignore | grep -v Makefile | xargs rm -rf
39
40xcachetest:
41    TEST_PHP_SRCDIR=$(top_srcdir) \
42    CC="$(CC)" \
43        $(srcdir)/run-xcachetest -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS) -c xcache-test.ini
Note: See TracBrowser for help on using the repository browser.