-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·74 lines (52 loc) · 1.71 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
VERSION = 0.2
SRC_DIR = src
BUILD_DIR = build
JS_FILES = ${SRC_DIR}/taskpaper.treeview.js\
${SRC_DIR}/taskpaper.panel.js\
${SRC_DIR}/jquery.fn.js\
${SRC_DIR}/taskpaperresults.js\
${SRC_DIR}/taskpaperitem.js\
${SRC_DIR}/taskpaper.control.item.js\
${SRC_DIR}/taskpaper.js
RELEASE_FILES = todo README changelog.txt GPL-license.txt MIT-license.txt
IMAGES = ${SRC_DIR}/images/*
CSS = ${SRC_DIR}/css/*
DIST = ${BUILD_DIR}/dist
IMAGES_DIST = ${DIST}/images
CSS_DIST = ${DIST}/css
PROJECT = jquery.taskpaper
WE = ${DIST}/${PROJECT}.js
WE_PACK = ${DIST}/${PROJECT}.pack.js
WE_ARCH = ../${PROJECT}-src-${VERSION}.tar.gz
WE_RELEASE = ../${PROJECT}-${VERSION}.tar.gz
MERGE = sed -e '1 s/^\xEF\xBB\xBF//' ${JS_FILES} > ${WE}
PACKER = perl -I${BUILD_DIR}/packer ${BUILD_DIR}/packer/jsPacker.pl -i ${WE} -o ${WE_PACK} -e62
all: archive
taskpaper:
@@echo "Building" ${WE}
@@if test -d ${DIST}; then echo ${DIST} " is okay" ; else mkdir ${DIST}; fi
@@echo " - Merging files"
@@${MERGE}
@@echo ${WE} "Built"
@@echo
pack: taskpaper
@@echo "Building" ${WE_PACK}
@@echo " - Compressing using Packer"
@@${PACKER}
@@echo ${WE_PACK} "Built"
@@echo
archive: pack
@@echo "Building" ${WE_RELEASE}
@@echo " - Cleaning CSS and images"
@@if test -d ${IMAGES_DIST}; then rm -f ${IMAGES_DIST}/*; else mkdir ${IMAGES_DIST}; fi
@@if test -d ${CSS_DIST}; then rm -f ${CSS_DIST}/*; else mkdir ${CSS_DIST}; fi
@@echo " - Coping CSS and images"
@@cp -R -f ${IMAGES} ${IMAGES_DIST}
@@cp -R -f ${CSS} ${CSS_DIST}
@@cp -f ${RELEASE_FILES} build/dist
@@echo " - Creating release"
@@tar -czf ${WE_RELEASE} build/dist
@@echo "Building" ${WE_ARCH}
@@echo " - Creating archive"
@@rm -f ${WE_ARCH}
@@tar --exclude '.DS_Store' -czf ${WE_ARCH} .