Skip to content

Commit

Permalink
Migrate to dune.
Browse files Browse the repository at this point in the history
  • Loading branch information
gildor478 committed Oct 15, 2019
1 parent cc850f4 commit 0f3b64a
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 310 deletions.
120 changes: 0 additions & 120 deletions .boring

This file was deleted.

10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dist/
_build/
setup.data
setup.log
test.byte
/dist/
/_build/
*.merlin
/*.install
*.swp
4 changes: 0 additions & 4 deletions .merlin

This file was deleted.

114 changes: 27 additions & 87 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,97 +1,37 @@
default: test
default: build test

# OASIS_START
# DO NOT EDIT (digest: bc1e05bfc8b39b664f29dae8dbd3ebbb)
build:
dune build @install

SETUP = ocaml setup.ml
doc:
dune build @doc

build: setup.data
$(SETUP) -build $(BUILDFLAGS)
test:
dune runtest

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)
all:
dune build @all
dune runtest

test: setup.data build
$(SETUP) -test $(TESTFLAGS)
install: build
dune install

all:
$(SETUP) -all $(ALLFLAGS)
uninstall: all
dune uninstall

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
clean:
dune clean

uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)
headache: distclean
headache -h .header \
-c .headache.config \
`find $(CURDIR)/ -type d -name .git -prune -false -o -type f`

reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)
deploy: doc test
dune-release lint
dune-release tag
git push --all
git push --tag
dune-release

clean:
$(SETUP) -clean $(CLEANFLAGS)

distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)

setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP

# Precommit target
# Check style of code.
PRECOMMIT_ARGS= \
--exclude myocamlbuild.ml \
--exclude setup.ml \
--exclude README.txt \
--exclude INSTALL.txt \
--exclude Makefile \
--exclude configure \
--exclude _tags

precommit:
-@if command -v OCamlPrecommit > /dev/null; then \
OCamlPrecommit $(PRECOMMIT_ARGS); \
else \
echo "Skipping precommit checks.";\
fi

precommit-full:
OCamlPrecommit --full $(PRECOMMIT_ARGS)

test: precommit

.PHONY: precommit

# Headache target
# Fix license header of file.

headache:
find ./ \
-name _darcs -prune -false \
-name .git -prune -false \
-name .svn -prune -false \
-o -name _build -prune -false \
-o -name dist -prune -false \
-o -name '*[^~]' -type f \
| xargs headache -h _header -c _headache.config

.PHONY: headache

# Deploy target
# Deploy/release the software.

deploy: headache
# TODO: create a plugin to create documentation.
# oasis doc-dist
admin-gallu-deploy --verbose \
--forge_upload --forge_group ocaml-markdown --forge_user gildor-admin
# TODO: when oasis doc-dist will work, re-add.
# --forge_extra_file "dist/ocaml-markdown-doc-$(shell oasis query version).tar.gz"
# TODO: create a plugin to send announcement.
# oasis announce
admin-gallu-oasis-increment \
--setup_run --setup_args "-setup-update dynamic" --use_vcs

.PHONY: deploy
.PHONY: build doc test all uninstall clean install bench deploy
39 changes: 0 additions & 39 deletions _oasis

This file was deleted.

27 changes: 0 additions & 27 deletions configure

This file was deleted.

4 changes: 4 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(lang dune 1.11)
(name markdown)
(explicit_js_mode)
(using fmt 1.2)
29 changes: 29 additions & 0 deletions markdown.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
opam-version: "2.0"
maintainer: "Sylvain Le Gall <sylvain+ocaml@le-gall.net>"
authors: [ "Sylvain Le Gall" "Mauricio Fernandez" ]
license: "MIT"
homepage: "https://github.com/gildor478/ocaml-markdownt"
dev-repo: "git+https://github.com/gildor478/ocaml-markdown.git"
bug-reports: "https://github.com/gildor478/ocaml-markdown/issues"
doc: "https://gildor478.github.io/ocaml-markdown/"
build: [
["dune" "build" "-p" name "-j" jobs
"@install"
"@doc" {with-doc}
"@runtest" {with-test}]
]
depends: [
"ocaml" {>= "4.03.0"}
"dune" {>= "1.11.0"}
"ounit2" {with-test & > "2.0.8"}
"batteries" {>= "2.10.0"}
"tyxml" {>= "4.3.0"}
]
conflicts: [
"ocaml-markdown"
]
synopsis: "Markdown processor for Ocsigen"
description:"""
This is a pure OCaml parser for Markdown files. It was originally written for
Ocsigen but may be useful in other contexts too.
"""
13 changes: 0 additions & 13 deletions setup.ml

This file was deleted.

Loading

0 comments on commit 0f3b64a

Please sign in to comment.