aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2006-08-14 01:46:05 +0000
committerJohn Resig <jeresig@gmail.com>2006-08-14 01:46:05 +0000
commit7448c61ee2199f6f7002e33e533cebc42b000c89 (patch)
tree71e0d08a590cf2ce29cc49057b7f4a76037f62c2 /Makefile
parent61aab47bcf4c35d021a88d95b7a17643d1342596 (diff)
downloadjquery-7448c61ee2199f6f7002e33e533cebc42b000c89.tar.gz
jquery-7448c61ee2199f6f7002e33e533cebc42b000c89.zip
Massive overhauls to the test suite - it is now generated dynamically, along with the documentation.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 22 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index f0be47f6c..ed30269a5 100644
--- a/Makefile
+++ b/Makefile
@@ -6,14 +6,18 @@ DOCS_DIR = ${PREFIX}/docs
TEST_DIR = ${PREFIX}/test
DIST_DIR = ${PREFIX}/dist
-MODULES = jquery event fx ajax
+MODULES = ${SRC_DIR}/jquery/*\
+ ${SRC_DIR}/event/*\
+ ${SRC_DIR}/fx/*\
+ ${SRC_DIR}/ajax/*
+
JQ = ${DIST_DIR}/jquery.js
JQ_LITE = ${DIST_DIR}/jquery.lite.js
JQ_PACK = ${DIST_DIR}/jquery.pack.js
JAR = java -jar ${BUILD_DIR}/js.jar
-all: jquery lite pack docs
+all: jquery lite pack docs test
@@echo "jQuery build complete."
${DIST_DIR}:
@@ -21,32 +25,34 @@ ${DIST_DIR}:
jquery: ${DIST_DIR} ${JQ}
-${JQ}:
+${JQ}: ${MODULES}
@@echo "Building" ${JQ}
- @@for f in ${MODULES}; do \
- echo " - Adding module:" $$f;\
- cat ${SRC_DIR}/$$f/$$f.js >> ${JQ};\
- done
+ @@mkdir -p ${DIST_DIR}
+ @@cat ${MODULES} > ${JQ};
@@echo ${JQ} "Built"
@@echo
lite: ${JQ_LITE}
-${JQ_LITE}: jquery
+${JQ_LITE}: ${JQ}
@@echo "Building" ${JQ_LITE}
+
@@echo " - Removing ScriptDoc from" ${JQ}
@@${JAR} ${BUILD_DIR}/build/lite.js ${JQ} ${JQ_LITE}
+
@@echo ${JQ_LITE} "Built"
@@echo
pack: ${JQ_PACK}
-${JQ_PACK}: jquery
+${JQ_PACK}: ${JQ}
@@echo "Building" ${JQ_PACK}
+
@@echo " - Compressing using Packer"
@@${JAR} ${BUILD_DIR}/build/pack.js ${JQ} ${JQ_PACK}
+
@@echo ${JQ_PACK} "Built"
@@echo
@@ -55,9 +61,13 @@ test: ${JQ}
@@echo " - Making Test Suite Directory:" ${TEST_DIR}
@@mkdir -p ${TEST_DIR}
+ @@mkdir -p ${TEST_DIR}/tests/
+
+ @@echo " - Removing any old tests"
+ @@rm -f ${TEST_DIR}/tests/*
@@echo " - Copying over script files."
- @@cp -R ${BUILD_DIR}/test/js ${TEST_DIR}/js
+ @@cp -nR ${BUILD_DIR}/test/js ${TEST_DIR}/js
@@echo " - Compiling Test Cases"
@@${JAR} ${BUILD_DIR}/test/test.js ${JQ} ${TEST_DIR}
@@ -73,10 +83,10 @@ docs: ${JQ}
@@mkdir -p ${DOCS_DIR}/data
@@echo " - Copying over script files."
- @@cp -R ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
+ @@cp -nR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js
@@echo " - Copying over style files."
- @@cp -R ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
+ @@cp -nR ${BUILD_DIR}/docs/style ${DOCS_DIR}/style
@@echo " - Extracting ScriptDoc from" ${JQ}
@@${JAR} ${BUILD_DIR}/docs/docs.js ${JQ} ${DOCS_DIR}