source: trunk/devel/prepare.mak @ 1095

Last change on this file since 1095 was 1095, checked in by moo, 2 years ago

prepare is now a Makefile

File size: 2.8 KB
RevLine 
[1095]1CTAGS=$(shell which ctags 2>/dev/null || which exuberant-ctags 2>/dev/null)
2AWK=$(shell which gawk 2>/dev/null || which awk 2>/dev/null)
3
4include devel/prepare.cfg
5
6.PHONY: dummy
7.PHONY: all
8all: xcache/xc_opcode_spec_def.h xc_const_string tags
9
10.PHONY: clean
11clean: clean_xc_const_string
12    rm -f tags xcache/xc_opcode_spec_def.h
13
14.PHONY: clean_xc_const_string
15clean_xc_const_string:
16    rm -f xcache/xc_const_string_opcodes_php*.h
17
18.PHONY: xc_const_string
19xc_const_string: \
20    xcache/xc_const_string_opcodes_php4.x.h \
21    xcache/xc_const_string_opcodes_php5.0.h \
22    xcache/xc_const_string_opcodes_php5.1.h \
23    xcache/xc_const_string_opcodes_php5.3.h \
24    xcache/xc_const_string_opcodes_php5.4.h \
25    xcache/xc_const_string_opcodes_php6.x.h
26
27ifeq (${EA_DIR},)
28xcache/xc_opcode_spec_def.h: dummy
29    @echo "Skipped $@: EA_DIR not set"
30else
31xcache/xc_opcode_spec_def.h: ${EA_DIR}/opcodes.c
32    $(AWK) -f ./devel/gen_xc_opcode_spec.awk < "$<" > "$@".tmp
33    mv "$@".tmp "$@"
34endif
35
36ifeq (${PHP4_x_DIR},)
37xcache/xc_const_string_opcodes_php4.x.h: dummy
38    @echo "Skipped $@: PHP_4_x_DIR not set"
39else
40xcache/xc_const_string_opcodes_php4.x.h: ${PHP4_x_DIR}/Zend/zend_compile.h
41    $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
42    mv "$@.tmp" "$@"
43endif
44
45ifeq (${PHP5_0_DIR},)
46xcache/xc_const_string_opcodes_php5.0.h: dummy
47    @echo "Skipped $@: PHP_5_0_DIR not set"
48else
49xcache/xc_const_string_opcodes_php5.0.h: ${PHP5_0_DIR}/Zend/zend_compile.h
50    $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
51    mv "$@.tmp" "$@"
52endif
53
54ifeq (${PHP5_1_DIR},)
55xcache/xc_const_string_opcodes_php5.1.h: dummy
56    @echo "Skipped $@: PHP_5_1_DIR not set"
57else
58xcache/xc_const_string_opcodes_php5.1.h: ${PHP5_1_DIR}/Zend/zend_vm_def.h
59    $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
60    mv "$@.tmp" "$@"
61endif
62
63ifeq (${PHP5_3_DIR},)
64xcache/xc_const_string_opcodes_php5.3.h: dummy
65    @echo "Skipped $@: PHP_5_3_DIR not set"
66else
67xcache/xc_const_string_opcodes_php5.3.h: ${PHP5_3_DIR}/Zend/zend_vm_def.h
68    $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
69    mv "$@.tmp" "$@"
70endif
71
72ifeq (${PHP5_4_DIR},)
73xcache/xc_const_string_opcodes_php5.4.h: dummy
74    @echo "Skipped $@: PHP_5_4_DIR not set"
75else
76xcache/xc_const_string_opcodes_php5.4.h: ${PHP5_4_DIR}/Zend/zend_vm_def.h
77    $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
78    mv "$@.tmp" "$@"
79endif
80
81ifeq (${PHP6_x_DIR},)
82xcache/xc_const_string_opcodes_php6.x.h: dummy
83    @echo "Skipped $@: PHP_6_x_DIR not set"
84else
85xcache/xc_const_string_opcodes_php6.x.h: ${PHP6_x_DIR}/Zend/zend_vm_def.h
86    $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
87    mv "$@.tmp" "$@"
88endif
89
90ifeq (${PHP_DEVEL_DIR},)
91tags:
92    echo "* Making tags without php source files"
93    "$(CTAGS)" -R .
94else
95tags:
96    echo "* Making tags with ${PHP_DEVEL_DIR}"
97    "$(CTAGS)" -R . "${PHP_DEVEL_DIR}/main" "${PHP_DEVEL_DIR}/Zend" "${PHP_DEVEL_DIR}/TSRM" "${PHP_DEVEL_DIR}/ext/standard"
98endif
Note: See TracBrowser for help on using the repository browser.