Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Makefile for phpxmlrpc library
  2. # $Id: Makefile,v 1.37 2008/03/06 22:37:19 ggiunta Exp $
  3. ### USER EDITABLE VARS ###
  4. # path to PHP executable, preferably CLI version
  5. PHP=/usr/local/bin/php
  6. # path were xmlrpc lib files will be copied to
  7. PHPINCLUDEDIR=/usr/local/lib/php
  8. # mkdir is a thorny beast under windows: make sure we can not use the cmd version, running eg. "make MKDIR=mkdir.exe"
  9. MKDIR=mkdir
  10. #find too
  11. FIND=find
  12. #### DO NOT TOUCH FROM HERE ONWARDS ###
  13. # recover version number from code
  14. # thanks to Firman Pribadi for unix command line help
  15. # on unix shells lasts char should be \\2/g )
  16. export VERSION=$(shell egrep "\$GLOBALS *\[ *'xmlrpcVersion' *\] *= *'" lib/xmlrpc.inc | sed -r s/"(.*= *' *)([0-9a-zA-Z.-]+)(.*)"/\2/g )
  17. LIBFILES=lib/xmlrpc.inc lib/xmlrpcs.inc lib/xmlrpc_wrappers.inc
  18. EXTRAFILES=extras/test.pl \
  19. extras/test.py \
  20. extras/rsakey.pem \
  21. extras/workspace.testPhpServer.fttb
  22. DEMOFILES=demo/vardemo.php \
  23. demo/demo1.txt \
  24. demo/demo2.txt \
  25. demo/demo3.txt
  26. DEMOSFILES=demo/server/discuss.php \
  27. demo/server/server.php \
  28. demo/server/proxy.php
  29. DEMOCFILES=demo/client/agesort.php \
  30. demo/client/client.php \
  31. demo/client/comment.php \
  32. demo/client/introspect.php \
  33. demo/client/mail.php \
  34. demo/client/simple_call.php \
  35. demo/client/which.php \
  36. demo/client/wrap.php \
  37. demo/client/zopetest.php
  38. TESTFILES=test/testsuite.php \
  39. test/benchmark.php \
  40. test/parse_args.php \
  41. test/phpunit.php \
  42. test/verify_compat.php \
  43. test/PHPUnit/*.php
  44. INFOFILES=Changelog \
  45. Makefile \
  46. NEWS \
  47. README
  48. DEBUGGERFILES=debugger/index.php \
  49. debugger/action.php \
  50. debugger/common.php \
  51. debugger/controller.php
  52. all: install
  53. install:
  54. cd lib && cp ${LIBFILES} ${PHPINCLUDEDIR}
  55. @echo Lib files have been copied to ${PHPINCLUDEDIR}
  56. cd doc && $(MAKE) install
  57. test:
  58. cd test && ${PHP} -q testsuite.php
  59. ### the following targets are to be used for library development ###
  60. # make tag target: tag existing working copy as release in cvs.
  61. # todo: convert dots in underscore in $VERSION
  62. tag:
  63. cvs -q tag -p release_${VERSION}
  64. dist: xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
  65. xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz: ${LIBFILES} ${DEBUGGERFILES} ${INFOFILES} ${TESTFILES} ${EXTRAFILES} ${DEMOFILES} ${DEMOSFILES} ${DEMOCFILES}
  66. @echo ---${VERSION}---
  67. rm -rf xmlrpc-${VERSION}
  68. ${MKDIR} xmlrpc-${VERSION}
  69. ${MKDIR} xmlrpc-${VERSION}/demo
  70. ${MKDIR} xmlrpc-${VERSION}/demo/client
  71. ${MKDIR} xmlrpc-${VERSION}/demo/server
  72. ${MKDIR} xmlrpc-${VERSION}/test
  73. ${MKDIR} xmlrpc-${VERSION}/test/PHPUnit
  74. ${MKDIR} xmlrpc-${VERSION}/extras
  75. ${MKDIR} xmlrpc-${VERSION}/lib
  76. ${MKDIR} xmlrpc-${VERSION}/debugger
  77. cp --parents ${DEMOFILES} xmlrpc-${VERSION}
  78. cp --parents ${DEMOCFILES} xmlrpc-${VERSION}
  79. cp --parents ${DEMOSFILES} xmlrpc-${VERSION}
  80. cp --parents ${TESTFILES} xmlrpc-${VERSION}
  81. cp --parents ${EXTRAFILES} xmlrpc-${VERSION}
  82. cp --parents ${LIBFILES} xmlrpc-${VERSION}
  83. cp --parents ${DEBUGGERFILES} xmlrpc-${VERSION}
  84. cp ${INFOFILES} xmlrpc-${VERSION}
  85. cd doc && $(MAKE) dist
  86. # on unix shells last char should be \;
  87. ${FIND} xmlrpc-${VERSION} -type f ! -name "*.fttb" ! -name "*.pdf" ! -name "*.gif" -exec dos2unix {} ;
  88. -rm xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
  89. tar -cvf xmlrpc-${VERSION}.tar xmlrpc-${VERSION}
  90. gzip xmlrpc-${VERSION}.tar
  91. zip -r xmlrpc-${VERSION}.zip xmlrpc-${VERSION}
  92. doc:
  93. cd doc && $(MAKE) doc
  94. clean:
  95. rm -rf xmlrpc-${VERSION} xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
  96. cd doc && $(MAKE) clean