X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=src%2FMakefile;h=c9dcce32992d76cdba3d2002f11b62812d1f2b49;hb=638909c660c1a11395a389f553c0c0f68a1bb8fd;hp=bcb753d2ec1d485160726ad780d4b53f317b53d4;hpb=7722615c17cf1b36d1d2f25c6b60eadfc04653ee;p=mkws-moved-to-github.git diff --git a/src/Makefile b/src/Makefile index bcb753d..c9dcce3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,42 +1,40 @@ -###################################################################### -# 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_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 -PP2_URL= http://git.indexdata.com/?p=pazpar2.git;a=blob_plain;f=js/pz2.js;hb=HEAD +HANDLEBARS_FILE = handlebars-v1.1.2.js +JQUERY_FILE = jquery-1.10.0.min.js +JQUERY_JSON_FILE = jquery.json-2.4.js + +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} + +JQUERY_UI_URL = http://code.jquery.com/ui/1.10.3/jquery-ui.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 +COMPONENTS = mkws-handlebars.js \ + mkws-core.js mkws-team.js mkws-widgets.js mkws-widget-termlists.js \ + mkws-widget-authname.js mkws-widget-log.js mkws-widget-record.js -JQUERY_FILE := $(shell basename ${JQUERY_URL}) -JQUERY_JSON_FILE := $(shell basename ${JQUERY_JSON_URL}) -HANDLEBARS_FILE := $(shell basename ${HANDLEBARS_URL}) PP2_FILE = pz2.js -############################## -DOCS = README.html README.odt README.pdf \ - whitepaper.html whitepaper.odt whitepaper.pdf +INSTALLABLE = ${HANDLEBARS_FILE} \ + ${JQUERY_FILE} ${JQUERY_JSON_FILE} \ + pz2.js mkws.js mkws-jquery.js mkws-complete.js \ + mkws.min.js mkws-complete.min.js VERSION NEWS +INSTALLED = $(INSTALLABLE:%=../tools/htdocs/%) + +**make-default**: ../tools/htdocs/mkws.js -# Default rule when "make" is invoked without a target -**default**: ${MKWS_JS} mkws-js-min README.html whitepaper.html +install: $(INSTALLED) -all: ${MKWS_JS} mkws-js-min $(DOCS) +uninstall: + rm -f $(INSTALLED) -docs: $(DOCS) +../tools/htdocs/%: % + rm -f $@ && cp -p $? $@ && chmod 444 $@ -mkws-js ${MKWS_JS}: Makefile mkws.js ${JQUERY_FILE} ${JQUERY_JSON_FILE} ${HANDLEBARS_FILE} ${PP2_FILE} +all: mkws.min.js mkws-complete.min.js + +mkws-js mkws-complete.js: Makefile mkws.js mkws-jquery.js ${JQUERY_FILE} ${JQUERY_JSON_FILE} ${HANDLEBARS_FILE} ${PP2_FILE} ( set -e; \ echo "/*! Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com"; \ echo " Licence: GPL, http://www.indexdata.com/licences/gpl"; \ @@ -49,10 +47,9 @@ mkws-js ${MKWS_JS}: Makefile mkws.js ${JQUERY_FILE} ${JQUERY_JSON_FILE} ${HANDLE cat ${HANDLEBARS_FILE}; \ cat ${PP2_FILE}; \ cat mkws.js; \ - ) > ${MKWS_JS}.new - mv -f ${MKWS_JS}.new ${MKWS_JS} - -mkws-js-min: mkws.min.js mkws-complete.min.js + cat mkws-jquery.js; \ + ) > mkws-complete.js.new + mv -f mkws-complete.js.new mkws-complete.js %.min.js: %.js yui-compressor $? > $@.new @@ -61,8 +58,6 @@ mkws-js-min: mkws.min.js mkws-complete.min.js mkws-syntax-check: yui-compressor mkws.js >/dev/null -mkws-complete-syntax-check: mkws-js-min - ${JQUERY_FILE}: curl -sSf ${JQUERY_URL} -o $@.new perl -npe 's,sourceMappingURL=jquery.*map,,' $@.new > $@ @@ -91,46 +86,18 @@ release: mkws.js mkws-complete.js mkws.min.js mkws-complete.min.js echo "Made release $(VERSION)"; \ fi -# For a description of pandoc's markdown format, see: -# http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html --> - -# 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 '/^