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