- Location:
- /trunk
- Files:
-
- 2 edited
-
make.devel (modified) (1 diff)
-
xcache.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
/trunk/make.devel
r1 r3 1 #!/usr/bin/make -if 2 # vim:syntax=make 3 SELF=MAKELEVEL=0 ./make.devel 1 #!/bin/bash 4 2 5 # You should copy make.inc from make.inc.default 6 include make.inc 3 if test -e make.inc ; then 4 . make.inc 5 else 6 echo make.inc is required, see make.inc.example >&2 7 exit 8 fi 7 9 8 all: opcode_spec_def const_string tags 10 CTAGS=`which ctags 2>/dev/null || which exuberant-ctags 2>/dev/null ` 11 AWK=`which gawk 2>/dev/null || which awk 2>/dev/null ` 9 12 10 clean: clean_const_string 13 make_all() { 14 make_opcode_spec_def.h 15 make_const_string 16 make_tags 17 } 18 19 make_clean() { 20 make_clean_const_string 21 echo "*" rm -f tags opcode_spec_def.h 11 22 rm -f tags opcode_spec_def.h 23 } 12 24 13 const_string: 14 @-$(SELF) const_string_opcodes_php4.x.h 15 @-$(SELF) const_string_opcodes_php5.0.h 16 @-$(SELF) const_string_opcodes_php5.1.h 17 @-$(SELF) const_string_opcodes_php6.x.h 25 make_const_string() { 26 make_const_string_opcodes_php4.x.h 27 make_const_string_opcodes_php5.0.h 28 make_const_string_opcodes_php5.1.h 29 make_const_string_opcodes_php6.x.h 30 } 18 31 19 clean_const_string: 20 rm -f const_string_opcodes_php4.x.h const_string_opcodes_php5.0.h const_string_opcodes_php5.1.h const_string_opcodes_php6.x.h 32 make_clean_const_string() { 33 echo "*" rm -f const_string_opcodes_php*.h 34 rm -f const_string_opcodes_php*.h 35 } 21 36 22 const_string_opcodes_php4.x.h: $(PHP4_x_DIR)/Zend/zend_compile.h 23 ./mkopcode.awk < $(PHP4_x_DIR)/Zend/zend_compile.h > const_string_opcodes_php4.x.h 37 make_const_string_opcodes_php4.x.h() { 38 precheck const_string_opcodes_php4.x.h "${PHP4_x_DIR}/Zend/zend_compile.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O" 39 } 24 40 25 const_string_opcodes_php5.0.h: $(PHP5_0_DIR)/Zend/zend_vm_def.h 26 ./mkopcode.awk < $(PHP5_0_DIR)/Zend/zend_vm_def.h > const_string_opcodes_php5.0.h 41 make_const_string_opcodes_php5.0.h() { 42 precheck const_string_opcodes_php5.0.h "${PHP5_0_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O" 43 } 27 44 28 const_string_opcodes_php5.1.h: $(PHP5_1_DIR)/Zend/zend_vm_def.h 29 ./mkopcode.awk < $(PHP5_1_DIR)/Zend/zend_vm_def.h > const_string_opcodes_php5.1.h 45 make_const_string_opcodes_php5.1.h() { 46 precheck const_string_opcodes_php5.1.h "${PHP5_1_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O" 47 } 30 48 31 const_string_opcodes_php6.x.h: $(PHP6_x_DIR)/Zend/zend_vm_def.h 32 ./mkopcode.awk < $(PHP6_x_DIR)/Zend/zend_vm_def.h > const_string_opcodes_php6.x.h 49 make_const_string_opcodes_php6.x.h() { 50 precheck const_string_opcodes_php6.x.h "${PHP6_x_DIR}/Zend/zend_vm_def.h" && "$AWK" -f ./mkopcode.awk < "$I" > "$O" 51 } 33 52 34 tags: 35 test -d $(PHP_DEVEL_DIR) && ctags -R . $(PHP_DEVEL_DIR)/main $(PHP_DEVEL_DIR)/Zend $(PHP_DEVEL_DIR)/TSRM $(PHP_DEVEL_DIR)/ext/standard || ctags -R . 53 make_opcode_spec_def.h() { 54 precheck "opcode_spec_def.h" "${EA_DIR}/opcodes.c" && "$AWK" -f ./mkopcode_spec.awk < "$I" > "$O" 55 } 36 56 37 opcode_spec_def: 38 @-$(SELF) opcode_spec_def.h 57 make_tags() { 58 if test -z "$CTAGS" ; then 59 echo ctags not found, skip building tags >&2 60 return 61 fi 39 62 40 opcode_spec_def.h: $(EA_DIR)/opcodes.c 41 ./mkopcode_spec.awk < $(EA_DIR)/opcodes.c > opcode_spec_def.h \ 63 if test -d "${PHP_DEVEL_DIR}" ; then 64 echo "* Making tags with ${PHP_DEVEL_DIR}" 65 "$CTAGS" -R . "${PHP_DEVEL_DIR}/main" "${PHP_DEVEL_DIR}/Zend" "${PHP_DEVEL_DIR}/TSRM" "${PHP_DEVEL_DIR}/ext/standard" 66 else 67 echo "* Making tags without php source files" 68 "$CTAGS" -R . 69 fi 70 } 42 71 43 .PHONY: const_string opcode_spec_def 72 error() { 73 echo "$@" >&2 74 } 75 76 precheck() { 77 if ! test -e "$2" ; then 78 error X skipping "$1" because "$2" not found 79 return 1 80 fi 81 if ! test "$1" -ot "$2" ; then 82 echo O "$1" is up to date. 83 return 1 84 fi 85 O="$1" 86 I="$2" 87 echo "* Making $1 from $2" 88 return 0 89 } 90 91 if test -z "$1" ; then 92 make_all 93 else 94 while ! test -z "$1" ; do 95 eval "make_$1" 96 shift 97 done 98 fi 99 -
/trunk/xcache.h
r1 r3 51 51 #define BUCKET_UKEY(b) (UNISW((b)->arKey, (b)->key.u.unicode)) 52 52 #define BUCKET_KEY_TYPE(b) (UNISW(0, (b)->key.type)) 53 #define BUCKET_HEAD_SIZE(b) XtOffsetOf(UNISW(sizeof((b)->arKey), sizeof((b)->key.u))) 53 #ifdef IS_UNICODE 54 # define BUCKET_HEAD_SIZE(b) XtOffsetOf(typeof(b[0]), key) 55 #else 56 # define BUCKET_HEAD_SIZE(b) XtOffsetOf(typeof(b[0]), arKey) 57 #endif 54 58 #define BUCKET_SIZE(b) (BUCKET_HEAD_SIZE(b) + BUCKET_KEY_SIZE(b)) 55 59
Note: See TracChangeset
for help on using the changeset viewer.

