X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=tools%2Fhtdocs%2FMakefile;h=22e4d7cb14ba2bd0c7191265b8f971d1f1ae18b2;hb=792daf2373f2dd35eff60413d3cb7f5e5c1536b7;hp=13a0e5c0b07fb5ed23c668a55d7c9c28065d82f4;hpb=c1c29a901cf03544229fbfa299b638af65097654;p=mkws-moved-to-github.git diff --git a/tools/htdocs/Makefile b/tools/htdocs/Makefile index 13a0e5c..22e4d7c 100644 --- a/tools/htdocs/Makefile +++ b/tools/htdocs/Makefile @@ -1,99 +1,110 @@ -###################################################################### -# Copyright (c) 2013 IndexData ApS. http://indexdata.com -# +# Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com -############################## -# select a jquery version -# -#JQUERY_URL= http://code.jquery.com/jquery-2.0.3.min.js -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 +SRC= ../../src +VPATH= ${SRC} -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 +HANDLEBARS_FILE = handlebars-v1.1.2.js +JQUERY_FILE = jquery-1.10.0.min.js +JQUERY_JSON_FILE = jquery.json-2.4.js +PP2_FILE = pz2.js -MKWS_JS= mkws-complete.js -PZ2API_JS= ../../../pazpar2/js/pz2.js -PZ2API_GIT= ssh://git.indexdata.com:222/home/git/pub/pazpar2 -############################## +HANDLEBARS_URL = http://builds.handlebarsjs.com.s3.amazonaws.com/${HANDLEBARS_FILE} +JQUERY_URL = http://code.jquery.com/${JQUERY_FILE} +JQUERY_JSON_URL = https://jquery-json.googlecode.com/files/${JQUERY_JSON_FILE} +PP2_URL = http://git.indexdata.com/?p=pazpar2.git;a=blob_plain;f=js/${PP2_FILE};hb=HEAD -DOCS = README.html README.odt README.pdf \ - whitepaper.html whitepaper.odt whitepaper.pdf +JQUERY_UI_URL = http://code.jquery.com/ui/1.10.3/jquery-ui.js +VERSION = $(shell tr -d '\012' < ${SRC}/VERSION) -**default**: ${MKWS_JS} README.html whitepaper.html +COMPONENTS = mkws-handlebars.js \ + mkws-core.js mkws-team.js mkws-filter.js \ + mkws-widget.js mkws-widget-main.js mkws-widget-termlists.js \ + mkws-widget-authname.js mkws-widget-categories.js mkws-widget-log.js \ + mkws-widget-record.js mkws-widget-reference.js mkws-widget-builder.js -all: ${MKWS_JS} $(DOCS) +GENERATED = ${HANDLEBARS_FILE} ${JQUERY_FILE} ${JQUERY_JSON_FILE} ${PP2_FILE} \ + mkws.js mkws.min.js mkws-complete.js mkws-complete.min.js -docs: $(DOCS) +INSTALLABLE = mkws-jquery.js VERSION NEWS $(GENERATED) -pz2api-git-checkout: - @if ! test -e ${PZ2API_JS}; then \ - ( cd ../../.. && git clone ${PZ2API_GIT} ); \ - fi +INSTALLED = $(INSTALLABLE:%=../tools/htdocs/%) -mkws-js ${MKWS_JS}: mkws.js handlebars-v1.1.2.js - @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 - ( 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 "*/"; \ - curl -sSf ${JQUERY_URL} | perl -npe 's,sourceMappingURL=jquery.*map,,'; \ - cat handlebars-v1.1.2.js; \ - cat ${PZ2API_JS}; \ - cat mkws.js ) > ${MKWS_JS}.new - mv -f ${MKWS_JS}.new ${MKWS_JS} +**make-default**: mkws.js -handlebars-v1.1.2.js: - curl -sSf http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.2.js -o $@ +install: $(INSTALLED) +uninstall: + rm -f $(INSTALLED) -# For a description of pandoc's markdown format, see: -# http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html --> +../tools/htdocs/%: % + rm -f $@ && cp -p $? $@ && chmod 444 $@ -# for older pandoc (<1.9) run first: -# perl -i.bak -npe 's/"(Authors|Subjects)": "(.*?)"/"$1": "test"/' tools/htdocs/whitepaper.markdown -# -%.html: %.markdown - rm -f $@ - pandoc --standalone --toc -c mkws-doc.css $< | sed '/^