Update and rename README to README.md
[plcapi.git] / Makefile
index 8e42dac..4b4e4ef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
 # Makefile for phpxmlrpc library\r
-# $Id: Makefile,v 1.37 2008/03/06 22:37:19 ggiunta Exp $\r
 \r
-### USER EDITABLE VARS ###\r
+### USER EDITABLE VARS - can be passed as command-line options ###\r
 \r
 # path to PHP executable, preferably CLI version\r
 PHP=/usr/local/bin/php\r
@@ -15,15 +14,16 @@ MKDIR=mkdir
 #find too\r
 FIND=find\r
 \r
+DOS2UNIX=dos2unix\r
 \r
 #### DO NOT TOUCH FROM HERE ONWARDS ###\r
 \r
 # recover version number from code\r
 # thanks to Firman Pribadi for unix command line help\r
 #   on unix shells lasts char should be \\2/g )\r
-export VERSION=$(shell egrep "\$GLOBALS *\[ *'xmlrpcVersion' *\] *= *'" lib/xmlrpc.inc | sed -r s/"(.*= *' *)([0-9a-zA-Z.-]+)(.*)"/\2/g )\r
+export VERSION=$(shell grep -E "\$GLOBALS *\[ *'xmlrpcVersion' *\] *= *'" lib/xmlrpc.inc | sed -r s/"(.*= *' *)([0-9a-zA-Z.-]+)(.*)"/\2/g )\r
 \r
-LIBFILES=lib/xmlrpc.inc lib/xmlrpcs.inc lib/xmlrpc_wrappers.inc lib/compat/*.php\r
+LIBFILES=lib/xmlrpc.inc lib/xmlrpcs.inc lib/xmlrpc_wrappers.inc\r
 \r
 EXTRAFILES=extras/test.pl \\r
  extras/test.py \\r
@@ -70,7 +70,7 @@ DEBUGGERFILES=debugger/index.php \
 all: install\r
 \r
 install:\r
-       cd lib && cp ${LIBFILES} ${PHPINCLUDEDIR}\r
+       cp ${LIBFILES} ${PHPINCLUDEDIR}\r
        @echo Lib files have been copied to ${PHPINCLUDEDIR}\r
        cd doc && $(MAKE) install\r
 \r
@@ -80,10 +80,10 @@ test:
 \r
 ### the following targets are to be used for library development ###\r
 \r
-# make tag target: tag existing working copy as release in cvs.\r
-# todo: convert dots in underscore in $VERSION\r
+# make tag target: tag existing working copy as release in git.\r
 tag:\r
-       cvs -q tag -p release_${VERSION}\r
+       git tag v${VERSION}\r
+       git push origin --tags\r
 \r
 dist: xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz\r
 \r
@@ -98,7 +98,6 @@ xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz: ${LIBFILES} ${DEBUGGERFILES} ${I
        ${MKDIR} xmlrpc-${VERSION}/test/PHPUnit\r
        ${MKDIR} xmlrpc-${VERSION}/extras\r
        ${MKDIR} xmlrpc-${VERSION}/lib\r
-       ${MKDIR} xmlrpc-${VERSION}/lib/compat\r
        ${MKDIR} xmlrpc-${VERSION}/debugger\r
        cp --parents ${DEMOFILES} xmlrpc-${VERSION}\r
        cp --parents ${DEMOCFILES} xmlrpc-${VERSION}\r
@@ -110,7 +109,7 @@ xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz: ${LIBFILES} ${DEBUGGERFILES} ${I
        cp ${INFOFILES} xmlrpc-${VERSION}\r
        cd doc && $(MAKE) dist\r
 #   on unix shells last char should be \;\r
-       ${FIND} xmlrpc-${VERSION} -type f ! -name "*.fttb" ! -name "*.pdf" ! -name "*.gif" -exec dos2unix {} ;\r
+       ${FIND} xmlrpc-${VERSION} -type f ! -name "*.fttb" ! -name "*.pdf" ! -name "*.gif" -exec ${DOS2UNIX} ;\r
        -rm xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz\r
        tar -cvf xmlrpc-${VERSION}.tar xmlrpc-${VERSION}\r
        gzip xmlrpc-${VERSION}.tar\r