root/lang/javascript/javascript-xpath/trunk/Makefile @ 1382

Revision 1269, 1.3 kB (checked in by amachang, 7 years ago)

lang/javascript/JavaScript-XPath: Create JavaScript?-XPath project.

Line 
1PREFIX = .
2
3SRC_DIR = src
4
5TEST_DIR = test
6
7DIST_DIR = ${PREFIX}/dist
8
9RELEASE_DIR = ${PREFIX}/release
10
11SRC_FILES = ${SRC_DIR}/head.js\
12        ${SRC_DIR}/config.js\
13        ${SRC_DIR}/uai.js\
14        ${SRC_DIR}/lexer.js\
15        ${SRC_DIR}/ctx.js\
16        ${SRC_DIR}/baseExpr.js\
17        ${SRC_DIR}/binaryExpr.js\
18        ${SRC_DIR}/unaryExpr.js\
19        ${SRC_DIR}/unionExpr.js\
20        ${SRC_DIR}/pathExpr.js\
21        ${SRC_DIR}/filterExpr.js\
22        ${SRC_DIR}/stepExpr.js\
23        ${SRC_DIR}/nodeType.js\
24        ${SRC_DIR}/nameTest.js\
25        ${SRC_DIR}/variableReference.js\
26        ${SRC_DIR}/literal.js\
27        ${SRC_DIR}/number.js\
28        ${SRC_DIR}/functionCall.js\
29        ${SRC_DIR}/nodeSet.js\
30        ${SRC_DIR}/api.js\
31        ${SRC_DIR}/foot.js
32
33TEST_FILE = ${TEST_DIR}/index.html
34
35VERSION_FILE = version.txt
36
37VER = ${shell cat ${VERSION_FILE}}
38
39JSXPATH = ${DIST_DIR}/javascript-xpath-${VER}.js
40
41all: jsxpath runtest
42        @@echo "JavaScript-XPath build complete"
43
44jsxpath: ${JSXPATH}
45
46${DIST_DIR}:
47        @@mkdir -p ${DIST_DIR}
48
49${JSXPATH}: ${DIST_DIR} ${VERSION_FILE} ${SRC_FILES} Makefile
50        @@echo "Building" ${JSXPATH}
51        @@cat ${SRC_FILES} | sed s/@VERSION/${VER}/ > ${JSXPATH}
52        @@echo ${JSXPATH} "Built"
53        @@echo ""
54
55runtest:
56        @@open ${TEST_FILE}
57
58release: jsxpath
59        @@cp ${JSXPATH} ./release
60        @@cp ${JSXPATH} ./release/javascript-xpath-latest.js
61        @@rm ${DIST_DIR}/*
62
63clean:
64        @@echo "Removing Distribution directory:" ${DIST_DIR}
65        @@rm ${DIST_DIR}/*
66
Note: See TracBrowser for help on using the browser.