Commit 3d23cde0 authored by Michael Hanus 's avatar Michael Hanus
Browse files

Updates to new html/cgi implementation

parent 98e691b9
{
"name": "spicey",
"version": "3.0.0",
"version": "3.1.0",
"author": "Michael Hanus <mh@informatik.uni-kiel.de>",
"synopsis": "A web application framework for Curry",
"category": [ "Web", "Database" ],
......
......@@ -18,6 +18,15 @@ SRCDIR := $(CURDIR)/src
# The load path for the Spicey application:
export CURRYPATH := $(SRCDIR):$(SRCDIR)/Model
# Executable of CPNSD:
CPNSD := $(shell which curry-cpnsd)
# Executable of the CGI registry and submission form:
CURRYCGI := $(shell which curry-cgi)
# Executable of the makecgi:
MAKECGI := $(shell which curry-makecgi)
############################################################################
.PHONY: all
all:
@echo "make: deploy install compile load run clean?"
......@@ -27,29 +36,42 @@ all:
install:
$(CPM) install
# check presence of tools required for deployment and install them:
.PHONY: checkdeploy
checkdeploy:
@if [ ! -x "$(CPNSD)" ] ; then \
echo "Installing required executable 'curry-cpnsd'..." ; \
$(CPM) install cpns ; fi
@if [ ! -x "$(CURRYCGI)" ] ; then \
echo "Installing required executable 'curry-cgi'..." ; \
$(CPM) install html-cgi ; fi
@if [ ! -x "$(MAKECGI)" ] ; then \
echo "Installing required executable 'curry-makecgi'..." ; \
$(CPM) install html ; fi
# Compile the generated Spicey application:
.PHONY: compile
compile:
$(CPM) exec $(CURRYBIN)/curry $(CURRYOPTIONS) :load Main :quit
$(CURRYBIN)/curry $(CURRYOPTIONS) :load Main :quit
# Load the generated Spicey application into the Curry system so that
# one can evaluate some expressions:
.PHONY: load
load:
$(CPM) exec $(CURRYBIN)/curry $(CURRYOPTIONS) :load Main
$(CURRYBIN)/curry $(CURRYOPTIONS) :load Main
# Runs the generated Spicey application by evaluating the main expression.
# This might be useful to test only the initial web page without a web server
.PHONY: run
run:
$(CPM) exec $(CURRYBIN)/curry $(CURRYOPTIONS) :load Main :eval main :q
$(CURRYBIN)/curry $(CURRYOPTIONS) :load Main :eval main :q
# Deploy the generated Spicey application, i.e., install it in the
# web directory WEBSERVERDIR:
.PHONY: deploy
deploy:
deploy: checkdeploy
mkdir -p $(WEBSERVERDIR)
$(CPM) exec $(CURRYBIN)/curry makecgi -standalone -m main -o $(WEBSERVERDIR)/spicey.cgi Main.curry
$(CPM) exec $(MAKECGI) -standalone -m main -o $(WEBSERVERDIR)/spicey.cgi Main.curry
# copy other files (style sheets, images,...)
cp -r public/* $(WEBSERVERDIR)
chmod -R go+rX $(WEBSERVERDIR)
......
......@@ -6,7 +6,7 @@
"category": [ "Web" ],
"dependencies": {
"cdbi" : ">= 2.0.0",
"html" : ">= 2.0.0",
"html" : ">= 2.1.0",
"wui" : ">= 2.0.0"
},
"compilerCompatibility": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment