diff --git a/.gitignore b/.gitignore index e5e0a26c52..e459ee2775 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,9 @@ src/**/*.odocl ocsigen.org-data _opam + +# Local files (not part of the project) +AGENTS*.md +instructions +eliom-analysis.md +eliom.opam.template diff --git a/CHANGES b/CHANGES index 2a1ea79468..a539cd6378 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,67 @@ +===== 13.0 ===== +* Module namespace modernization +** Public modules are now accessed as Eliom.Service, Eliom.Content, + Eliom.Parameter, Eliom.Registration, Eliom.Client, ... instead of + the legacy flat Eliom_xxx prefix. Implemented with + (include_subdirs qualified) + (wrapped false) in dune. +** Eliom_common is now Eliom.Common; most internal modules lost + their eliom_/eliommod_ prefix as well (Content_core, Mod_main, + Mod_pagegen, ...). A few names are kept as-is for conflict + reasons (Eliom_form, Eliom_lazy, Eliom_react, Eliom_uri). +** New eliom-compat opam package: provides the legacy Eliom_xxx + module names as include-aliases of the new Eliom.Xxx modules, + to ease migration of existing code. +** BREAKING: Eliom.run is now Eliom.App.run (the auto-generated + wrapper module cannot contain val declarations). +* Eliom.Content.Html.T +** New named module type for the Tyxml HTML signature shared by F + and D, with Eliom's LINKS_AND_FORMS extensions. Use it as the + parameter signature of functors that need to abstract over the + F/D choice, instead of [module type of Content.Html.F]. The + latter triggers an OCaml strengthening bug in wrapped libraries + (see ia-reports/2026-04-ocaml-wrapped-mtof-bug.md). Tools.Make, + Ot.Icons.Make and the os_template Make functor all use it. +* Distillery template install path +** Eliom's three templates (app.exe, app.lib, basic.ppx) are now + installed at lib/eliom/templates// via the standard dune + (install (section lib_root) ... (with_prefix ...)) pattern. + Third-party packages (e.g. ocsigen-start) that ship templates + are expected to install at the same location. +** eliom-distillery no longer auto-discovers templates from + per-package eliom-templates/ subdirectories; it reads from the + single standard lib/eliom/templates/ location, plus + ELIOM_DISTILLERY_PATH. +* Build system +** Eliom now uses ocsigen-dune-rules to drive its build. Adopted + the new gen / check-modules sub-command structure introduced + upstream by Jules Aguillon. +** Migrated to wrapped ocsigenserver module names (Ocsigen.Server, + Ocsigen.Extensions, Ocsigen.Request, Ocsigen.Response, + Ocsigen.Config, Ocsigen_base.Lib, Ocsigen_http.Header, ...). +** PPX gained -internal and -internal-prefix flags for compiling + wrapped libraries. +** Removed the eliom.ocamlbuild plugin and the legacy topkg/pkg + build artifacts. API documentation is now generated by + build/gen_wikidoc.sh (ocamldoc + wikidoc, no ocamlbuild + dependency); run via [make wikidoc]. +* Bug fixes +** Syntax.is_site_available now checks that the sitedata stack is + actually non-empty during initialisation, instead of just + relying on Ocsigen.Extensions.during_initialisation. Fixes a + crash on startup + (Eliom_site_information_not_available "get_current_sitedata") + exposed by the new module link order: PPX-inserted top-level + close_server_section calls in extension-linked .eliom files + (Service_base, Content, Tools, ...) now correctly route their + compilation-unit data into !global_data when no site is active, + matching the design intent stated in the comment on + get_global_data. + ===== 12.0 ===== * Eliom_lib ** Deprecated logging functions were removed (#821) These are: debug_exn, debug, error, error_any, jsdebug -* Full WASM support: build system and sending either js or wasm depending on the browser +* Full WASM support: build system and sending either js or wasm depending on the browser * Use Log instead of Lwt_logs ===== 11.1 ===== diff --git a/Makefile b/Makefile index 9a18af063f..4e9ca9a09a 100644 --- a/Makefile +++ b/Makefile @@ -1,41 +1,16 @@ ### Building -BEST=$(if $(shell command -v ocamlopt 2> /dev/null),native,byte) -BUILDER=_build/build/build.$(BEST) - .PHONY: all all: dune build ### Doc -.PHONY: doc wikidoc doc man alldoc -DOCS_DIR=src/lib/client src/lib/server src/ocamlbuild src/ppx -DOCS_HTML=$(addsuffix /api.docdir/index.html,$(DOCS_DIR)) -DOCS_WIKI=$(addsuffix /api.wikidocdir/index.wiki,$(DOCS_DIR)) -DOCS_MAN= src/lib/client/api.mandocdir/man.3oc \ - src/lib/server/api.mandocdir/man.3os \ - src/ocamlbuild/api.mandocdir/man.3o \ - src/ppx/api.mandocdir/man.3o +.PHONY: wikidoc doccp API_DIR=_build/doc/dev/api -doc: $(BUILDER) - $(BUILDER) $(DOCS_HTML) -wikidoc: $(BUILDER) - $(BUILDER) $(DOCS_WIKI) -man: $(BUILDER) - $(BUILDER) $(DOCS_MAN) -alldoc: man wikidoc doc - -doccp: alldoc - mkdir -p $(API_DIR)/server $(API_DIR)/client $(API_DIR)/ocamlbuild $(API_DIR)/ppx - cp -Rf _build/src/lib/server/api.wikidocdir/*.wiki $(API_DIR)/server/ - cp -Rf _build/src/lib/client/api.wikidocdir/*.wiki $(API_DIR)/client/ - cp -Rf _build/src/ocamlbuild/api.wikidocdir/*.wiki $(API_DIR)/ocamlbuild/ - cp -Rf _build/src/ppx/api.wikidocdir/*.wiki $(API_DIR)/ppx/ - cp -Rf doc/index.wiki $(API_DIR)/ +wikidoc: + bash build/gen_wikidoc.sh all -$(BUILDER): $(wildcard build/*.ml) - ocamlbuild -no-plugin -I src/ocamlbuild -no-links -use-ocamlfind build/build.$(BEST) 1> /dev/null - ocaml pkg/build.ml manpage=false native=true native-dynlink=true -builder: $(BUILDER) +doccp: wikidoc + cp -Rf doc/index.wiki $(API_DIR)/ ### Cleaning ### .PHONY: clean distclean diff --git a/README.build b/README.build deleted file mode 100644 index 9769d7564f..0000000000 --- a/README.build +++ /dev/null @@ -1,25 +0,0 @@ -== internal description of compilation/installation steps - - 1 - build custom ocamlbuild (build/build.native) - this custom ocamlbuld uses src/ocamlbuild/ocamlbuild_eliom.ml to - avoid duplication - - 2 - call `ocaml pkg/build.ml` (topkg) that will call the custom - builder (from 1) to build request targets - - 3 - eliom.install is generated and can be used by opam-installer - - -== How to update the build system - - - add new files - => update pkg/filelist.ml - client only files can be : src/lib/client/*.ml, src/lib/*.client.ml - server only files can be : src/lib/server/*.ml, src/lib/*.server.ml - common files can be : src/common/*.ml, src/*.eliom (with shared_section) - - - add packages requirement - => update pkg/META (if needed) and src/_tags "package(new_package)" - - - change version - update VERSION and pkg/META diff --git a/README.md b/README.md index f1fe495b79..564e71e1c1 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,24 @@ More documentation [here](https://ocsigen.org/tuto/latest/manual/basics). Write your first Web and mobile application with Eliom using [Ocsigen Start](https://ocsigen.org/ocsigen-start) +## Generating API documentation + +Wiki API pages are generated from the `.mli` files using `ocamldoc` +and the [wikidoc](https://github.com/ocsigen/wikidoc) plugin: + +``` +make wikidoc +``` + +Output goes to `_build/doc/dev/api/{server,client}/`. + +The wiki files are published on the [wikidoc branch] under +`doc/dev/api/{server,client}/`. To update the published documentation, +copy the generated `.wiki` files to a checkout of the `wikidoc` branch +and commit. + +[wikidoc branch]: https://github.com/ocsigen/eliom/tree/wikidoc/doc/dev/api + ## Authors * Vincent Balat diff --git a/build/_tags b/build/_tags deleted file mode 100644 index 8d971177ff..0000000000 --- a/build/_tags +++ /dev/null @@ -1 +0,0 @@ -<*.{ml,byte,native}>:package(unix,ocamlbuild,js_of_ocaml-ocamlbuild) diff --git a/build/build.ml b/build/build.ml deleted file mode 100644 index 44995935d4..0000000000 --- a/build/build.ml +++ /dev/null @@ -1,96 +0,0 @@ -open Ocamlbuild_plugin -module Pack = Ocamlbuild_pack - -let best = - if Sys.command "command -v ocamlopt > /dev/null" = 0 then "native" else "byte" - -module Conf = struct - let server_dir = "server" - let client_dir = "client" - let type_dir = "type_dir" -end - -module Intern = struct - let with_eliom_ppx = - Some - (function - | `Client -> "src/ppx/ppx_eliom_client_ex." ^ best - | `Server -> "src/ppx/ppx_eliom_server_ex." ^ best) - - let with_package = function - | "eliom.ppx.type" -> "pkg_ppx_eliom_types" - | "eliom.ppx.client" | "eliom.ppx.server" | "eliom.syntax.predef" - | "eliom.client" | "eliom.server" -> - (* do noting in this case *) "pkg_dummy" - | _ -> assert false -end - -module Eliom_plugin = Ocamlbuild_eliom.MakeIntern (Intern) (Conf) - -let _ = - dispatch (fun x -> - Eliom_plugin.dispatcher x; - match x with - | After_rules -> - Doc.init (); - let link source dest = - rule (Printf.sprintf "%s -> %s" source dest) ~dep:source ~prod:dest - (fun env _ -> - Cmd (S [A "ln"; A "-f"; P (env source); P (env dest)])) - in - (* add I pflag *) - pflag ["ocaml"; "compile"] "I" (fun x -> S [A "-I"; A x]); - pflag ["ocaml"; "infer_interface"] "I" (fun x -> S [A "-I"; A x]); - pflag ["ocaml"; "doc"] "I" (fun x -> S [A "-I"; A x]); - (* add syntax extension *) - let add_syntax name path = - let bytes_dep = Findlib.(link_flags_byte [query "bytes"]) in - (* hack : not dep when "compile" to avoid the extension syntax to be link with binaries *) - (* the dep with ocamldep make sure the extension syntax is compiled before *) - flag - ["ocaml"; "compile"; "pkg_" ^ name] - (S - [ A "-ppx" - ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); - flag - ["ocaml"; "ocamldep"; "pkg_" ^ name] - (S - [ A "-ppx" - ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); - dep ["ocaml"; "ocamldep"; "pkg_" ^ name] [path ^ name ^ "_ex." ^ best]; - flag_and_dep - ["ocaml"; "infer_interface"; "pkg_" ^ name] - (S - [ A "-ppx" - ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); - dep - ["ocaml"; "infer_interface"; "pkg_" ^ name] - [path ^ name ^ "_ex." ^ best]; - flag_and_dep - ["doc"; "pkg_" ^ name] - (S - [ A "-ppx" - ; Quote (S [P (path ^ name ^ "_ex." ^ best); A "-as-ppx"]) ]); - dep ["doc"; "pkg_" ^ name] [path ^ name ^ "_ex." ^ best] - in - add_syntax "ppx_eliom_utils" "src/ppx/"; - add_syntax "ppx_eliom_types" "src/ppx/"; - (* link executable aliases *) - let link_exec f t = - link - (Printf.sprintf "src/tools/%s.byte" f) - (Printf.sprintf "src/tools/%s.byte" t); - link - (Printf.sprintf "src/tools/%s.native" f) - (Printf.sprintf "src/tools/%s.native" t) - in - List.iter (link_exec "eliomc") ["eliomopt"; "eliomcp"; "js_of_eliom"]; - link_exec "distillery" "eliom-distillery" - | _ -> ()) - -let _ = - Options.make_links := false; - Options.plugin := false; - Options.use_ocamlfind := true; - Ocamlbuild_unix_plugin.setup (); - Ocamlbuild_pack.Main.main () diff --git a/build/doc.ml b/build/doc.ml deleted file mode 100644 index 9ffdc744cd..0000000000 --- a/build/doc.ml +++ /dev/null @@ -1,57 +0,0 @@ -open Ocamlbuild_plugin -module Pack = Ocamlbuild_pack - -(* Doc should move in its own ocamlbuild plugin *) - -(* Compile the wiki version of the Ocamldoc. - Thanks to Till Varoquaux on usenet: - http://www.digipedia.pl/usenet/thread/14273/231/ *) - -let ocamldoc_wiki tags deps docout docdir = - let tags = tags -- "extension:html" in - Ocamlbuild_pack.Ocaml_tools.ocamldoc_l_dir tags deps docout docdir - -let ocamldoc_man tags deps docout docdir = - let tags = - tags - (* -- "extension:html" *) - in - Ocamlbuild_pack.Ocaml_tools.ocamldoc_l_dir tags deps docout docdir - -let init_wikidoc () = - try - let wikidoc_dir = - let base = - Ocamlbuild_pack.My_unix.run_and_read "ocamlfind query wikidoc" - in - String.sub base 0 (String.length base - 1) - in - Ocamlbuild_pack.Rule.rule - "ocamldoc: document ocaml project odocl & *odoc -> wikidocdir" - ~insert:`top ~prod:"%.wikidocdir/index.wiki" - ~stamp:"%.wikidocdir/wiki.stamp" ~dep:"%.odocl" - (Ocamlbuild_pack.Ocaml_tools.document_ocaml_project - ~ocamldoc:ocamldoc_wiki "%.odocl" "%.wikidocdir/index.wiki" - "%.wikidocdir"); - flag ["wikidoc"] - & S [A "-colorize-code"; A "-i"; A wikidoc_dir; A "-g"; A "odoc_wiki.cma"]; - pflag ["wikidoc"] "subproject" (fun sub -> - S [A "-passopt"; A "-subproject"; A sub]) - with Failure e -> () -(* Silently fail if the package wikidoc isn't available *) - -let init_mandoc () = - Ocamlbuild_pack.Rule.rule - "ocamldoc: document ocaml project odocl & *odoc -> mandocdir" ~insert:`top - ~prod:"%.mandocdir/man.%(ext)" ~stamp:"%.mandocdir/man.%(ext).stamp" - ~dep:"%.odocl" - (Ocamlbuild_pack.Ocaml_tools.document_ocaml_project ~ocamldoc:ocamldoc_man - "%.odocl" "%.mandocdir/man.%(ext)" "%.mandocdir"); - pflag ["apiref"] "man_ext" (fun ext -> - S [A "-man-mini"; A "-man-section"; A ext; A "-man-suffix"; A ext]) - -let init () = - init_wikidoc (); - init_mandoc (); - (* ocamldoc intro *) - pflag_and_dep ["doc"] "with_intro" (fun f -> S [A "-intro"; P f]) diff --git a/build/gen_wikidoc.sh b/build/gen_wikidoc.sh new file mode 100755 index 0000000000..655004eaea --- /dev/null +++ b/build/gen_wikidoc.sh @@ -0,0 +1,113 @@ +#!/bin/sh +# Generate wiki API documentation using ocamldoc + wikidoc plugin. +# Replaces the old ocamlbuild-based doc generation. +# Usage: ./build/gen_wikidoc.sh [server|client|all] + +set -e + +WIKIDOC_DIR=$(ocamlfind query wikidoc) + +gen_doc() { + SIDE="$1" + + case "$SIDE" in + server) + CMI_DIR=_build/default/src/lib/server/.eliom_server.objs/byte + MLI_DIR=_build/default/src/lib/server/Eliom + DUNE_DIR=src/lib/server + ODOCL=src/lib/server/api.odocl + INTRO=doc/server.indexdoc + SUBPROJECT=server + ;; + client) + CMI_DIR=_build/default/src/lib/client/.eliom_client.objs/byte + MLI_DIR=_build/default/src/lib/client/Eliom + DUNE_DIR=src/lib/client + ODOCL=src/lib/client/api.odocl + INTRO=doc/client.indexdoc + SUBPROJECT=client + ;; + *) + echo "Unknown side: $SIDE"; exit 1 + ;; + esac + + # Ensure dune build is up to date + dune build @check 2>/dev/null || true + + # Get include paths from dune's merlin config + INCLUDES=$(dune ocaml dump-dot-merlin "$DUNE_DIR" 2>/dev/null \ + | grep "^B " | sed 's/^B /-I /' | tr '\n' ' ') + # Add js_of_ocaml (needed for type references in .mli files) + JSOO=$(ocamlfind query js_of_ocaml 2>/dev/null || true) + [ -n "$JSOO" ] && INCLUDES="$INCLUDES -I $JSOO" + + # Create temp directory with short-name .cmi aliases + TMPDIR=$(mktemp -d) + + echo "Creating module aliases for ocamldoc..." + for cmi in "$CMI_DIR"/eliom__*.cmi; do + base=$(basename "$cmi" .cmi) # eliom__Bus + short=$(echo "$base" | sed 's/^eliom__//') # Bus + # Module name: capitalize first letter (eliom__Bus -> Eliom__Bus) + modname=$(echo "${base}" | sed 's/^./\U&/') + echo "include ${modname}" > "$TMPDIR/${short}.ml" + done + # Compile in multiple passes to handle inter-dependencies + for pass in 1 2 3; do + compiled=0 + for ml in "$TMPDIR"/*.ml; do + short=$(basename "$ml" .ml) + if [ ! -f "$TMPDIR/${short}.cmi" ]; then + if eval ocamlfind ocamlc -c -I "$CMI_DIR" -I "$TMPDIR" $INCLUDES \ + -o "$TMPDIR/${short}.cmo" "$ml" 2>/dev/null; then + compiled=$((compiled + 1)) + fi + fi + done + echo " pass $pass: compiled $compiled new modules" + [ "$compiled" -eq 0 ] && break + done + echo " total: $(ls "$TMPDIR"/*.cmi 2>/dev/null | wc -l) cmi files" + + # Collect .mli files from odocl + MLIFILES="" + while IFS= read -r mod; do + mod=$(echo "$mod" | tr -d '[:space:]') + [ -z "$mod" ] && continue + mli="$MLI_DIR/$mod.mli" + if [ -f "$mli" ]; then + MLIFILES="$MLIFILES $mli" + else + echo " Warning: $mli not found, skipping" + fi + done < "$ODOCL" + + # Output directory + OUTDIR=_build/doc/dev/api/$SUBPROJECT + rm -rf "$OUTDIR" + mkdir -p "$OUTDIR" + + echo "Generating $SIDE wiki documentation..." + eval ocamldoc \ + -colorize-code \ + -I "$TMPDIR" \ + -I "$CMI_DIR" \ + $INCLUDES \ + -intro "$INTRO" \ + -g "$WIKIDOC_DIR/odoc_wiki.cma" \ + -d "$OUTDIR" \ + -subproject "$SUBPROJECT" \ + $MLIFILES + + NFILES=$(ls "$OUTDIR"/*.wiki 2>/dev/null | grep -cv "^.*index\|menu\|type_" || true) + echo "Done: $OUTDIR/" + + rm -rf "$TMPDIR" +} + +case "${1:-all}" in + server|client) gen_doc "$1" ;; + all) gen_doc server; gen_doc client ;; + *) echo "Usage: $0 [server|client|all]"; exit 1 ;; +esac diff --git a/doc/client.indexdoc b/doc/client.indexdoc index 38ccbe6758..2b8de68f53 100644 --- a/doc/client.indexdoc +++ b/doc/client.indexdoc @@ -1,28 +1,28 @@ {1 Client API} {!modules: -Eliom_lib -Eliom_client -Eliom_client_value +Lib +Client +Client_value } {2 Content and form creation} {!modules: -Eliom_content.Html -Eliom_content.Html.Manip -Eliom_content.Svg -Eliom_content.Xml +Content.Html +Content.Html.Manip +Content.Svg +Content.Xml } {2 Client/server communication} {!modules: -Eliom_service -Eliom_shared -Eliom_cscache -Eliom_bus -Eliom_comet +Service +Shared +Cscache +Bus +Comet Eliom_react } diff --git a/doc/index.wiki b/doc/index.wiki index c97e73a934..619df9cb20 100644 --- a/doc/index.wiki +++ b/doc/index.wiki @@ -8,5 +8,3 @@ <> <> - -<<|a_api subproject="ocamlbuild" text="The ocamlbuild plugin" | intro >> diff --git a/doc/server.indexdoc b/doc/server.indexdoc index 12b93a9a3f..536814756c 100644 --- a/doc/server.indexdoc +++ b/doc/server.indexdoc @@ -1,49 +1,49 @@ {1 Server API} {!modules: -Eliom_lib -Eliom_client -Eliom_client_value -Eliom_common -Eliom_config -Eliom_request_info -Eliom_reference -Eliom_state +Lib +Client +Client_value +Common +Config +Request_info +Reference +State } {2 Content and form creation} {!modules: -Eliom_content -Eliom_content.Html -Eliom_content.Svg -Eliom_content.Xml -Eliom_tools +Content +Content.Html +Content.Svg +Content.Xml +Tools } {2 Service creation} {!modules: -Eliom_service -Eliom_parameter -Eliom_registration -Eliom_registration.Html -Eliom_registration.Action -Eliom_registration.Ocaml -Eliom_registration.App -Eliom_registration.File -Eliom_registration.Any -Eliom_registration.Redirection +Service +Parameter +Registration +Registration.Html +Registration.Action +Registration.Ocaml +Registration.App +Registration.File +Registration.Any +Registration.Redirection } {2 Client/server communication} {!modules: -Eliom_shared -Eliom_notif -Eliom_cscache -Eliom_bus -Eliom_comet +Shared +Notif +Cscache +Bus +Comet Eliom_react } diff --git a/dune-project b/dune-project index 638d66306a..b23e6d1ffb 100644 --- a/dune-project +++ b/dune-project @@ -31,7 +31,6 @@ The client-side code is compiled to JS using Ocsigen Js_of_ocaml or to Wasm usin (wasm_of_ocaml-compiler (>= 6.3.2)) (js_of_ocaml (>= 6.3.2)) (js_of_ocaml-lwt (>= 6.3.2)) - (js_of_ocaml-ocamlbuild :build) (js_of_ocaml-ppx (>= 6.3.2)) (js_of_ocaml-ppx_deriving_json (>= 6.3.2)) (js_of_ocaml-tyxml (>= 6.3.2)) @@ -44,3 +43,9 @@ The client-side code is compiled to JS using Ocsigen Js_of_ocaml or to Wasm usin (ocsipersist (and (>= 2.0) (< 3.0))) ppx_optcomp (xml-light (>= "2.5")))) + +(package + (name eliom-compat) + (synopsis "Eliom: backward-compatible module names (Eliom_xxx)") + (description "Provides the old Eliom_xxx module names (e.g. Eliom_service, Eliom_content) as aliases to the new Eliom.Xxx modules. Use this package to ease migration of existing code.") + (depends (eliom (= :version)))) diff --git a/eliom-compat.opam b/eliom-compat.opam new file mode 100644 index 0000000000..8d5c4333ff --- /dev/null +++ b/eliom-compat.opam @@ -0,0 +1,29 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +version: "12.0.1" +synopsis: "Eliom: backward-compatible module names (Eliom_xxx)" +description: + "Provides the old Eliom_xxx module names (e.g. Eliom_service, Eliom_content) as aliases to the new Eliom.Xxx modules. Use this package to ease migration of existing code." +maintainer: ["dev@ocsigen.org"] +authors: ["dev@ocsigen.org"] +license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" +depends: [ + "dune" {>= "3.19"} + "eliom" {= version} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +x-maintenance-intent: ["(latest)"] diff --git a/eliom.opam b/eliom.opam index 3ba28a7988..8e861065b9 100644 --- a/eliom.opam +++ b/eliom.opam @@ -26,7 +26,6 @@ depends: [ "wasm_of_ocaml-compiler" {>= "6.3.2"} "js_of_ocaml" {>= "6.3.2"} "js_of_ocaml-lwt" {>= "6.3.2"} - "js_of_ocaml-ocamlbuild" {build} "js_of_ocaml-ppx" {>= "6.3.2"} "js_of_ocaml-ppx_deriving_json" {>= "6.3.2"} "js_of_ocaml-tyxml" {>= "6.3.2"} diff --git a/pkg/META b/pkg/META deleted file mode 100644 index 7dc1681224..0000000000 --- a/pkg/META +++ /dev/null @@ -1,122 +0,0 @@ -description = "Eliom: client-server Web and mobile applications" -version = "6.3.0" - -package "server" ( - description = "Eliom: server-side" - version = "[distributed with Eliom]" - directory = "server" - - requires = "ocsigenserver, - ocsipersist, - ppx_deriving.runtime, - js_of_ocaml.deriving, - react, - reactiveData, - tyxml, - lwt_react, - cryptokit, - reactiveData" - archive(byte) = "server.cma" - archive(native) = "server.cmxa" - - package "monitor" ( - directory = "monitor" - description = "Eliom: monitoring" - version = "[distributed with Eliom]" - archive(byte) = "eliom_monitor.cma" - archive(native) = "eliom_monitor.cmxa" - package "start" ( - description = "Eliom: monitoring" - version = "[distributed with Eliom]" - require = "eliom.server.monitor" - archive(byte) = "eliom_monitor_main.cma" - archive(native) = "eliom_monitor_main.cmxa" - ) - ) -) - -package "client" ( - description = "Eliom: client-side" - version = "[distributed with Eliom]" - directory = "client" - - requires = "ocsigenserver.cookies, - ocsigenserver.polytables, - ocsigenserver.baselib.base, - ppx_deriving.runtime, - js_of_ocaml, - js_of_ocaml.deriving, - js_of_ocaml-tyxml, - js_of_ocaml-lwt, - js_of_ocaml-lwt.logger, - lwt_react, - react, - reactiveData, - tyxml.functor" - archive(byte) = "client.cma eliom_client_main.cmo" - - jsoo_runtime = "eliom_client.js" - linkopts(javascript) = "+eliom.client/eliom_client.js" -) - -package "syntax" ( - package "predef" ( - description = "Syntax extension: predefined commonly use syntaxes" - version = "[distributed with Eliom]" - - requires(syntax, preprocessor) = "js_of_ocaml-camlp4,lwt_camlp4" - requires(syntax, toploop) = "js_of_ocaml-camlp4,lwt_camlp4" - archive(syntax, preprocessor) = "-ignore dummy" - ) - -) - -package "ppx" ( - directory = "ppx" - package "server" ( - description = "Ppx syntax extension: server side" - ppx(-ppx_driver,-custom_ppx) = "ppx_eliom_server" - archive(ppx_driver,byte) = "ppx_eliom_server.cma" - archive(ppx_driver,native) = "ppx_eliom_server.cmxa" - plugin(ppx_driver,byte) = "ppx_eliom_server.cma" - plugin(ppx_driver,native) = "ppx_eliom_server.cmxs" - requires(ppx_driver) = "ppxlib" - library_kind = "ppx_rewriter" - ) - package "client" ( - description = "Ppx syntax extension: client side" - ppx(-ppx_driver,-custom_ppx) = "ppx_eliom_client" - archive(ppx_driver,byte) = "ppx_eliom_client.cma" - archive(ppx_driver,native) = "ppx_eliom_client.cmxa" - plugin(ppx_driver,byte) = "ppx_eliom_client.cma" - plugin(ppx_driver,native) = "ppx_eliom_client.cmxs" - requires(ppx_driver) = "ppxlib" - library_kind = "ppx_rewriter" - ) - package "type" ( - description = "Ppx syntax extension: type inference" - ppx(-ppx_driver,-custom_ppx) = "ppx_eliom_types" - archive(ppx_driver,byte) = "ppx_eliom_type.cma" - archive(ppx_driver,native) = "ppx_eliom_type.cmxa" - plugin(ppx_driver,byte) = "ppx_eliom_type.cma" - plugin(ppx_driver,native) = "ppx_eliom_type.cmxs" - requires(ppx_driver) = "ppxlib" - library_kind = "ppx_rewriter" - ) -) - - -package "templates" ( - directory = "templates" -) - -package "ocamlbuild" ( - description = "Eliom ocamlbuild plugin (js_of_ocaml part included)" - version = "[distributed with Eliom]" - directory = "ocamlbuild" - requires = "js_of_ocaml-ocamlbuild" - archive(byte) = "ocamlbuild_eliom.cma" - archive(byte, plugin) = "ocamlbuild_eliom.cma" - archive(native) = "ocamlbuild_eliom.cmxa" - archive(native, plugin) = "ocamlbuild_eliom.cmxs" -) diff --git a/pkg/build.ml b/pkg/build.ml deleted file mode 100755 index cad36985c3..0000000000 --- a/pkg/build.ml +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env ocaml - -#directory "pkg" - -#use "topkg.ml" - -#use "filelist.ml" - -(* DEBUG ONLY *) -let nothing_should_be_rebuilt = false - -let except = function - (* cmxs are regerated every time ( bug in ocamlbuild rule) *) - | ".cmxs" when nothing_should_be_rebuilt -> false - | _ -> true -(* END *) - -let exts_syntax = - List.filter except [".cmo"; ".cmx"; ".cma"; ".cmxa"; ".cmxs"; ".a"] - -let exts_modlib = List.filter except Exts.module_library -let exts_lib = List.filter except Exts.library - -let _ = - list_to_file "src/lib/client/client.mllib" client_mllib; - list_to_file "src/lib/client/api.odocl" client_api; - list_to_file "src/lib/server/server.mllib" server_mllib; - list_to_file "src/lib/server/server.mldylib" server_mllib; - list_to_file "src/lib/server/api.odocl" server_api; - list_to_file "src/ocamlbuild/ocamlbuild.mllib" ocamlbuild_mllib; - list_to_file "src/ocamlbuild/ocamlbuild.mldylib" ocamlbuild_mllib; - list_to_file "src/ocamlbuild/api.odocl" ocamlbuild_api; - list_to_file "src/ppx/ppx.mllib" ppx_mllib; - list_to_file "src/ppx/ppx.mldylib" ppx_mllib; - list_to_file "src/ppx/api.odocl" ppx_api; - list_to_file "src/ppx/ppx.mllib" ppx_mllib; - list_to_file "src/ppx/ppx.mldylib" ppx_mllib; - list_to_file "src/ppx/api.odocl" ppx_api - -let spf = Printf.sprintf - -let nothing = - if nothing_should_be_rebuilt then "-nothing-should-be-rebuilt" else "" - -let best = if Env.native then "native" else "byte" -let builder = `Other ("_build/build/build." ^ best, "_build") -let with_man3 = Env.bool "manpage" - -let () = - Pkg.describe "eliom" ~builder - ([ (* META *) - Pkg.lib "pkg/META" - ; (* MANPAGE *) - Pkg.man ~dst:"man1/eliomc.1" "pkg/man/eliomc.1" - ; Pkg.man ~dst:"man1/eliomcp.1" "pkg/man/eliomc.1" - ; Pkg.man ~dst:"man1/eliomopt.1" "pkg/man/eliomc.1" - ; Pkg.man ~dst:"man1/eliomdep.1" "pkg/man/eliomc.1" - ; Pkg.man ~dst:"man1/js_of_eliom.1" "pkg/man/eliomc.1" - ; Pkg.man ~dst:"man1/eliom-distillery.1" "pkg/man/eliom-distillery.1" - ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3oc" - ~target:"src/lib/client/api.mandocdir/man.3oc" - "src/lib/client/api.mandocdir/%.3oc" - ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3os" - ~target:"src/lib/server/api.mandocdir/man.3os" - "src/lib/server/api.mandocdir/%.3os" - ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3o" - ~target:"src/ocamlbuild/api.mandocdir/man.3o" - "src/ocamlbuild/api.mandocdir/%.3o" - ; Pkg.man ~cond:with_man3 ~dst:"man3/%.3o" - ~target:"src/ppx/api.mandocdir/man.3o" "src/ppx/api.mandocdir/%.3o" - ; (* TOOLS *) - Pkg.bin ~auto:true "src/tools/eliomc" - ; Pkg.bin ~auto:true "src/tools/eliomcp" - ; Pkg.bin ~auto:true "src/tools/eliomdep" - ; Pkg.bin ~auto:true "src/tools/eliomopt" - ; Pkg.bin ~auto:true "src/tools/js_of_eliom" - ; Pkg.bin ~auto:true "src/tools/eliomdoc" - ; Pkg.bin ~auto:true "src/tools/eliompp" - ; Pkg.bin ~auto:true ~dst:"eliom-distillery" "src/tools/distillery" - ; Pkg.bin ~auto:true "src/ocamlbuild/eliombuild" - ; Pkg.lib ~exts:exts_modlib ~dst:"ocamlbuild/ocamlbuild_eliom" - "src/ocamlbuild/ocamlbuild_eliom" - ; (* PPX *) - Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom" - "src/ppx/ppx_eliom" - ; Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom_client" - "src/ppx/ppx_eliom_client" - ; Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom_type" - "src/ppx/ppx_eliom_type" - ; Pkg.lib ~exts:Exts.module_library ~dst:"ppx/ppx_eliom_server" - "src/ppx/ppx_eliom_server" - ; Pkg.bin ~auto:true ~dst:"ppx_eliom_client" "src/ppx/ppx_eliom_client_ex" - ; Pkg.bin ~auto:true ~dst:"ppx_eliom_server" "src/ppx/ppx_eliom_server_ex" - ; Pkg.bin ~auto:true ~dst:"ppx_eliom_types" "src/ppx/ppx_eliom_types_ex" ] - (* CLIENT LIBS *) - @ Pkg.lib ~dst:"client/client" ~exts:[".cma"] "src/lib/client/client" - :: Pkg.lib ~dst:"client/eliom_client_main.cmo" - "src/lib/client/eliom_client_main.cmo" - :: Pkg.lib ~dst:"client/eliom_client.js" "src/lib/client/eliom_client.js" - :: Pkg.lib ~dst:"client/libeliom_stubs.a" - "src/lib/client/libeliom_stubs.a" - :: Pkg.stublibs "src/lib/client/dlleliom_stubs.so" - :: List.map - (fun x -> - Pkg.lib ~dst:(spf "client/%s" x) (spf "src/lib/client/%s" x)) - client_extra - (* SERVER LIBS *) - @ Pkg.lib ~dst:"server/monitor/eliom_monitor" ~exts:Exts.module_library - "src/lib/server/monitor/eliom_monitor" - :: Pkg.lib ~dst:"server/monitor/eliom_monitor_main" - ~exts:Exts.module_library "src/lib/server/monitor/eliom_monitor_main" - :: Pkg.lib ~dst:"server/server" ~exts:exts_lib "src/lib/server/server" - :: List.map - (fun x -> - Pkg.lib ~dst:(spf "server/%s" x) (spf "src/lib/server/%s" x)) - server_extra - @ [ (* MISC *) - Pkg.doc "README.md" - ; Pkg.doc "CHANGES" - ; Pkg.etc "pkg/etc/mime.types" ] - @ List.flatten - (List.map - (fun (name, files) -> - List.map - (fun file -> - Pkg.lib - ~dst:(spf "templates/%s/%s" name file) - (spf "%s/%s/%s" templates_dir name file)) - files) - templates_files)) diff --git a/pkg/distillery/dune b/pkg/distillery/dune index 29d860ac88..fd5be521a1 100644 --- a/pkg/distillery/dune +++ b/pkg/distillery/dune @@ -1,8 +1,14 @@ (data_only_dirs templates) +; Install the distillery templates into lib/eliom/templates// +; so that eliom-distillery picks them up at the standard location. (install - (section lib) + (package eliom) + (section lib_root) (files - (glob_files templates/app.exe/**) - (glob_files templates/app.lib/**) - (glob_files templates/basic.ppx/**))) + (glob_files_rec + (templates/app.exe/* with_prefix eliom/templates/app.exe)) + (glob_files_rec + (templates/app.lib/* with_prefix eliom/templates/app.lib)) + (glob_files_rec + (templates/basic.ppx/* with_prefix eliom/templates/basic.ppx)))) diff --git a/pkg/distillery/templates/app.exe/Makefile.app b/pkg/distillery/templates/app.exe/Makefile.app index 5ad648b8cf..87beed6f80 100644 --- a/pkg/distillery/templates/app.exe/Makefile.app +++ b/pkg/distillery/templates/app.exe/Makefile.app @@ -41,10 +41,10 @@ DIST_FILES = $(ELIOMSTATICDIR)/$(PROJECT_NAME).js $(LIBDIR)/$(PROJECT_NAME).cma test.byte:: byte | $(addprefix $(TEST_PREFIX),$(DIST_DIRS)) staticfiles @echo "==== The website is available at http://localhost:$(TEST_PORT) ====" - dune exec ./$(PROJECT_NAME)_main.bc + dune exec ./$(PROJECT_NAME)_server.bc test.opt:: opt | $(addprefix $(TEST_PREFIX),$(DIST_DIRS)) staticfiles @echo "==== The website is available at http://localhost:$(TEST_PORT) ====" - dune exec ./$(PROJECT_NAME)_main.exe + dune exec ./$(PROJECT_NAME)_server.exe test.static.byte: test.byte @@ -120,11 +120,11 @@ ifeq ($(ENABLE_WASM),yes) endif byte:: js - $(ENV_PSQL) dune build $(DUNE_OPTIONS) $(PROJECT_NAME)_main.bc + $(ENV_PSQL) dune build $(DUNE_OPTIONS) $(PROJECT_NAME)_server.bc make config-files PROJECT_NAME=$(PROJECT_NAME) opt:: js - $(ENV_PSQL) dune build $(DUNE_OPTIONS) $(PROJECT_NAME)_main.exe + $(ENV_PSQL) dune build $(DUNE_OPTIONS) $(PROJECT_NAME)_server.exe make config-files PROJECT_NAME=$(PROJECT_NAME) run: diff --git a/pkg/distillery/templates/app.exe/PROJECT_NAME.eliom b/pkg/distillery/templates/app.exe/PROJECT_NAME.eliom index d09e9404fd..e3d7430d4e 100644 --- a/pkg/distillery/templates/app.exe/PROJECT_NAME.eliom +++ b/pkg/distillery/templates/app.exe/PROJECT_NAME.eliom @@ -2,19 +2,19 @@ Feel free to use it, modify it, and redistribute it as you wish. *) let%server application_name = "%%%PROJECT_NAME%%%" -let%client application_name = Eliom_client.get_application_name () +let%client application_name = Eliom.Client.get_application_name () let%server () = Ocsipersist_settings.set_db_file "local/var/data/%%%PROJECT_NAME%%%/%%%PROJECT_NAME%%%_db" (* Enable WebAssembly support with automatic browser detection. The server will load the WASM version if the browser supports it, with fallback to JavaScript otherwise. *) - ; Eliom_config.set_enable_wasm true + ; Eliom.Config.set_enable_wasm true (* Create a module for the application. See https://ocsigen.org/eliom/manual/clientserver-applications for more information. *) -module%shared App = Eliom_registration.App (struct +module%shared App = Eliom.Registration.App (struct let application_name = application_name let global_data_path = Some ["__global_data__"] end) @@ -22,25 +22,25 @@ module%shared App = Eliom_registration.App (struct (* As the headers (stylesheets, etc) won't change, we ask Eliom not to update the of the page when changing page. (This also avoids blinking when changing page in iOS). *) -let%client _ = Eliom_client.persist_document_head () +let%client _ = Eliom.Client.persist_document_head () let%server main_service = - Eliom_service.create ~path:(Eliom_service.Path []) - ~meth:(Eliom_service.Get Eliom_parameter.unit) () + Eliom.Service.create ~path:(Eliom.Service.Path []) + ~meth:(Eliom.Service.Get Eliom.Parameter.unit) () let%client main_service = ~%main_service let%shared () = App.register ~service:main_service (fun () () -> Lwt.return - Eliom_content.Html.F.( + Eliom.Content.Html.F.( html (head (title (txt "%%%PROJECT_NAME%%%")) [ css_link ~uri: (make_uri - ~service:(Eliom_service.static_dir ()) + ~service:(Eliom.Service.static_dir ()) ["css"; "%%%PROJECT_NAME%%%.css"]) () ]) (body [h1 [txt "Welcome to Eliom!"]]))) diff --git a/pkg/distillery/templates/app.exe/PROJECT_NAME_main.eliom b/pkg/distillery/templates/app.exe/PROJECT_NAME_server.eliom similarity index 88% rename from pkg/distillery/templates/app.exe/PROJECT_NAME_main.eliom rename to pkg/distillery/templates/app.exe/PROJECT_NAME_server.eliom index 014e221041..9c8dfb0112 100644 --- a/pkg/distillery/templates/app.exe/PROJECT_NAME_main.eliom +++ b/pkg/distillery/templates/app.exe/PROJECT_NAME_server.eliom @@ -4,7 +4,7 @@ module%shared %%%MODULE_NAME%%% = %%%MODULE_NAME%%% let%server _ = - Ocsigen_server.start + Ocsigen.Server.start ~ports:[`All, 8080] ~veryverbose:() ~debugmode:true @@ -14,5 +14,5 @@ let%server _ = ~usedefaulthostname:true ~command_pipe:"local/var/run/%%%PROJECT_NAME%%%-cmd" ~default_charset:(Some "utf-8") - [ Ocsigen_server.host - [Staticmod.run ~dir:"local/var/www/%%%PROJECT_NAME%%%" (); Eliom.run ()] ] + [ Ocsigen.Server.host + [Staticmod.run ~dir:"local/var/www/%%%PROJECT_NAME%%%" (); Eliom.App.run ()] ] diff --git a/pkg/distillery/templates/app.exe/dune b/pkg/distillery/templates/app.exe/dune index 30daabc8af..bc66ca1aad 100644 --- a/pkg/distillery/templates/app.exe/dune +++ b/pkg/distillery/templates/app.exe/dune @@ -3,7 +3,7 @@ (library (name %%%PROJECT_NAME%%%) (modules - (:standard \ %%%MODULE_NAME%%%_main)) + (:standard \ %%%MODULE_NAME%%%_server)) (libraries eliom.server ocsipersist-sqlite ocsipersist-sqlite.settings) (library_flags (:standard -linkall)) @@ -26,17 +26,17 @@ ))) (executables - (names %%%PROJECT_NAME%%%_main) + (names %%%PROJECT_NAME%%%_server) (public_names %%%PROJECT_NAME%%%) (modes (byte exe) (native exe)) (libraries eliom.server - ocsipersist-sqlite + ocsipersist-sqlite ocsigenserver.ext.staticmod %%%PROJECT_NAME%%%) - (modules %%%MODULE_NAME%%%_main) + (modules %%%MODULE_NAME%%%_server) (preprocess (pps ; pgocaml_ppx @@ -118,8 +118,8 @@ (alias %%%PROJECT_NAME%%%) (deps %%%PROJECT_NAME%%%.cma - %%%PROJECT_NAME%%%_main.bc - %%%PROJECT_NAME%%%_main.exe + %%%PROJECT_NAME%%%_server.bc + %%%PROJECT_NAME%%%_server.exe client/%%%PROJECT_NAME%%%.bc client/%%%PROJECT_NAME%%%.bc.js client/%%%PROJECT_NAME%%%.bc.wasm.js diff --git a/pkg/distillery/templates/app.lib/PROJECT_NAME.eliom b/pkg/distillery/templates/app.lib/PROJECT_NAME.eliom index 6fe38deee0..da08b32256 100644 --- a/pkg/distillery/templates/app.lib/PROJECT_NAME.eliom +++ b/pkg/distillery/templates/app.lib/PROJECT_NAME.eliom @@ -2,12 +2,12 @@ Feel free to use it, modify it, and redistribute it as you wish. *) let%server application_name = "%%%PROJECT_NAME%%%" -let%client application_name = Eliom_client.get_application_name () +let%client application_name = Eliom.Client.get_application_name () (* Create a module for the application. See https://ocsigen.org/eliom/manual/clientserver-applications for more information. *) -module%shared App = Eliom_registration.App (struct +module%shared App = Eliom.Registration.App (struct let application_name = application_name let global_data_path = Some ["__global_data__"] end) @@ -15,25 +15,25 @@ module%shared App = Eliom_registration.App (struct (* As the headers (stylesheets, etc) won't change, we ask Eliom not to update the of the page when changing page. (This also avoids blinking when changing page in iOS). *) -let%client _ = Eliom_client.persist_document_head () +let%client _ = Eliom.Client.persist_document_head () let%server main_service = - Eliom_service.create ~path:(Eliom_service.Path []) - ~meth:(Eliom_service.Get Eliom_parameter.unit) () + Eliom.Service.create ~path:(Eliom.Service.Path []) + ~meth:(Eliom.Service.Get Eliom.Parameter.unit) () let%client main_service = ~%main_service let%shared () = App.register ~service:main_service (fun () () -> Lwt.return - Eliom_content.Html.F.( + Eliom.Content.Html.F.( html (head (title (txt "%%%PROJECT_NAME%%%")) [ css_link ~uri: (make_uri - ~service:(Eliom_service.static_dir ()) + ~service:(Eliom.Service.static_dir ()) ["css"; "%%%PROJECT_NAME%%%.css"]) () ]) (body [h1 [txt "Welcome to Eliom!"]]))) diff --git a/pkg/distillery/templates/basic.ppx/PROJECT_NAME.eliom b/pkg/distillery/templates/basic.ppx/PROJECT_NAME.eliom index c04a600377..c9b39e9bad 100644 --- a/pkg/distillery/templates/basic.ppx/PROJECT_NAME.eliom +++ b/pkg/distillery/templates/basic.ppx/PROJECT_NAME.eliom @@ -1,20 +1,20 @@ [%%shared -open Eliom_lib -open Eliom_content +open Eliom.Lib +open Eliom.Content open Html.D ] module %%%MODULE_NAME%%%_app = - Eliom_registration.App ( + Eliom.Registration.App ( struct let application_name = "%%%PROJECT_NAME%%%" let global_data_path = None end) let main_service = - Eliom_service.create - ~path:(Eliom_service.Path []) - ~meth:(Eliom_service.Get Eliom_parameter.unit) + Eliom.Service.create + ~path:(Eliom.Service.Path []) + ~meth:(Eliom.Service.Get Eliom.Parameter.unit) () let () = @@ -22,7 +22,7 @@ let () = ~service:main_service (fun () () -> Lwt.return - (Eliom_tools.F.html + (Eliom.Tools.F.html ~title:"%%%PROJECT_NAME%%%" ~css:[["css";"%%%PROJECT_NAME%%%.css"]] Html.F.(body [ diff --git a/pkg/etc/mime.types b/pkg/etc/mime.types deleted file mode 100644 index 3485692d11..0000000000 --- a/pkg/etc/mime.types +++ /dev/null @@ -1,592 +0,0 @@ -# This is a comment. I love comments. - -# This file controls what Internet media types are sent to the client for -# given file extension(s). Sending the correct media type to the client -# is important so they know how to handle the content of the file. -# Extra types can either be added here or by using an AddType directive -# in your config files. For more information about Internet media types, -# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type -# registry is at . - -# MIME type Extensions -application/activemessage -application/andrew-inset ez -application/applefile -application/atom+xml atom -application/atomicmail -application/batch-smtp -application/beep+xml -application/cals-1840 -application/cnrp+xml -application/commonground -application/cpl+xml -application/cybercash -application/dca-rft -application/dec-dx -application/dvcs -application/edi-consent -application/edifact -application/edi-x12 -application/eshop -application/font-tdpfr -application/http -application/hyperstudio -application/iges -application/index -application/index.cmd -application/index.obj -application/index.response -application/index.vnd -application/iotp -application/ipp -application/isup -application/mac-binhex40 hqx -application/mac-compactpro cpt -application/macwriteii -application/marc -application/mathematica -application/mathml+xml mathml -application/msword doc -application/news-message-id -application/news-transmission -application/ocsp-request -application/ocsp-response -application/octet-stream bin dms lha lzh exe class so dll dmg -application/oda oda -application/ogg ogg -application/parityfec -application/pdf pdf -application/pgp-encrypted -application/pgp-keys -application/pgp-signature -application/pkcs10 -application/pkcs7-mime -application/pkcs7-signature -application/pkix-cert -application/pkix-crl -application/pkixcmp -application/postscript ai eps ps -application/prs.alvestrand.titrax-sheet -application/prs.cww -application/prs.nprend -application/prs.plucker -application/qsig -application/rdf+xml rdf -application/reginfo+xml -application/remote-printing -application/riscos -application/rtf -application/sdp -application/set-payment -application/set-payment-initiation -application/set-registration -application/set-registration-initiation -application/sgml -application/sgml-open-catalog -application/sieve -application/slate -application/smil smi smil -application/srgs gram -application/srgs+xml grxml -application/timestamp-query -application/timestamp-reply -application/tve-trigger -application/vemmi -application/vnd.3gpp.pic-bw-large -application/vnd.3gpp.pic-bw-small -application/vnd.3gpp.pic-bw-var -application/vnd.3gpp.sms -application/vnd.3m.post-it-notes -application/vnd.accpac.simply.aso -application/vnd.accpac.simply.imp -application/vnd.acucobol -application/vnd.acucorp -application/vnd.adobe.xfdf -application/vnd.aether.imp -application/vnd.amiga.ami -application/vnd.anser-web-certificate-issue-initiation -application/vnd.anser-web-funds-transfer-initiation -application/vnd.audiograph -application/vnd.blueice.multipass -application/vnd.bmi -application/vnd.businessobjects -application/vnd.canon-cpdl -application/vnd.canon-lips -application/vnd.cinderella -application/vnd.claymore -application/vnd.commerce-battelle -application/vnd.commonspace -application/vnd.contact.cmsg -application/vnd.cosmocaller -application/vnd.criticaltools.wbs+xml -application/vnd.ctc-posml -application/vnd.cups-postscript -application/vnd.cups-raster -application/vnd.cups-raw -application/vnd.curl -application/vnd.cybank -application/vnd.data-vision.rdz -application/vnd.dna -application/vnd.dpgraph -application/vnd.dreamfactory -application/vnd.dxr -application/vnd.ecdis-update -application/vnd.ecowin.chart -application/vnd.ecowin.filerequest -application/vnd.ecowin.fileupdate -application/vnd.ecowin.series -application/vnd.ecowin.seriesrequest -application/vnd.ecowin.seriesupdate -application/vnd.enliven -application/vnd.epson.esf -application/vnd.epson.msf -application/vnd.epson.quickanime -application/vnd.epson.salt -application/vnd.epson.ssf -application/vnd.ericsson.quickcall -application/vnd.eudora.data -application/vnd.fdf -application/vnd.ffsns -application/vnd.fints -application/vnd.flographit -application/vnd.framemaker -application/vnd.fsc.weblaunch -application/vnd.fujitsu.oasys -application/vnd.fujitsu.oasys2 -application/vnd.fujitsu.oasys3 -application/vnd.fujitsu.oasysgp -application/vnd.fujitsu.oasysprs -application/vnd.fujixerox.ddd -application/vnd.fujixerox.docuworks -application/vnd.fujixerox.docuworks.binder -application/vnd.fut-misnet -application/vnd.grafeq -application/vnd.groove-account -application/vnd.groove-help -application/vnd.groove-identity-message -application/vnd.groove-injector -application/vnd.groove-tool-message -application/vnd.groove-tool-template -application/vnd.groove-vcard -application/vnd.hbci -application/vnd.hhe.lesson-player -application/vnd.hp-hpgl -application/vnd.hp-hpid -application/vnd.hp-hps -application/vnd.hp-pcl -application/vnd.hp-pclxl -application/vnd.httphone -application/vnd.hzn-3d-crossword -application/vnd.ibm.afplinedata -application/vnd.ibm.electronic-media -application/vnd.ibm.minipay -application/vnd.ibm.modcap -application/vnd.ibm.rights-management -application/vnd.ibm.secure-container -application/vnd.informix-visionary -application/vnd.intercon.formnet -application/vnd.intertrust.digibox -application/vnd.intertrust.nncp -application/vnd.intu.qbo -application/vnd.intu.qfx -application/vnd.irepository.package+xml -application/vnd.is-xpr -application/vnd.japannet-directory-service -application/vnd.japannet-jpnstore-wakeup -application/vnd.japannet-payment-wakeup -application/vnd.japannet-registration -application/vnd.japannet-registration-wakeup -application/vnd.japannet-setstore-wakeup -application/vnd.japannet-verification -application/vnd.japannet-verification-wakeup -application/vnd.jisp -application/vnd.kde.karbon -application/vnd.kde.kchart -application/vnd.kde.kformula -application/vnd.kde.kivio -application/vnd.kde.kontour -application/vnd.kde.kpresenter -application/vnd.kde.kspread -application/vnd.kde.kword -application/vnd.kenameaapp -application/vnd.koan -application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop -application/vnd.llamagraphics.life-balance.exchange+xml -application/vnd.lotus-1-2-3 -application/vnd.lotus-approach -application/vnd.lotus-freelance -application/vnd.lotus-notes -application/vnd.lotus-organizer -application/vnd.lotus-screencam -application/vnd.lotus-wordpro -application/vnd.mcd -application/vnd.mediastation.cdkey -application/vnd.meridian-slingshot -application/vnd.micrografx.flo -application/vnd.micrografx.igx -application/vnd.mif mif -application/vnd.minisoft-hp3000-save -application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf -application/vnd.mobius.dis -application/vnd.mobius.mbk -application/vnd.mobius.mqy -application/vnd.mobius.msl -application/vnd.mobius.plc -application/vnd.mobius.txf -application/vnd.mophun.application -application/vnd.mophun.certificate -application/vnd.motorola.flexsuite -application/vnd.motorola.flexsuite.adsi -application/vnd.motorola.flexsuite.fis -application/vnd.motorola.flexsuite.gotap -application/vnd.motorola.flexsuite.kmr -application/vnd.motorola.flexsuite.ttc -application/vnd.motorola.flexsuite.wem -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry -application/vnd.ms-asf -application/vnd.ms-excel xls -application/vnd.ms-lrm -application/vnd.ms-powerpoint ppt -application/vnd.ms-project -application/vnd.ms-tnef -application/vnd.ms-works -application/vnd.ms-wpl -application/vnd.mseq -application/vnd.msign -application/vnd.music-niff -application/vnd.musician -application/vnd.netfpx -application/vnd.noblenet-directory -application/vnd.noblenet-sealer -application/vnd.noblenet-web -application/vnd.novadigm.edm -application/vnd.novadigm.edx -application/vnd.novadigm.ext -application/vnd.obn -application/vnd.osa.netdeploy -application/vnd.palm -application/vnd.pg.format -application/vnd.pg.osasli -application/vnd.powerbuilder6 -application/vnd.powerbuilder6-s -application/vnd.powerbuilder7 -application/vnd.powerbuilder7-s -application/vnd.powerbuilder75 -application/vnd.powerbuilder75-s -application/vnd.previewsystems.box -application/vnd.publishare-delta-tree -application/vnd.pvi.ptid1 -application/vnd.pwg-multiplexed -application/vnd.pwg-xhtml-print+xml -application/vnd.quark.quarkxpress -application/vnd.rapid -application/vnd.s3sms -application/vnd.sealed.net -application/vnd.seemail -application/vnd.shana.informed.formdata -application/vnd.shana.informed.formtemplate -application/vnd.shana.informed.interchange -application/vnd.shana.informed.package -application/vnd.smaf -application/vnd.sss-cod -application/vnd.sss-dtf -application/vnd.sss-ntf -application/vnd.street-stream -application/vnd.svd -application/vnd.swiftview-ics -application/vnd.triscape.mxs -application/vnd.trueapp -application/vnd.truedoc -application/vnd.ufdl -application/vnd.uplanet.alert -application/vnd.uplanet.alert-wbxml -application/vnd.uplanet.bearer-choice -application/vnd.uplanet.bearer-choice-wbxml -application/vnd.uplanet.cacheop -application/vnd.uplanet.cacheop-wbxml -application/vnd.uplanet.channel -application/vnd.uplanet.channel-wbxml -application/vnd.uplanet.list -application/vnd.uplanet.list-wbxml -application/vnd.uplanet.listcmd -application/vnd.uplanet.listcmd-wbxml -application/vnd.uplanet.signal -application/vnd.vcx -application/vnd.vectorworks -application/vnd.vidsoft.vidconference -application/vnd.visio -application/vnd.visionary -application/vnd.vividence.scriptfile -application/vnd.vsf -application/vnd.wap.sic -application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo -application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf -application/vnd.wv.csp+wbxml -application/vnd.xara -application/vnd.xfdl -application/vnd.yamaha.hv-dic -application/vnd.yamaha.hv-script -application/vnd.yamaha.hv-voice -application/vnd.yellowriver-custom-menu -application/voicexml+xml vxml -application/watcherinfo+xml -application/whoispp-query -application/whoispp-response -application/wita -application/wordperfect5.1 -application/x-bcpio bcpio -application/x-cdlink vcd -application/x-chess-pgn pgn -application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-director dcr dir dxr -application/x-dvi dvi -application/x-futuresplash spl -application/x-gtar gtar -application/x-gzip -application/x-hdf hdf -application/x-javascript js -application/x-koan skp skd skt skm -application/x-latex latex -application/x-netcdf nc cdf -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-stuffit sit -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-texinfo texinfo texi -application/x-troff t tr roff -application/x-troff-man man -application/x-troff-me me -application/x-troff-ms ms -application/x-ustar ustar -application/x-wais-source src -application/x400-bp -application/xhtml+xml xhtml xht -application/xslt+xml xslt -application/xml xml xsl -application/xml-dtd dtd -application/xml-external-parsed-entity -application/zip zip -audio/32kadpcm -audio/amr -audio/amr-wb -audio/basic au snd -audio/cn -audio/dat12 -audio/dsr-es201108 -audio/dvi4 -audio/evrc -audio/evrc0 -audio/g722 -audio/g.722.1 -audio/g723 -audio/g726-16 -audio/g726-24 -audio/g726-32 -audio/g726-40 -audio/g728 -audio/g729 -audio/g729D -audio/g729E -audio/gsm -audio/gsm-efr -audio/l8 -audio/l16 -audio/l20 -audio/l24 -audio/lpc -audio/midi mid midi kar -audio/mpa -audio/mpa-robust -audio/mp4a-latm -audio/mpeg mpga mp2 mp3 -audio/parityfec -audio/pcma -audio/pcmu -audio/prs.sid -audio/qcelp -audio/red -audio/smv -audio/smv0 -audio/telephone-event -audio/tone -audio/vdvi -audio/vnd.3gpp.iufp -audio/vnd.cisco.nse -audio/vnd.cns.anp1 -audio/vnd.cns.inf1 -audio/vnd.digital-winds -audio/vnd.everad.plj -audio/vnd.lucent.voice -audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 -audio/vnd.nuera.ecelp7470 -audio/vnd.nuera.ecelp9600 -audio/vnd.octel.sbc -audio/vnd.qcelp -audio/vnd.rhetorex.32kadpcm -audio/vnd.vmx.cvsd -audio/x-aiff aif aiff aifc -audio/x-alaw-basic -audio/x-mpegurl m3u -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin -application/vnd.rn-realmedia rm -audio/x-wav wav -chemical/x-pdb pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -image/g3fax -image/gif gif -image/ief ief -image/jpeg jpeg jpg jpe -image/naplps -image/png png -image/prs.btif -image/prs.pti -image/svg+xml svg -image/t38 -image/tiff tiff tif -image/tiff-fx -image/vnd.cns.inf2 -image/vnd.djvu djvu djv -image/vnd.dwg -image/vnd.dxf -image/vnd.fastbidsheet -image/vnd.fpx -image/vnd.fst -image/vnd.fujixerox.edmics-mmr -image/vnd.fujixerox.edmics-rlc -image/vnd.globalgraphics.pgb -image/vnd.mix -image/vnd.ms-modi -image/vnd.net-fpx -image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff -image/x-cmu-raster ras -image/x-icon ico -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -message/delivery-status -message/disposition-notification -message/external-body -message/http -message/news -message/partial -message/rfc822 -message/s-http -message/sip -message/sipfrag -model/iges igs iges -model/mesh msh mesh silo -model/vnd.dwf -model/vnd.flatland.3dml -model/vnd.gdl -model/vnd.gs-gdl -model/vnd.gtw -model/vnd.mts -model/vnd.parasolid.transmit.binary -model/vnd.parasolid.transmit.text -model/vnd.vtu -model/vrml wrl vrml -multipart/alternative -multipart/appledouble -multipart/byteranges -multipart/digest -multipart/encrypted -multipart/form-data -multipart/header-set -multipart/mixed -multipart/parallel -multipart/related -multipart/report -multipart/signed -multipart/voice-message -text/calendar ics ifb -text/css css -text/directory -text/enriched -text/html html htm -text/parityfec -text/plain asc txt -text/prs.lines.tag -text/rfc822-headers -text/richtext rtx -text/rtf rtf -text/sgml sgml sgm -text/t140 -text/tab-separated-values tsv -text/uri-list -text/vnd.abc -text/vnd.curl -text/vnd.dmclientscript -text/vnd.fly -text/vnd.fmi.flexstor -text/vnd.in3d.3dml -text/vnd.in3d.spot -text/vnd.iptc.nitf -text/vnd.iptc.newsml -text/vnd.latex-z -text/vnd.motorola.reflex -text/vnd.ms-mediapackage -text/vnd.net2phone.commcenter.command -text/vnd.sun.j2me.app-descriptor -text/vnd.wap.si -text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-setext etx -text/xml -text/xml-external-parsed-entity -video/bmpeg -video/bt656 -video/celb -video/dv -video/h261 -video/h263 -video/h263-1998 -video/h263-2000 -video/jpeg -video/mp1s -video/mp2p -video/mp2t -video/mp4v-es -video/mpv -video/mpeg mpeg mpg mpe -video/nv -video/parityfec -video/pointer -video/quicktime qt mov -video/smpte292m -video/vnd.fvt -video/vnd.motorola.video -video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.nokia.interleaved-multimedia -video/vnd.objectvideo -video/vnd.vivo -video/x-msvideo avi -video/x-sgi-movie movie -x-conference/x-cooltalk ice diff --git a/pkg/filelist.ml b/pkg/filelist.ml deleted file mode 100644 index d3601f5a90..0000000000 --- a/pkg/filelist.ml +++ /dev/null @@ -1,181 +0,0 @@ -type descr = - {interface_only : string list; interface : string list; internal : string list} - -let server = - { interface_only = - [ "eliom_content_sigs" - ; "eliom_form_sigs" - ; "eliom_parameter_sigs" - ; "eliom_registration_sigs" - ; "eliom_service_sigs" - ; "eliom_shared_sigs" ] - ; interface = - [ "eliom_bus" - ; "eliom_client_value" - ; "eliom_syntax" - ; "eliom_client" - ; "eliom_comet" - ; "eliom_common" - ; "eliom_config" - ; "eliom_content" - ; "eliom_extension" - ; "eliom_lib" - ; "eliom_mkreg" - ; "eliom_notif" - ; "eliom_parameter" - ; "eliom_react" - ; "eliom_shared" - ; "eliom_cscache" - ; "eliom_reference" - ; "eliom_registration" - ; "eliom_request_info" - ; "eliom_service" - ; "eliom_state" - ; "eliom_tools" - ; "eliom_types" - ; "eliom_uri" - ; "eliom_wrap" ] - ; internal = - [ "eliom_comet_base" - ; "eliom_common_base" - ; "eliom_runtime" - ; "eliom_content_" - ; "eliom_content_core" - ; "eliom_cookies_base" - ; "eliom_error_pages" - ; "eliom_form" - ; "eliom_lazy" - ; "eliom_lib_base" - ; "eliom_parameter_base" - ; "eliom_process" - ; "eliom_service_base" - ; "eliom_route" - ; "eliom_route_base" - ; "eliom_shared_content" - ; "eliom_types_base" - ; "eliom_client_main" - ; "eliommod" - ; "eliommod_cli" - ; "eliommod_cookies" - ; "eliommod_datasess" - ; "eliommod_gc" - ; "eliommod_pagegen" - ; "eliommod_parameters" - ; "eliommod_persess" - ; "eliommod_sersess" - ; "eliommod_sessadmin" - ; "eliommod_sessexpl" - ; "eliommod_sessiongroups" - ; "eliommod_timeouts" ] } - -let client = - { interface_only = - [ "eliom_content_sigs" - ; "eliom_form_sigs" - ; "eliom_parameter_sigs" - ; "eliom_registration_sigs" - ; "eliom_service_sigs" - ; "eliom_shared_sigs" ] - ; interface = - [ "eliom_bus" - ; "eliom_client_value" - ; "eliom_client_core" - ; "eliom_client" - ; "eliom_comet" - ; "eliom_config" - ; "eliom_content" - ; "eliom_content_core" - ; "eliom_lazy" - ; "eliom_lib" - ; "eliom_parameter" - ; "eliom_react" - ; "eliom_shared" - ; "eliom_cscache" - ; "eliom_registration" - ; "eliom_service" - ; "eliom_tools" - ; "eliom_types" - ; "eliom_unwrap" - ; "eliom_uri" ] - ; internal = - [ "eliom_comet_base" - ; "eliom_common" - ; "eliom_common_base" - ; "eliom_runtime" - ; "eliom_content_" - ; "eliom_cookies_base" - ; "eliom_form" - ; "eliom_lib_base" - ; "eliom_parameter_base" - ; "eliom_process" - ; "eliom_request" - ; "eliom_request_info" - ; "eliom_service_base" - ; "eliom_route" - ; "eliom_route_base" - ; "eliom_shared_content" - ; "eliom_types_base" - ; "eliommod_cookies" - ; "eliommod_dom" - ; "eliommod_parameters" ] } - -let server_ext = - { interface_only = [] - ; interface = ["atom_feed"; "eliom_atom"; "eliom_openid"; "eliom_s2s"] - ; internal = [] } - -let ocamlbuild = - {interface_only = []; interface = ["ocamlbuild_eliom"]; internal = []} - -let ppx = - { interface_only = [] - ; interface = - ["ppx_eliom"; "ppx_eliom_client"; "ppx_eliom_type"; "ppx_eliom_server"] - ; internal = ["ppx_eliom_utils"] } - -let ( -.- ) name ext = name ^ "." ^ ext - -let exts el sl = - List.flatten (List.map (fun ext -> List.map (fun name -> name -.- ext) sl) el) - -let list_to_file filename list = - let oc = open_out filename in - List.iter (fun s -> output_string oc s; output_char oc '\n') list; - close_out oc - -let client_mllib = client.interface @ client.internal -let client_extra = exts ["cmi"] (client.interface_only @ client.interface) -let client_api = client.interface_only @ client.interface -let server_mllib = server.interface @ server.internal - -let server_extra = - exts ["cmi"] (server.interface_only @ server.interface) - @ exts ["cmx"] (server.interface @ server.internal) - -let server_api = server.interface_only @ server.interface -let server_ext_mllib = server_ext.interface @ server_ext.internal - -let server_ext_extra = - exts ["cmi"] (server_ext.interface_only @ server_ext.interface) - @ exts ["cmx"] (server_ext.interface @ server_ext.internal) - -let ocamlbuild_mllib = ocamlbuild.interface @ ocamlbuild.internal - -let ocamlbuild_extra = - exts ["cmi"] (ocamlbuild.interface_only @ ocamlbuild.interface) - @ exts ["cmx"] (ocamlbuild.interface @ ocamlbuild.internal) - -let ocamlbuild_api = ocamlbuild.interface_only @ ocamlbuild.interface -let ppx_mllib = ppx.interface @ ppx.internal - -let ppx_extra = - exts ["cmi"] ppx.interface @ exts ["cmx"] (ppx.interface @ ppx.internal) - -let ppx_api = ppx.interface -let templates_dir = "pkg/distillery/templates" -let templates = Array.to_list (Sys.readdir templates_dir) - -let templates_files = - List.map - (fun name -> name, Array.to_list (Sys.readdir (templates_dir ^ "/" ^ name))) - templates diff --git a/pkg/man/eliom-distillery.1 b/pkg/man/eliom-distillery.1 deleted file mode 100644 index 850b5ec81e..0000000000 --- a/pkg/man/eliom-distillery.1 +++ /dev/null @@ -1,47 +0,0 @@ -.TH eliom-distillery 1 2012-12-17 -.SH NAME -eliom-distillery \- Scaffolding for your Eliom-projects. -.SH SYNOPSIS -.B eliom-distillery -.BI \-dir - -.B eliom-distillery -.BI \-name \ name -[ -.BI \-template \