XCache is a fast, stable PHP opcode cacher that has been proven and is now running on production servers under high load. https://xcache.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
4.5 KiB

  1. CTAGS=$(shell which ctags 2>/dev/null || which exuberant-ctags 2>/dev/null)
  2. AWK=$(shell which gawk 2>/dev/null || which awk 2>/dev/null)
  3. include devel/prepare.cfg
  4. .PHONY: dummy
  5. .PHONY: all
  6. all: xcache/xc_opcode_spec_def.h xc_const_string tags po
  7. .PHONY: clean
  8. clean: clean_xc_const_string clean_po
  9. rm -f tags xcache/xc_opcode_spec_def.h
  10. .PHONY: clean_xc_const_string
  11. clean_xc_const_string:
  12. rm -f xcache/xc_const_string_opcodes_php*.h
  13. .PHONY: xc_const_string
  14. xc_const_string: \
  15. xcache/xc_const_string_opcodes_php4.x.h \
  16. xcache/xc_const_string_opcodes_php5.0.h \
  17. xcache/xc_const_string_opcodes_php5.1.h \
  18. xcache/xc_const_string_opcodes_php5.2.h \
  19. xcache/xc_const_string_opcodes_php5.3.h \
  20. xcache/xc_const_string_opcodes_php5.4.h \
  21. xcache/xc_const_string_opcodes_php5.5.h \
  22. xcache/xc_const_string_opcodes_php6.x.h
  23. ifeq (${EA_DIR},)
  24. xcache/xc_opcode_spec_def.h: dummy
  25. @echo "Skipped $@: EA_DIR not set"
  26. else
  27. xcache/xc_opcode_spec_def.h: ${EA_DIR}/opcodes.c
  28. $(AWK) -f ./devel/gen_xc_opcode_spec.awk < "$<" > "$@".tmp
  29. mv "$@".tmp "$@"
  30. endif
  31. ifeq (${PHP4_x_DIR},)
  32. xcache/xc_const_string_opcodes_php4.x.h: dummy
  33. @echo "Skipped $@: PHP_4_x_DIR not set"
  34. else
  35. xcache/xc_const_string_opcodes_php4.x.h: ${PHP4_x_DIR}/Zend/zend_compile.h
  36. $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
  37. mv "$@.tmp" "$@"
  38. endif
  39. ifeq (${PHP5_0_DIR},)
  40. xcache/xc_const_string_opcodes_php5.0.h: dummy
  41. @echo "Skipped $@: PHP_5_0_DIR not set"
  42. else
  43. xcache/xc_const_string_opcodes_php5.0.h: ${PHP5_0_DIR}/Zend/zend_compile.h
  44. $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
  45. mv "$@.tmp" "$@"
  46. endif
  47. ifeq (${PHP5_1_DIR},)
  48. xcache/xc_const_string_opcodes_php5.1.h: dummy
  49. @echo "Skipped $@: PHP_5_1_DIR not set"
  50. else
  51. xcache/xc_const_string_opcodes_php5.1.h: ${PHP5_1_DIR}/Zend/zend_vm_def.h
  52. $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
  53. mv "$@.tmp" "$@"
  54. endif
  55. ifeq (${PHP5_2_DIR},)
  56. xcache/xc_const_string_opcodes_php5.2.h: dummy
  57. @echo "Skipped $@: PHP_5_2_DIR not set"
  58. else
  59. xcache/xc_const_string_opcodes_php5.2.h: ${PHP5_2_DIR}/Zend/zend_vm_def.h
  60. $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
  61. mv "$@.tmp" "$@"
  62. endif
  63. ifeq (${PHP5_3_DIR},)
  64. xcache/xc_const_string_opcodes_php5.3.h: dummy
  65. @echo "Skipped $@: PHP_5_3_DIR not set"
  66. else
  67. xcache/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" "$@"
  70. endif
  71. ifeq (${PHP5_4_DIR},)
  72. xcache/xc_const_string_opcodes_php5.4.h: dummy
  73. @echo "Skipped $@: PHP_5_4_DIR not set"
  74. else
  75. xcache/xc_const_string_opcodes_php5.4.h: ${PHP5_4_DIR}/Zend/zend_vm_def.h
  76. $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
  77. mv "$@.tmp" "$@"
  78. endif
  79. ifeq (${PHP5_5_DIR},)
  80. xcache/xc_const_string_opcodes_php5.5.h: dummy
  81. @echo "Skipped $@: PHP_5_5_DIR not set"
  82. else
  83. xcache/xc_const_string_opcodes_php5.5.h: ${PHP5_5_DIR}/Zend/zend_vm_def.h
  84. $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
  85. mv "$@.tmp" "$@"
  86. endif
  87. ifeq (${PHP6_x_DIR},)
  88. xcache/xc_const_string_opcodes_php6.x.h: dummy
  89. @echo "Skipped $@: PHP_6_x_DIR not set"
  90. else
  91. xcache/xc_const_string_opcodes_php6.x.h: ${PHP6_x_DIR}/Zend/zend_vm_def.h
  92. $(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
  93. mv "$@.tmp" "$@"
  94. endif
  95. ifeq (${PHP_DEVEL_DIR},)
  96. tags:
  97. @echo "* Making tags without php source files"
  98. "$(CTAGS)" -R .
  99. else
  100. tags:
  101. @echo "* Making tags with ${PHP_DEVEL_DIR}"
  102. "$(CTAGS)" -R . "${PHP_DEVEL_DIR}/main" "${PHP_DEVEL_DIR}/Zend" "${PHP_DEVEL_DIR}/TSRM" "${PHP_DEVEL_DIR}/ext/standard"
  103. endif
  104. .PHONY: po
  105. define htdocspo
  106. po: \
  107. htdocs/$(1)/lang/en.po \
  108. htdocs/$(1)/lang/en.po-merged \
  109. htdocs/$(1)/lang/zh-simplified.po-merged \
  110. htdocs/$(1)/lang/zh-simplified.po \
  111. htdocs/$(1)/lang/zh-traditional.po \
  112. htdocs/$(1)/lang/zh-traditional.po-merged
  113. htdocs/$(1)/lang/%.po-merged: htdocs/$(1)/lang/%.po htdocs/$(1)/lang/$(1).pot
  114. msgmerge -o "$$@".tmp $$^
  115. mv "$$@".tmp "$$@"
  116. htdocs/$(1)/lang/%.po:
  117. touch "$$@"
  118. htdocs/$(1)/lang/$(1).pot:
  119. xgettext --keyword=_T --keyword=N_ --from-code=UTF-8 -F -D htdocs/$(1)/ $$(subst htdocs/$(1)/,,$$^) -o "$$@".tmp
  120. mv "$$@".tmp "$$@"
  121. htdocs/$(1)/lang/$(1).pot: $(shell find htdocs/$(1) -type f | grep php | grep -v lang | grep -v config | grep -vF .swp)
  122. endef
  123. $(eval $(call htdocspo,cacher))
  124. $(eval $(call htdocspo,common))
  125. $(eval $(call htdocspo,coverager))
  126. $(eval $(call htdocspo,diagnosis))
  127. .PHONY: clean_po
  128. clean_po: clean_pot
  129. rm -f htdocs/*/lang/*.po-merged
  130. .PHONY: clean_pot
  131. clean_pot:
  132. rm -f htdocs/*/lang/*.pot