Moved the bulk of the selector code out into a separate file, changed the build files...
[jquery.git] / Makefile
index e11ea5d..4fc64b9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,18 +5,44 @@ PREFIX = .
 DOCS_DIR = ${PREFIX}/docs
 TEST_DIR = ${PREFIX}/test
 DIST_DIR = ${PREFIX}/dist
+PLUG_DIR = ../plugins
+
+BASE_FILES = ${SRC_DIR}/jquery/jquery.js\
+       ${SRC_DIR}/selector/selector.js\
+       ${SRC_DIR}/event/event.js\
+       ${SRC_DIR}/fx/fx.js\
+       ${SRC_DIR}/ajax/ajax.js
+
+PLUGINS = ${PLUG_DIR}/button/*\
+       ${PLUG_DIR}/center/*\
+       ${PLUG_DIR}/cookie/*\
+       ${PLUG_DIR}/dimensions/*\
+       ${PLUG_DIR}/metadata/*\
+       ${PLUG_DIR}/form/*\
+       ${PLUG_DIR}/greybox/greybox.js\
+       ${PLUG_DIR}/interface/*\
+       ${PLUG_DIR}/pager/*\
+       ${PLUG_DIR}/tablesorter/*\
+       ${PLUG_DIR}/tabs/*\
+       ${PLUG_DIR}/tooltip/jquery.tooltip.js\
+       ${PLUG_DIR}/accordion/jquery.accordion.js
 
 MODULES = ${SRC_DIR}/intro.js\
-       ${SRC_DIR}/jquery/*\
-       ${SRC_DIR}/event/*\
-       ${SRC_DIR}/fx/*\
-       ${SRC_DIR}/ajax/*\
+       ${BASE_FILES}\
+       ${SRC_DIR}/outro.js
+
+MODULES_WITH_PLUGINS = ${SRC_DIR}/intro.js\
+       ${BASE_FILES}\
+       ${PLUGINS}\
        ${SRC_DIR}/outro.js
 
 JQ = ${DIST_DIR}/jquery.js
 JQ_LITE = ${DIST_DIR}/jquery.lite.js
 JQ_PACK = ${DIST_DIR}/jquery.pack.js
 
+JQ_VER = `cat version.txt`
+VER = sed s/@VERSION/${JQ_VER}/
+
 JAR = java -jar ${BUILD_DIR}/js.jar
 
 all: jquery lite pack docs test
@@ -31,7 +57,16 @@ ${JQ}: ${MODULES}
        @@echo "Building" ${JQ}
 
        @@mkdir -p ${DIST_DIR}
-       @@cat ${MODULES} > ${JQ};
+       @@cat ${MODULES} | ${VER} > ${JQ};
+
+       @@echo ${JQ} "Built"
+       @@echo
+
+with_plugins: ${MODULES_WITH_PLUGINS}
+       @@echo "Building" ${JQ}
+
+       @@mkdir -p ${DIST_DIR}
+       @@cat ${MODULES_WITH_PLUGINS} | ${VER} > ${JQ};
 
        @@echo ${JQ} "Built"
        @@echo
@@ -68,7 +103,7 @@ test: ${JQ}
        @@rm -f ${TEST_DIR}/tests/*
 
        @@echo " - Copying over script files."
-       @@cp -fR ${BUILD_DIR}/test/js ${TEST_DIR}/js
+       @@cp -fR ${BUILD_DIR}/test/data ${TEST_DIR}/data
        @@cp -f ${BUILD_DIR}/test/index.html ${TEST_DIR}
 
        @@echo " - Compiling Test Cases"
@@ -84,6 +119,9 @@ docs: ${JQ}
        @@mkdir -p ${DOCS_DIR}
        @@mkdir -p ${DOCS_DIR}/data
 
+       @@echo " - Copying over htaccess file."
+       @@cp -fR ${BUILD_DIR}/docs/.htaccess ${DOCS_DIR}
+
        @@echo " - Copying over script files."
        @@cp -fR ${BUILD_DIR}/docs/js ${DOCS_DIR}/js