Skip to content

Commit

Permalink
Merge pull request simonjbeaumont#1 from psafont/dune
Browse files Browse the repository at this point in the history
Dunify project
  • Loading branch information
lindig committed Apr 15, 2020
2 parents 936cff8 + a9d36e4 commit 6c5a563
Show file tree
Hide file tree
Showing 29 changed files with 137 additions and 9,460 deletions.
28 changes: 0 additions & 28 deletions .docgen.sh

This file was deleted.

7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
_build
setup.data
setup.log
*.native
*.byte
*.docdir
.merlin
*.install
.coverage/
.gh-pages/
30 changes: 20 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
language: c
sudo: required
dist: trusty
branches:
only: master
os: linux
dist: xenial
install:
- wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-opam.sh
- wget https://raw.githubusercontent.com/simonjbeaumont/ocaml-travisci-skeleton/docgen/.travis-docgen.sh
- wget https://raw.githubusercontent.com/simonjbeaumont/ocaml-travis-coveralls/master/travis-coveralls.sh
script: bash -ex .travis-opam.sh && bash -ex .travis-docgen.sh && bash -ex travis-coveralls.sh
- wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
script: bash -ex .travis-opam.sh
jobs:
include:
- env: OCAML_VERSION=4.08
- env: OCAML_VERSION=4.10
env:
global:
- OCAML_VERSION=4.02 TESTS=true
- COV_CONF="./configure --enable-tests"
- secure: jgNNAbrODFH0dyZLrXD/zSI/U4luCwalj/Lqoz3IRMXwscshmIQDcp0KCghh6s65qCuMDlVjVwM8Kn+wftY40HRuuf+XA6hMpH8Jmbr4Qi3l5EnotLS4AH/GWhu/nP3F3MbaML+kUgg0GeH19qZ4npteefhDcONxw6xtvIR/6rg=
- PACKAGE="pci"

deploy:
provider: pages:git
local_dir: $TRAVIS_BUILD_DIR/_build/default/_doc/_html
token: $GITHUB_TOKEN
keep_history: true
target_branch: gh_pages
on:
branch: master
condition: $OCAML_VERSION = 4.10
edge: true
45 changes: 9 additions & 36 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,46 +1,19 @@
# OASIS_START
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)

SETUP = ocaml setup.ml

build: setup.data
$(SETUP) -build $(BUILDFLAGS)

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)

test: setup.data build
$(SETUP) -test $(TESTFLAGS)
.PHONY: all test clean

all:
$(SETUP) -all $(ALLFLAGS)
dune build --profile=release

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
test:
dune runtest -p pci

uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)
install:
dune install pci

reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)
doc:
dune build -p pci @doc

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

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

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

configure:
$(SETUP) -configure $(CONFIGUREFLAGS)

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

# OASIS_STOP
gh-pages:
bash .docgen.sh
dune clean

travis-coveralls.sh:
wget https://raw.githubusercontent.com/simonjbeaumont/ocaml-travis-coveralls/master/$@
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ The easiest way to install this library is to use `opam`:
However, if you don't use `opam`, you can compile from source by cloning this
repo and executing the usual dance:

./configure
make
make install

Expand Down
78 changes: 0 additions & 78 deletions _oasis

This file was deleted.

84 changes: 0 additions & 84 deletions _tags

This file was deleted.

12 changes: 0 additions & 12 deletions bindings/META

This file was deleted.

5 changes: 5 additions & 0 deletions bindings/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(library
(name pci_bindings)
(public_name pci.bindings)
(libraries ctypes.stubs ctypes ctypes.foreign.threaded)
)
4 changes: 0 additions & 4 deletions bindings/pci_bindings.mldylib

This file was deleted.

4 changes: 0 additions & 4 deletions bindings/pci_bindings.mllib

This file was deleted.

1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 2.0)
4 changes: 4 additions & 0 deletions examples/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(executable
(name lspci)
(libraries pci)
)
12 changes: 0 additions & 12 deletions lib/META

This file was deleted.

25 changes: 25 additions & 0 deletions lib/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(rule
(targets ffi_generated.ml)
(deps ../stubgen/ffi_stubgen.exe)
(action (with-stdout-to %{targets} (bash "%{deps} -ml")))
)

(rule
(targets ffi_generated_stubs.c)
(deps ../stubgen/ffi_stubgen.exe)
(action (with-stdout-to %{targets} (bash "%{deps} -c")))
)

(rule
(targets ffi_generated_types.ml)
(deps ../stubgen/ffi_ml_types_stubgen.exe)
(action (with-stdout-to %{targets} (bash "%{deps} -c")))
)

(library
(name pci)
(public_name pci)
(foreign_stubs (language c) (names ffi_generated_stubs) (flags -lpci))
(c_library_flags -lpci)
(libraries pci_bindings ctypes.stubs)
)
4 changes: 0 additions & 4 deletions lib/libpci_stubs.clib

This file was deleted.

Loading

0 comments on commit 6c5a563

Please sign in to comment.