Merge 5.3 branch, as that becomes the new master, and 5.1 becomes the legacy branch
[plcapi.git] / Makefile
1 # Makefile for phpxmlrpc library\r
2 \r
3 ### USER EDITABLE VARS - can be passed as command-line options ###\r
4 \r
5 # path to PHP executable, preferably CLI version\r
6 PHP=/usr/local/bin/php\r
7 \r
8 # path were xmlrpc lib files will be copied to\r
9 PHPINCLUDEDIR=/usr/local/lib/php\r
10 \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
12 MKDIR=mkdir\r
13 \r
14 #find too\r
15 FIND=find\r
16 \r
17 DOS2UNIX=dos2unix\r
18 \r
19 #### DO NOT TOUCH FROM HERE ONWARDS ###\r
20 \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
25 export VERSION=3.0.0\r
26 \r
27 LIBFILES=lib/xmlrpc.inc lib/xmlrpcs.inc lib/xmlrpc_wrappers.inc\r
28 \r
29 EXTRAFILES=extras/test.pl \\r
30  extras/test.py \\r
31  extras/rsakey.pem \\r
32  extras/workspace.testPhpServer.fttb\r
33 \r
34 DEMOFILES=demo/vardemo.php \\r
35  demo/demo1.txt \\r
36  demo/demo2.txt \\r
37  demo/demo3.txt\r
38 \r
39 DEMOSFILES=demo/server/discuss.php \\r
40  demo/server/server.php \\r
41  demo/server/proxy.php\r
42 \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
52 \r
53 TESTFILES=test/testsuite.php \\r
54  test/benchmark.php \\r
55  test/parse_args.php \\r
56  test/phpunit.php \\r
57  test/verify_compat.php \\r
58  test/PHPUnit/*.php\r
59 \r
60 INFOFILES=Changelog \\r
61  Makefile \\r
62  NEWS \\r
63  README\r
64 \r
65 DEBUGGERFILES=debugger/index.php \\r
66  debugger/action.php \\r
67  debugger/common.php \\r
68  debugger/controller.php\r
69 \r
70 \r
71 all: install\r
72 \r
73 install:\r
74         cp ${LIBFILES} ${PHPINCLUDEDIR}\r
75         @echo Lib files have been copied to ${PHPINCLUDEDIR}\r
76         cd doc && $(MAKE) install\r
77 \r
78 test:\r
79         cd test && ${PHP} -q testsuite.php\r
80 \r
81 \r
82 ### the following targets are to be used for library development ###\r
83 \r
84 # make tag target: tag existing working copy as release in git.\r
85 tag:\r
86         git tag v${VERSION}\r
87         git push origin --tags\r
88 \r
89 dist: xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz\r
90 \r
91 xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz: ${LIBFILES} ${DEBUGGERFILES} ${INFOFILES} ${TESTFILES} ${EXTRAFILES} ${DEMOFILES} ${DEMOSFILES} ${DEMOCFILES}\r
92         @echo ---${VERSION}---\r
93         rm -rf xmlrpc-${VERSION}\r
94         ${MKDIR} xmlrpc-${VERSION}\r
95         ${MKDIR} xmlrpc-${VERSION}/demo\r
96         ${MKDIR} xmlrpc-${VERSION}/demo/client\r
97         ${MKDIR} xmlrpc-${VERSION}/demo/server\r
98         ${MKDIR} xmlrpc-${VERSION}/test\r
99         ${MKDIR} xmlrpc-${VERSION}/test/PHPUnit\r
100         ${MKDIR} xmlrpc-${VERSION}/extras\r
101         ${MKDIR} xmlrpc-${VERSION}/lib\r
102         ${MKDIR} xmlrpc-${VERSION}/debugger\r
103         cp --parents ${DEMOFILES} xmlrpc-${VERSION}\r
104         cp --parents ${DEMOCFILES} xmlrpc-${VERSION}\r
105         cp --parents ${DEMOSFILES} xmlrpc-${VERSION}\r
106         cp --parents ${TESTFILES} xmlrpc-${VERSION}\r
107         cp --parents ${EXTRAFILES} xmlrpc-${VERSION}\r
108         cp --parents ${LIBFILES} xmlrpc-${VERSION}\r
109         cp --parents ${DEBUGGERFILES} xmlrpc-${VERSION}\r
110         cp ${INFOFILES} xmlrpc-${VERSION}\r
111         cd doc && $(MAKE) dist\r
112 #   on unix shells last char should be \;\r
113         ${FIND} xmlrpc-${VERSION} -type f ! -name "*.fttb" ! -name "*.pdf" ! -name "*.gif" -exec ${DOS2UNIX} ;\r
114         -rm xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz\r
115         tar -cvf xmlrpc-${VERSION}.tar xmlrpc-${VERSION}\r
116         gzip xmlrpc-${VERSION}.tar\r
117         zip -r xmlrpc-${VERSION}.zip xmlrpc-${VERSION}\r
118 \r
119 doc:\r
120         cd doc && $(MAKE) doc\r
121 \r
122 clean:\r
123         rm -rf xmlrpc-${VERSION} xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz\r
124         cd doc && $(MAKE) clean\r