Permalink
Browse files

updated Makefile, now has version in filename.

  • Loading branch information...
1 parent 3e3fe5b commit 8f927fc5cef3aa3dc7e7911448434a438bba9243 Andor committed Feb 17, 2011
Showing with 30 additions and 27 deletions.
  1. +1 −1 .gitignore
  2. +29 −25 Makefile
  3. +0 −1 example.html
View
@@ -1,4 +1,4 @@
-
+docs/
tools-bin
xbps-min/
xbps-all/
View
@@ -1,62 +1,66 @@
# XB PointStream Makefile
#
+# You must specify a version when running make:
+# make VERSION=0.1
-# create a clean release directory and copy in the
-# release documents
-all: release
+# create a clean release directory and copy in the release documents
+release: create-release-dir create-release-files
-#
-release: create-release-dirs create-release-files
+VERSION ?= $(error Specify a version for your release (e.g., make VERSION=0.1))
# final files to release
-create-release-files: create-release-docs create-user-docs minify example-min zip-min
+create-release-files: create-release-docs create-user-docs minify create-example zip-min
# Minification strips out comments and most whitespace
-minify: create-release-dirs
+minify: create-release-dir
cat psapi.js mjs.js ./parsers/asc.js > ./xbps-min/xbps-temp.js
rm -fr tools-bin
mkdir tools-bin/
cc -o tools-bin/minifier tools/jsmin.c
- ./tools-bin/minifier < ./xbps-min/xbps-temp.js > ./xbps-min/xbps.js
+ ./tools-bin/minifier < ./xbps-min/xbps-temp.js > ./xbps-min/xbps-min-${VERSION}.js
rm ./xbps-min/xbps-temp.js
rm -fr ./tools-bin
#
zip-min: minify
- zip -r ./xbps-min/xbps-min.zip ./xbps-min
- mv ./xbps-min/xbps-min.zip .
+ zip -r ./xbps-min/xbps-min-${VERSION}.zip ./xbps-min
+ mv ./xbps-min/xbps-min-${VERSION}.js .
+ mv ./xbps-min/xbps-min-${VERSION}.zip .
rm -fr ./xbps-min
mkdir ./xbps-min
- mv xbps-min.zip ./xbps-min
+ mv xbps-min-${VERSION}.js ./xbps-min/xbps-min-${VERSION}.js
+ mv xbps-min-${VERSION}.zip ./xbps-min/xbps-min-${VERSION}.zip
+
-# don't name this example
-example-min: create-release-dirs
+# Create a simple example
+create-example: create-release-dir
mkdir ./xbps-min/clouds
cp ./clouds/acorn.asc ./xbps-min/clouds
- cp ./example.* ./xbps-min
+ echo "<html>" > ./xbps-min/example.html
+ echo " <head>" >> ./xbps-min/example.html
+ echo " <script src=\"xbps-min-${VERSION}.js\"></script>" >> ./xbps-min/example.html
+ echo " <script src=\"example.js\"></script>" >> ./xbps-min/example.html
+ echo " </head>" >> ./xbps-min/example.html
+ echo " <body onLoad=\"start();\">" >> ./xbps-min/example.html
+ echo " <canvas id=\"canvas\" style=\"border: 1px solid black;\" width=\"400\" height=\"400\"></canvas>" >>./xbps-min/example.html
+ echo " </body>" >> ./xbps-min/example.html
+ echo "</html>" >> ./xbps-min/example.html
+ cp example.js ./xbps-min/
# Create user documentation
-create-user-docs: create-release-dirs
+create-user-docs: create-release-dir
./tools/jsdoc-toolkit/gendocs.sh 0
# Copy over the documents into the release directory
-create-release-docs: create-release-dirs
+create-release-docs: create-release-dir
cp AUTHORS ./xbps-min
-# cp AUTHORS ./xbps-all
cp README ./xbps-min
-# cp README ./xbps-all/
cp LICENSE ./xbps-min
-# cp LICENSE ./xbps-all
-# Create two directories in a release directory
#
-# all - Will contain the library merged into a single file
-# min - above, but also minified
-create-release-dirs: clean
+create-release-dir: clean
mkdir ./xbps-min/
-# mkdir ./xbps-all/
# remove the release directory and its contents
clean:
rm -fr ./xbps-min/
-# rm -fr ./xbps-all/
View
@@ -23,5 +23,4 @@
acorn = ps.load("clouds/acorn.asc");
}
</pre>
-<span id="debug"></span>
</html>

0 comments on commit 8f927fc

Please sign in to comment.