1 # Makefile for phpxmlrpc library
\r
3 ### USER EDITABLE VARS - can be passed as command-line options ###
\r
5 # path to PHP executable, preferably CLI version
\r
8 # path were xmlrpc lib files will be copied to
\r
9 PHPINCLUDEDIR=/usr/local/lib/php
\r
11 # mkdir is a thorny beast under windows: make sure we can not use the cmd version, running eg. "make MKDIR=mkdir.exe"
\r
19 #### DO NOT TOUCH FROM HERE ONWARDS ###
\r
21 # recover version number from code
\r
22 # thanks to Firman Pribadi for unix command line help
\r
23 # on unix shells lasts char should be \\2/g )
\r
24 export VERSION=$(shell grep -E "\$GLOBALS *\[ *'xmlrpcVersion' *\] *= *'" lib/xmlrpc.inc | sed -r s/"(.*= *' *)([0-9a-zA-Z.-]+)(.*)"/\2/g )
\r
26 LIBFILES=lib/xmlrpc.inc lib/xmlrpcs.inc lib/xmlrpc_wrappers.inc \
\r
27 src/*.php src/Helper/*.php
\r
29 EXTRAFILES=extras/test.pl \
\r
32 extras/workspace.testPhpServer.fttb
\r
34 DEMOFILES=demo/vardemo.php \
\r
39 DEMOSFILES=demo/server/discuss.php \
\r
40 demo/server/server.php \
\r
41 demo/server/proxy.php
\r
43 DEMOCFILES=demo/client/agesort.php \
\r
44 demo/client/client.php \
\r
45 demo/client/comment.php \
\r
46 demo/client/introspect.php \
\r
47 demo/client/mail.php \
\r
48 demo/client/simple_call.php \
\r
49 demo/client/which.php \
\r
50 demo/client/wrap.php \
\r
51 demo/client/zopetest.php
\r
53 TESTFILES=test/testsuite.php \
\r
54 tests/benchmark.php \
\r
55 tests/parse_args.php \
\r
56 test/InvalidHostTest.php \
\r
57 test/LocalHostTest.php \
\r
58 test/ParsingBugsTest.php \
\r
59 tests/verify_compat.php
\r
61 INFOFILES=Changelog \
\r
66 DEBUGGERFILES=debugger/index.php \
\r
67 debugger/action.php \
\r
68 debugger/common.php \
\r
69 debugger/controller.php
\r
75 cp ${LIBFILES} ${PHPINCLUDEDIR}
\r
76 @echo Lib files have been copied to ${PHPINCLUDEDIR}
\r
77 cd doc && $(MAKE) install
\r
80 cd test && ${PHP} -q testsuite.php
\r
83 ### the following targets are to be used for library development ###
\r
85 # make tag target: tag existing working copy as release in git.
\r
88 git push origin --tags
\r
90 dist: xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
\r
92 xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz: ${LIBFILES} ${DEBUGGERFILES} ${INFOFILES} ${TESTFILES} ${EXTRAFILES} ${DEMOFILES} ${DEMOSFILES} ${DEMOCFILES}
\r
93 @echo ---${VERSION}---
\r
94 rm -rf xmlrpc-${VERSION}
\r
95 ${MKDIR} xmlrpc-${VERSION}
\r
96 ${MKDIR} xmlrpc-${VERSION}/demo
\r
97 ${MKDIR} xmlrpc-${VERSION}/demo/client
\r
98 ${MKDIR} xmlrpc-${VERSION}/demo/server
\r
99 ${MKDIR} xmlrpc-${VERSION}/test
\r
100 ${MKDIR} xmlrpc-${VERSION}/test/PHPUnit
\r
101 ${MKDIR} xmlrpc-${VERSION}/extras
\r
102 ${MKDIR} xmlrpc-${VERSION}/lib
\r
103 ${MKDIR} xmlrpc-${VERSION}/debugger
\r
104 cp --parents ${DEMOFILES} xmlrpc-${VERSION}
\r
105 cp --parents ${DEMOCFILES} xmlrpc-${VERSION}
\r
106 cp --parents ${DEMOSFILES} xmlrpc-${VERSION}
\r
107 cp --parents ${TESTFILES} xmlrpc-${VERSION}
\r
108 cp --parents ${EXTRAFILES} xmlrpc-${VERSION}
\r
109 cp --parents ${LIBFILES} xmlrpc-${VERSION}
\r
110 cp --parents ${DEBUGGERFILES} xmlrpc-${VERSION}
\r
111 cp ${INFOFILES} xmlrpc-${VERSION}
\r
112 cd doc && $(MAKE) dist
\r
113 # on unix shells last char should be \;
\r
114 ${FIND} xmlrpc-${VERSION} -type f ! -name "*.fttb" ! -name "*.pdf" ! -name "*.gif" -exec ${DOS2UNIX} ;
\r
115 -rm xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
\r
116 tar -cvf xmlrpc-${VERSION}.tar xmlrpc-${VERSION}
\r
117 gzip xmlrpc-${VERSION}.tar
\r
118 zip -r xmlrpc-${VERSION}.zip xmlrpc-${VERSION}
\r
121 cd doc && $(MAKE) doc
\r
124 rm -rf xmlrpc-${VERSION} xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
\r
125 cd doc && $(MAKE) clean
\r