X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=tools%2Fhtdocs%2FMakefile;h=bcb753d2ec1d485160726ad780d4b53f317b53d4;hb=42ca1c4a0ca09e45e4cc56e91f1cf69584839d94;hp=68278ad6ece744225548559c4365dff7b96609c9;hpb=fd6e798f994723a1c9abd84a374fb6a6d29e06d0;p=mkws-moved-to-github.git diff --git a/tools/htdocs/Makefile b/tools/htdocs/Makefile index 68278ad..bcb753d 100644 --- a/tools/htdocs/Makefile +++ b/tools/htdocs/Makefile @@ -10,23 +10,20 @@ JQUERY_URL= http://code.jquery.com/jquery-1.10.0.min.js #JQUERY_URL= http://code.jquery.com/jquery-1.9.1.min.js #JQUERY_URL= http://code.jquery.com/jquery-1.8.3.min.js #JQUERY_URL= http://code.jquery.com/jquery-1.7.2.min.js -#JQUERY_URL= http://code.jquery.com/jquery-1.6.4.min.js -#JQUERY_URL= http://code.jquery.com/jquery-1.4.4.min.js JQUERY_UI_URL= http://code.jquery.com/ui/1.10.3/jquery-ui.js #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 $@ +HANDLEBARS_URL= http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.2.js +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 \ @@ -39,27 +36,13 @@ all: ${MKWS_JS} mkws-js-min $(DOCS) 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 ',')"; \ echo "*/"; \ cat ${JQUERY_FILE}; \ cat ${JQUERY_JSON_FILE}; \ @@ -86,13 +69,16 @@ ${JQUERY_FILE}: rm -f $@.new ${JQUERY_JSON_FILE}: - curl -sSf ${JQUERY_JSON_URL} -o $@ + curl -sSf ${JQUERY_JSON_URL} -o $@.tmp + mv -f $@.tmp $@ ${HANDLEBARS_FILE}: - curl -sSf ${HANDLEBARS_URL} -o $@ + curl -sSf ${HANDLEBARS_URL} -o $@.tmp + mv -f $@.tmp $@ -${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 \