Commit 3668557e authored by Pietro Abate's avatar Pietro Abate

[r2005-01-14 10:41:55 by afrisch] Prepare for 0.2.2

Original author: afrisch
Date: 2005-01-14 10:41:56+00:00
parent 61438860
......@@ -46,8 +46,10 @@
* Fix --stdin.
* Bug fix in print_xml (do not create a namespace decl for "xml:").
- Other:
- Distribution:
* apps-cduce-cvs GODI package is updatable.
* The release tarball does not contain the CDuce website, only
the HTML documentation (memento, tutorial, manual).
0.2.1
......
......@@ -133,16 +133,8 @@ You need a GNU Make (or equivalent). The Makefile defines the following goals:
- make validate
compiles the schema validation tool
- make webiface
compiles the CDuce web interface interpreter (to be used as a CGI script)
- make webpages
compiles in the subdirectory the web/www/html directory of cduce sources
the files for the CDuce website (including the tutorial and manual)
- make install_web
compiles webiface and webpages, and install everything
in the under the $(WEB_PREFIX) directory (see Makefile.conf)
- make doc
compiles in the subdirectory web/doc the HTML documentation for CDuce
- make all
equivalent to (make cduce dtd2cduce validate)
......
......@@ -45,7 +45,11 @@ debug:
# Packaging
DISTRIB = $(DIRS) cduce.spec tools web depend INSTALL INSTALL.WIN32 CHANGES LICENSE README AUTHORS Makefile.conf.template configure configure.ml doc
DISTRIB = $(DIRS) cduce.spec tools depend INSTALL INSTALL.WIN32 CHANGES \
LICENSE README AUTHORS Makefile.conf.template configure configure.ml doc
DISTRIB_DOC = doc.xml memento.xml tutorial.xml manual.xml tutorial manual \
xhtml.cd xhtml-categ.cd xhtml-strict.cd site.cd
PACKAGE = cduce-$(VERSION)
.PHONY: package
......@@ -54,6 +58,9 @@ package: clean
mkdir $(PACKAGE)
cp -R $(DISTRIB) $(PACKAGE)/
cp Makefile.distrib $(PACKAGE)/Makefile
mkdir -p $(PACKAGE)/web/img
(cd web; cp -R $(DISTRIB_DOC) ../$(PACKAGE)/web; \
cd img; cp left.gif right.gif ../../$(PACKAGE)/web/img)
(cd $(PACKAGE); \
rm -f types/IDEAS; \
for F in $(DEPEND); do headache -h ../header $$F; done)
......@@ -110,3 +117,40 @@ cvs_snapshot_bin: clean
test:
$(MAKE) -C tests test
# Web site
driver/examples.ml: cduce web/examples/build.cd web/examples/examples.xml
(cd web/examples; ../../cduce build.cd --arg examples.xml)
webpages: cduce web/site.cdo
(cd web; ../cduce --run site.cdo --arg site.xml)
website: webpages webiface evaluator
install_web: website
cp web/www/*.html web/demo.js web/cduce.css $(HTML_DIR)/
cp CHANGES INSTALL INSTALL.WIN32 $(HTML_DIR)/
cp webiface $(CGI_DIR)/cduce
cp evaluator $(CGI_DIR)/
if test ! -d "$(HTML_DIR)/img" ; then \
mkdir $(HTML_DIR)/img; \
fi;
cp web/img/*.* $(HTML_DIR)/img
WEBIFACE = $(OBJECTS) driver/examples.cmo driver/webiface.cmo
EVALUATOR = $(OBJECTS) driver/evaluator.cmo
webiface: $(WEBIFACE:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(LINK) -verbose $(INCLUDES) -o $@ $^ $(EXTRA_OPTS_WEBIFACE)
evaluator: $(EVALUATOR:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(LINK) -verbose $(INCLUDES) -o $@ $^ $(EXTRA_OPTS_WEBIFACE)
# webiface can be made static to be able to move it more easily
# (to compile it on a machine which is not the web server)
# Seems to be some problems with statically linking curl
# EXTRA_OPTS_WEBIFACE = -ccopt -static
include Makefile.conf
VERSION = 0.2.1+1
VERSION = 0.2.2
all: cduce dtd2cduce validate cdo2ml cduce_lib.cma
ifeq ($(NATIVE),true)
......@@ -24,10 +24,6 @@ else
HIDE=
endif
# webiface can be made static to be able to move it more easily
# (to compile it on a machine which is not the web server)
# Seems to be some problems with statically linking curl
# EXTRA_OPTS_WEBIFACE = -ccopt -static
SYNTAX = -I misc/ q_symbol.cmo \
-symbol cduce_version=\"$(VERSION)\" \
......@@ -85,7 +81,7 @@ cduce_lib.cma:
$(HIDE)$(MAKE) NATIVE=false $@
endif
install: all install_lib
install: all install_lib install_doc
$(HIDE)mkdir -p $(BINDIR)
$(HIDE)mkdir -p $(MANDIR)/man1
@echo "Install binaries"
......@@ -110,6 +106,7 @@ uninstall:
$(BINDIR)/validate$(EXE) $(BINDIR)/cdo2ml$(EXE)
rm -f $(MANDIR)/man1/cduce.1 $(MANDIR)/man1/dtd2cduce.1 \
$(MANDIR)/man1/validate.1 $(MANDIR)/man1/cdo2ml.1
rm -Rf $(DOCDIR)
ocamlfind remove cduce
help:
......@@ -117,12 +114,9 @@ help:
@echo " cduce : compiles the CDuce command line interpreter"
@echo " dtd2cduce : compiles the dtd2cduce tools"
@echo " validate : compiles the schema validation tool"
@echo " webiface : compiles the CDuce web interface interpreter (CGI script)"
@echo " webpages : compiles in web/www/ the files for the CDuce website"
@echo " (including the tutorial and manual)"
@echo " install_web : compiles webiface and webpages, and install everything"
@echo " all : equivalent to (make cduce dtd2cduce validate)"
@echo " install : install cduce dtd2cduce, validate et man pages"
@echo " doc : build the documentation"
@echo " all : build binaries and libraries"
@echo " install : install binaries, man pages, documentation"
@echo " clean : back to the starting point"
@echo " uninstall : remove installed files"
......@@ -215,8 +209,6 @@ OBJECTS += $(CQL_OBJECTS)
VALIDATE_OBJECTS := $(shell for o in $(OBJECTS); do echo $$o; if [ "$$o" = "schema/schema_parser.cmo" ]; then exit 0; fi; done) # all objects until schema_parser.cmo
CDUCE = $(OBJECTS) driver/run.cmo $(CQL_OBJECTS_RUN)
WEBIFACE = $(OBJECTS) driver/examples.cmo driver/webiface.cmo
EVALUATOR = $(OBJECTS) driver/evaluator.cmo
DTD2CDUCE = tools/dtd2cduce.cmo
ALL_OBJECTS = $(OBJECTS) $(NEW_SCHEMA_OBJS) \
......@@ -255,15 +247,6 @@ cduce_lib.$(EXTENSION_LIB): $(OBJECTS:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(COMPILE) -a -o $@ cduce_lib.$(EXTENSION)
webiface: $(WEBIFACE:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(LINK) -verbose $(INCLUDES) -o $@ $^ $(EXTRA_OPTS_WEBIFACE)
evaluator: $(EVALUATOR:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(LINK) -verbose $(INCLUDES) -o $@ $^ $(EXTRA_OPTS_WEBIFACE)
dtd2cduce: $(DTD2CDUCE:.cmo=.$(EXTENSION))
@echo "Build $@"
$(HIDE)$(LINK) $(INCLUDES) -o $@ $^
......@@ -324,13 +307,10 @@ misc/q_symbol.cmo: misc/q_symbol.ml
include depend
# CDuce-generated files
driver/examples.ml: cduce web/examples/build.cd web/examples/examples.xml
(cd web/examples; ../../cduce build.cd --arg examples.xml)
# Documentation
webpages: cduce web/site.cdo
(cd web; ../cduce --run site.cdo --arg site.xml)
doc: cduce web/site.cdo
(cd web; ../cduce --run site.cdo --arg doc.xml -o doc)
web/site.cdo: cduce web/xhtml.cdo web/site.cd
./cduce -I web/ --compile web/site.cd
......@@ -338,17 +318,11 @@ web/site.cdo: cduce web/xhtml.cdo web/site.cd
web/xhtml.cdo: cduce web/xhtml.cd
./cduce -I web/ --compile web/xhtml.cd
website: webpages webiface evaluator
install_web: website
cp web/www/*.html web/demo.js web/cduce.css $(HTML_DIR)/
cp CHANGES INSTALL INSTALL.WIN32 $(HTML_DIR)/
cp webiface $(CGI_DIR)/cduce
cp evaluator $(CGI_DIR)/
if test ! -d "$(HTML_DIR)/img" ; then \
mkdir $(HTML_DIR)/img; \
fi;
cp web/img/*.* $(HTML_DIR)/img
install_doc: doc
mkdir -p $(DOCDIR)/img
cp web/doc/*.html $(DOCDIR)/
cp CHANGES INSTALL INSTALL.WIN32 $(DOCDIR)/
cp web/img/left.gif web/img/right.gif $(DOCDIR)/img
### Pack OCaml modules for the CDuce/OCaml interface
......
......@@ -5,6 +5,8 @@
open Printf
let not_distrib = Sys.file_exists "Makefile.distrib"
let usage () =
print_string "\
Configuration of CDuce.
......@@ -34,7 +36,9 @@ Installation directories:
--prefix=PREFIX install files in PREFIX [/usr/local]
--bindir=DIR install user executables in DIR [PREFIX/bin]
--mandir=DIR install man documentation in DIR [PREFIX/man]
--docdir=DIR install the rest of the doc in DIR [PREFIX/doc/cduce]
";
if not_distrib then print_string "
--wprefix=WPREFIX root directory of the web-server [/var/www]
--cgidir=DIR install the cgi-bin interpreter in DIR [WPREFIX/cgi-bin]
--htmldir=DIR install the website in DIR [WPREFIX/html]
......@@ -54,6 +58,7 @@ let vars =
[ "prefix", ref "/usr/local";
"bindir", ref "";
"mandir", ref "";
"docdir", ref "";
"wprefix", ref "/var/www";
"cgidir", ref "";
......@@ -209,6 +214,7 @@ let pxp_wlex = check_feature "pxp_wlex" (check_pkg "pxp-wlex-utf8")
let prefix = dir "prefix"
let bindir = dir ~def:(prefix^"/bin") "bindir"
let mandir = dir ~def:(prefix^"/man") "mandir"
let docdir = dir ~def:(prefix^"/doc/cduce") "docdir"
let wprefix = dir "wprefix"
let cgidir = dir ~def:(wprefix^"/cgi-bin") "cgidir"
let htmldir = dir ~def:(wprefix^"/html") "htmldir"
......@@ -249,6 +255,7 @@ let () =
fprintf out "PXP_WLEX=%b\n" pxp_wlex;
fprintf out "BINDIR=%s\n" bindir;
fprintf out "MANDIR=%s\n" mandir;
fprintf out "DOCDIR=%s\n" docdir;
fprintf out "CGI_DIR=%s\n" cgidir;
fprintf out "HTML_DIR=%s\n" htmldir;
fprintf out "SESSION_DIR=%s\n" sessiondir;
......
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<site>
<title>CDuce</title>
<footer>
<meta>
<p>
<local href="sitemap">Site map</local>
</p>
</meta>
</footer>
<page name="index">
<title>CDuce: documentation</title>
<include file="tutorial.xml"/>
<include file="manual.xml"/>
<include file="memento.xml"/>
<left>
<p>
This is the main entry point to CDuce documentation.
</p>
<pages-toc/>
</left>
<box title="Available documents" link="src">
<p>
We mantain three kinds of on-line documentation: a <a
href="manual.html">User's guide</a> where all CDuce constructions are
grouped by categories and explained; a <a href="tutorial.html">Tutorial</a>
where we give a gentle introduction to programming in CDuce; and a
<a href="memento.html">Quick reference card</a> where we group and briefly explain in a single page CDuce syntax.
</p>
</box>
<page name="sitemap">
<title>Sitemap</title>
<left>
<p>This page lists all the pages from the CDuce documentation.</p>
</left>
<box title="Sitemap" link="sitemap">
<site-toc/>
</box>
</page>
</page>
</site>
......@@ -17,7 +17,7 @@ This Guide describes all CDuce's constructions.
</p>
<pages-toc/>
<p>See also:</p>
<local-links href="index,tutorial,memento,papers"/>
<local-links href="index,tutorial,memento"/>
</left>
<box title="Table of Contents" link="toc">
......
......@@ -7,7 +7,7 @@
<p>This page briefly presents the syntax of the CDuce language.</p>
<boxes-toc/>
<p>See also:</p>
<local-links href="index,proto,manual,tutorial,papers"/>
<local-links href="index,manual,tutorial"/>
</left>
<box title="Identifiers" link="id">
......
......@@ -2,9 +2,9 @@
(** Command line **)
let input =
let (input,outdir) =
match argv [] with
| [ s ] -> s
| [ s ("-o" o | /(o := "www")) ] -> (s,o)
| _ -> raise "Please use --arg to specify an input file on the command line"
......@@ -89,9 +89,8 @@ let load_include (Latin1 -> [Any*])
let [<site>[ <title>site (<footer>footer | /(footer:=[])) main_page ] ] =
try (load_include input :? [ Site ])
with err ->
(* print ['Invalid input document\n' !err '\n']; *)
(* print ( string_of (i,err) ); print "\n"; *)
with err & Latin1 ->
print ['Invalid input document\n' !err '\n'];
exit 2
(* Highlighting text between {{...}} *)
......@@ -547,7 +546,7 @@ text-align:center; color: #aa0000; font: bold 200% helvetica" >
[ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
!(print_xml html) ] in
let fn = "www/" @ name @ ".html" in
let fn = outdir @ "/" @ name @ ".html" in
dump_to_file fn txt;
last
......
......@@ -19,7 +19,7 @@ This tutorial is a step-by-step introduction to CDuce.
</p>
<pages-toc/>
<p>See also:</p>
<local-links href="index,memento,manual,papers"/>
<local-links href="index,memento,manual"/>
</left>
......
......@@ -179,8 +179,7 @@ resort to two auxiliary functions that have nearly the same definition and
differ only on their type, one being of type <code>MPerson -> Man</code>, the other of
type <code>FPerson -> Woman</code>. The same transformation can be elegantly defined
in XSLT with a moderate nloc increase, but only at the
expense of loosing static type safety and type based optimization:
see the page <local href="bench"/> for preliminary benchmarks.
expense of loosing static type safety and type-based optimizations.
</p>
</section>
</box>
......
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