-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It adds a `[sites]` section in packages' description. In this section, one can declare the sites like `etc = ["conf"]` which will trigger the `etc/<package>/conf` directory. As we follow the general `dune` semantic, only the following root sites are available: - `lib` - `bin` - `sbin` - `toplevel` - `share` - `etc` - `stublibs` - `doc` For `lib` and `share`, additionnal specification must be provided : ``` [[sites.lib]] root = false exec = true dir = "foo" [[sites.share]] root = true dir = "www" ``` `root` means that `<package>` subdir shall be ignored (default is `false`) and `exec` means that executable flag must be set for files installed here (ignored in `share` and default is `false`). By default, the generated dynamic sites modules is "Sites" accessible through `<package module>.Sites`. One can modify this name in `name` field : ``` [sites] name = "mysites" ``` will provide the `Mysites` module instead of `Sites`.
- Loading branch information
Julien Blond
committed
Jul 15, 2024
1 parent
61aee33
commit b5aa183
Showing
33 changed files
with
797 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
*~ | ||
_build | ||
.merlin | ||
.vscode | ||
/_drom | ||
/_opam | ||
/_build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Maintained by "drom project" | ||
.PHONY: $(DROMNS)build $(DROMNS)build-deps $(DROMNS)fmt $(DROMNS)fmt-check | ||
.PHONY: $(DROMNS)install $(DROMNS)dev-deps $(DROMNS)test | ||
.PHONY: $(DROMNS)clean $(DROMNS)distclean | ||
|
||
DROM_DEV_DEPS := merlin ocamlformat odoc ppx_expect ppx_inline_test $(DEV_DEPS) | ||
|
||
|
||
SPHINX_TARGET:=_drom/docs/sphinx | ||
|
||
ODOC_TARGET:=_drom/docs/doc/. | ||
|
||
|
||
$(DROMNS)build: | ||
./scripts/before.sh build | ||
opam exec -- dune build @install | ||
./scripts/copy-bin.sh drom drom_lib drom_toml | ||
./scripts/after.sh build | ||
|
||
$(DROMNS)build-deps: | ||
if ! [ -e _opam ]; then \ | ||
opam switch create . 4.14.1 ; \ | ||
fi | ||
opam install ./opam/*.opam --deps-only | ||
|
||
|
||
.PHONY: $(DROMNS)doc-common $(DROMNS)odoc $(DROMNS)view | ||
.PHONY: $(DROMNS)sphinx | ||
$(DROMNS)doc-common: $(DROMNS)build | ||
mkdir -p _drom/docs | ||
rsync -auv docs/. _drom/docs/. | ||
|
||
$(DROMNS)sphinx: $(DROMNS)doc-common | ||
./scripts/before.sh sphinx ${SPHINX_TARGET} | ||
sphinx-build sphinx ${SPHINX_TARGET} | ||
./scripts/after.sh sphinx ${SPHINX_TARGET} | ||
|
||
$(DROMNS)odoc: $(DROMNS)doc-common | ||
mkdir -p ${ODOC_TARGET} | ||
./scripts/before.sh odoc ${ODOC_TARGET} | ||
opam exec -- dune build @doc | ||
rsync -auv --delete _build/default/_doc/_html/. ${ODOC_TARGET} | ||
./scripts/after.sh odoc ${ODOC_TARGET} | ||
|
||
$(DROMNS)doc: $(DROMNS)doc-common $(DROMNS)odoc $(DROMNS)sphinx | ||
|
||
$(DROMNS)view: | ||
xdg-open file://$$(pwd)/_drom/docs/index.html | ||
|
||
$(DROMNS)fmt: | ||
opam exec -- dune build @fmt --auto-promote | ||
|
||
$(DROMNS)fmt-check: | ||
opam exec -- dune build @fmt | ||
|
||
$(DROMNS)install: | ||
opam pin -y --no-action -k path . | ||
opam install -y . | ||
|
||
$(DROMNS)opam: | ||
opam pin -k path . | ||
|
||
$(DROMNS)uninstall: | ||
opam uninstall . | ||
|
||
$(DROMNS)dev-deps: | ||
opam install ./opam/*.opam --deps-only --with-doc --with-test | ||
|
||
$(DROMNS)test: | ||
./scripts/before.sh test | ||
opam exec -- dune build @runtest | ||
./scripts/after.sh test | ||
|
||
$(DROMNS)clean: | ||
rm -rf _build | ||
rm -f *.exe *~ | ||
./scripts/after.sh clean | ||
|
||
$(DROMNS)distclean: $(DROMNS)clean | ||
rm -rf _opam _drom | ||
./scripts/after.sh distclean | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
[project] | ||
create-project = false | ||
drom-version = "0.1" | ||
drom-version = "0.9.2" | ||
share-repo = "https://github.com/OCamlPro/drom-share" | ||
share-version = "0.9.0" | ||
share-version = "branch:ninjapouet:prepare_sites" | ||
|
||
[project] | ||
authors = ["Fabrice Le Fessant <[email protected]>", "Léo Andrès <[email protected]>"] | ||
|
@@ -42,6 +42,8 @@ skip = ["sphinx/about.rst", "src/drom_lib/main.ml", "sphinx/index.rst", "CHANGES | |
[dependencies] | ||
|
||
# project-wide tools dependencies (not for package-specific deps) | ||
[tools] | ||
dune = ">=2.8" | ||
[tools.ocamlformat] | ||
for-test = true | ||
[tools.odoc] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.