all:
${MAKE} -C./tools/htdocs $@
-pz2api-git-checkout:
- ${MAKE} -C./tools/htdocs $@
-
clean distclean:
${MAKE} -C./tools/htdocs $@
${MAKE} -C./examples/htdocs $@
${MAKE} -C./test $@
# must be called once after GIT checkout
-setup: pz2api-git-checkout
+setup:
${MAKE} -C./tools/htdocs mkws-js-min
${MAKE} -C./examples/htdocs jasmine-links
${MAKE} -C./test node-modules
help:
@echo "make [ all | setup | clean | distclean ]"
- @echo " [ pz2api-git-checkout | check-js ]"
+ @echo " [ check | check-js | phantomjs ]"
#JQUERY_UI_URL= http://code.jquery.com/ui/1.8.0/jquery-ui.min.js
JQUERY_JSON_URL= https://jquery-json.googlecode.com/files/jquery.json-2.4.js
HANDLEBARS_URL= http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.2.js -o $@
+PP2_URL= http://git.indexdata.com/?p=pazpar2.git;a=blob_plain;f=js/pz2.js;hb=HEAD
VERSION = $(shell tr -d '\012' < VERSION)
MKWS_JS= mkws-complete.js
-PZ2API_JS= ../../../pazpar2/js/pz2.js
-PZ2API_GIT= ssh://git.indexdata.com:222/home/git/pub/pazpar2
JQUERY_FILE := $(shell basename ${JQUERY_URL})
JQUERY_JSON_FILE := $(shell basename ${JQUERY_JSON_URL})
HANDLEBARS_FILE := $(shell basename ${HANDLEBARS_URL})
-PP2_FILE := $(shell basename ${PZ2API_JS})
+PP2_FILE = pz2.js
##############################
DOCS = README.html README.odt README.pdf \
docs: $(DOCS)
-pz2api-git-checkout:
- @if ! test -e ${PZ2API_JS}; then \
- ( cd ../../.. && git clone ${PZ2API_GIT} ); \
- fi
-
mkws-js ${MKWS_JS}: Makefile mkws.js ${JQUERY_FILE} ${JQUERY_JSON_FILE} ${HANDLEBARS_FILE} ${PP2_FILE}
- @if ! test -e ${PZ2API_JS}; then \
- echo "The pazpar2 JS file ${PZ2API_JS} does not exists."; \
- echo "Did you checked out the source from the git repo?"; \
- echo ""; \
- echo "Please run:"; \
- echo "$$ make pz2api-git-checkout"; \
- echo ""; \
- exit 1; \
- fi
( set -e; \
echo "/*! Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com"; \
echo " Licence: GPL, http://www.indexdata.com/licences/gpl"; \
echo " created at: $$(date)"; \
echo " mkws.js GIT id: $$(git log mkws.js | head -n 1 | perl -npe 's,\S+\s+,,')"; \
- echo " $$(basename ${PZ2API_JS}) GIT id: $$(cd $$(dirname ${PZ2API_JS}) && git log $$(basename ${PZ2API_JS}) | head -n 1 | perl -npe 's,\S+\s+,,')"; \
+ echo " pz2.js GIT id: $$(curl -sSf 'http://git.indexdata.com/?p=pazpar2.git;a=rss' | egrep '<guid' | head -1 | perl -ne 'print "$$1\n" if m,.*=([0-9a-f]+)</guid>,')"; \
echo "*/"; \
cat ${JQUERY_FILE}; \
cat ${JQUERY_JSON_FILE}; \
${HANDLEBARS_FILE}:
curl -sSf ${HANDLEBARS_URL} -o $@
-${PP2_FILE}: ${PZ2API_JS}
- cp -pf ${PZ2API_JS} $@
+${PP2_FILE}:
+ curl -sSf "${PP2_URL}" -o $@.tmp
+ mv -f $@.tmp $@
release: mkws.js mkws-complete.js mkws.min.js mkws-complete.min.js
@if [ -f releases/mkws-$(VERSION).js ]; then \