Skip to content

Commit 79b77f0

Browse files
committed
Remove creation phase
1 parent 6e62bd3 commit 79b77f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3615
-213
lines changed

.drom

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,14 @@ f7a24abcad0ba9301c03bb64464b1718:.gitignore
3030

3131
# begin context for .ocp-indent
3232
# file .ocp-indent
33-
1281376e351d6c2be9ea4c576a29ebd4:.ocp-indent
33+
6048407431b8d9baf725ae5365d4c2f2:.ocp-indent
3434
# end context for .ocp-indent
3535

36+
# begin context for .vscode/tasks.json
37+
# file .vscode/tasks.json
38+
7884eee2b10cf89cff5d1e466646b046:.vscode/tasks.json
39+
# end context for .vscode/tasks.json
40+
3641
# begin context for CHANGES.md
3742
# file CHANGES.md
3843
7a038eccc259630a7aaa876eceb826ba:CHANGES.md
@@ -45,7 +50,7 @@ cf4da9c43c0026cec0ba46b9cfe8407e:LICENSE.md
4550

4651
# begin context for Makefile
4752
# file Makefile
48-
9018881cf0682f4f7f262417b0d4f9ff:Makefile
53+
ae9611fad30a07ccb4a010556d51bdea:Makefile
4954
# end context for Makefile
5055

5156
# begin context for Makefile.drom
@@ -55,7 +60,7 @@ cf4da9c43c0026cec0ba46b9cfe8407e:LICENSE.md
5560

5661
# begin context for README.md
5762
# file README.md
58-
5d523350230459e853bc57803b729e29:README.md
63+
616ddd2660258447be65bdb664b9241d:README.md
5964
# end context for README.md
6065

6166
# begin context for docs/README.txt
@@ -65,7 +70,7 @@ bfbacf00053bb9ab2a6e2ce94ed4a642:docs/README.txt
6570

6671
# begin context for docs/doc/index.html
6772
# file docs/doc/index.html
68-
8c90147085379063e18134a7f18f079b:docs/doc/index.html
73+
c63c3154117c3bd726dc9e43be11eb2d:docs/doc/index.html
6974
# end context for docs/doc/index.html
7075

7176
# begin context for docs/favicon.png
@@ -80,7 +85,7 @@ e739f3026aa997af4026bc428f4c9ef6:docs/favicon.png
8085

8186
# begin context for docs/sphinx/index.html
8287
# file docs/sphinx/index.html
83-
8a2ddf0ce1706457ec54652cf0f5ffac:docs/sphinx/index.html
88+
ef9e026800aab220e275ed07ba543275:docs/sphinx/index.html
8489
# end context for docs/sphinx/index.html
8590

8691
# begin context for docs/style.css
@@ -145,7 +150,7 @@ cda3f8bad69d9c6e8cbeab1c720d739a:scripts/static-build.sh
145150

146151
# begin context for sphinx/_static/css/fixes.css
147152
# file sphinx/_static/css/fixes.css
148-
68b329da9893e34099c7d8ad5cb9c940:sphinx/_static/css/fixes.css
153+
20bbe7a5dbb3c3278a1511d960616fe5:sphinx/_static/css/fixes.css
149154
# end context for sphinx/_static/css/fixes.css
150155

151156
# begin context for sphinx/about.rst
@@ -155,7 +160,7 @@ a44c87f3a364dd95f55427fe40b2c5d1:sphinx/about.rst
155160

156161
# begin context for sphinx/conf.py
157162
# file sphinx/conf.py
158-
67496ee935ab27fdabb4544f4f81eeb6:sphinx/conf.py
163+
2879960e5d438acce665f7ba2b86232c:sphinx/conf.py
159164
# end context for sphinx/conf.py
160165

161166
# begin context for sphinx/index.rst
@@ -200,7 +205,7 @@ bb6803d414fd5a5479ed6381914604de:src/drom/package.toml
200205

201206
# begin context for src/drom_lib/dune
202207
# file src/drom_lib/dune
203-
42d9d18b7b63adfd834f4de13c4fd892:src/drom_lib/dune
208+
58c7f2af17bf6b1f3147556ad9d3d275:src/drom_lib/dune
204209
# end context for src/drom_lib/dune
205210

206211
# begin context for src/drom_lib/index.mld
@@ -220,7 +225,7 @@ ad0048099dd6df9d2c73875be2ba28e7:src/drom_lib/version.mlt
220225

221226
# begin context for src/toml.7.1.0/dune
222227
# file src/toml.7.1.0/dune
223-
0841a2e47118b9fcd9b900f84ff66c34:src/toml.7.1.0/dune
228+
502af698659280707ee9d214481f322e:src/toml.7.1.0/dune
224229
# end context for src/toml.7.1.0/dune
225230

226231
# begin context for src/toml.7.1.0/index.mld
@@ -245,7 +250,7 @@ ad0048099dd6df9d2c73875be2ba28e7:src/toml.7.1.0/version.mlt
245250

246251
# begin context for test/expect-tests/dune
247252
# file test/expect-tests/dune
248-
d7e2675a767e30edf28d061c94f0ec62:test/expect-tests/dune
253+
e3b544fe12c7afd17f5f252466dab4fb:test/expect-tests/dune
249254
# end context for test/expect-tests/dune
250255

251256
# begin context for test/expect-tests/dune.drom
@@ -265,7 +270,7 @@ f15fedac6f43c154bcd0348b776ac08c:test/expect-tests/dune_
265270

266271
# begin context for test/inline-tests/dune
267272
# file test/inline-tests/dune
268-
a0d7baa94246a5122e55a255dcefa9d0:test/inline-tests/dune
273+
e3b544fe12c7afd17f5f252466dab4fb:test/inline-tests/dune
269274
# end context for test/inline-tests/dune
270275

271276
# begin context for test/inline-tests/dune.drom
@@ -285,7 +290,7 @@ a0d7baa94246a5122e55a255dcefa9d0:test/inline-tests/dune
285290

286291
# begin context for test/output-tests/dune
287292
# file test/output-tests/dune
288-
b5ea41e29d37e997b482b1bf7f5953d7:test/output-tests/dune
293+
9d7eeeedaff73d803089021ce5e81364:test/output-tests/dune
289294
# end context for test/output-tests/dune
290295

291296
# begin context for test/output-tests/dune.drom

.ocp-indent

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# -*- conf -*-
32
# This is an example configuration file for ocp-indent
43
#

.vscode/tasks.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "ocaml: dune build",
8+
"type": "shell",
9+
"command": "dune build",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
}
14+
},
15+
{
16+
"label": "ocaml: dune runtest -f",
17+
"type": "shell",
18+
"command": "dune runtest -f",
19+
"group": {
20+
"kind": "test",
21+
"isDefault": true
22+
}
23+
}
24+
]
25+
}

Makefile

Lines changed: 6 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,15 @@
1-
# Generated by "drom project"
2-
.PHONY: all build build-deps fmt fmt-check install dev-deps test
3-
.PHONY: clean distclean
1+
# This file was created by `drom new`
42

5-
DEV_DEPS := merlin ocamlformat odoc ppx_expect ppx_inline_test
6-
7-
8-
SPHINX_TARGET:=_drom/docs/sphinx
9-
10-
ODOC_TARGET:=_drom/docs/doc/.
11-
12-
13-
# Use these non-generated files to include more rules here (and
14-
# Makefile.trailer at the end)
15-
-include Makefile.header
163
-include Makefile.config
174

5+
# 'build' is a target from 'Makefile.drom'
186
all: build
197

20-
build:
21-
./scripts/before.sh build
22-
opam exec -- dune build @install
23-
./scripts/copy-bin.sh drom drom_lib drom_toml
24-
./scripts/after.sh build
25-
26-
build-deps:
27-
if ! [ -e _opam ]; then \
28-
opam switch create . 4.14.1 ; \
29-
fi
30-
opam install ./*.opam --deps-only
31-
32-
33-
.PHONY: doc-common odoc view sphinx
34-
doc-common: build
35-
mkdir -p _drom/docs
36-
rsync -auv docs/. _drom/docs/.
37-
38-
sphinx: doc-common
39-
./scripts/before.sh sphinx ${SPHINX_TARGET}
40-
sphinx-build sphinx ${SPHINX_TARGET}
41-
./scripts/after.sh sphinx ${SPHINX_TARGET}
42-
43-
odoc: doc-common
44-
mkdir -p ${ODOC_TARGET}
45-
./scripts/before.sh odoc ${ODOC_TARGET}
46-
opam exec -- dune build @doc
47-
rsync -auv --delete _build/default/_doc/_html/. ${ODOC_TARGET}
48-
./scripts/after.sh odoc ${ODOC_TARGET}
49-
50-
doc: doc-common odoc sphinx
51-
52-
view:
53-
xdg-open file://$$(pwd)/_drom/docs/index.html
54-
55-
fmt:
56-
opam exec -- dune build @fmt --auto-promote
57-
58-
fmt-check:
59-
opam exec -- dune build @fmt
60-
61-
install:
62-
opam pin -y --no-action -k path .
63-
opam install -y .
64-
65-
opam:
66-
opam pin -k path .
67-
68-
uninstall:
69-
opam uninstall .
70-
71-
dev-deps:
72-
opam install ./*.opam --deps-only --with-doc --with-test
73-
74-
test:
75-
./scripts/before.sh test
76-
opam exec -- dune build @runtest
77-
./scripts/after.sh test
8+
# Makefile.drom is managed by "drom project", you can use
9+
# DROMNS to prefix all of its rules (namespace)
7810

79-
clean:
80-
rm -rf _build
81-
./scripts/after.sh clean
11+
# DROMNS:=drom-
12+
include Makefile.drom
8213

83-
distclean: clean
84-
rm -rf _opam _drom
85-
./scripts/after.sh distclean
8614

87-
-include Makefile.trailer
8815

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,48 @@ will generate files for Github Actions CI and Github pages.
1414
* General Documentation: https://ocamlpro.github.io/drom/sphinx
1515
* API Documentation: https://ocamlpro.github.io/drom/doc
1616
* Sources: https://github.com/ocamlpro/drom
17+
18+
19+
## Simple Example
20+
21+
You can create a new OCaml project with:
22+
23+
```
24+
$ drom new my-client --skeleton mini_prg
25+
Creating project "my-client" with skeleton "mini_prg", license "LGPL2"
26+
and sources in src/my-client:
27+
Creating directory my-client
28+
Using skeleton "program" for package "my-client"
29+
[master (root-commit) 8d83262] Initial commit
30+
31+
└── my-client/
32+
├── .drom (drom state, do not edit)
33+
├── .github/
34+
│ └── workflows/
35+
│ └── workflow.yml
36+
├── .gitignore
37+
├── CHANGES.md
38+
├── LICENSE.md
39+
├── Makefile
40+
├── README.md
41+
├── drom.toml <────────── project config EDIT !
42+
├── dune
43+
├── dune-project
44+
├── opam/
45+
│ └── my-client.opam
46+
├── scripts/
47+
│ ├── after.sh
48+
│ ├── before.sh
49+
│ └── copy-bin.sh
50+
└── src/
51+
└── my-client/
52+
├── dune
53+
├── main.ml
54+
├── package.toml <────────── package config EDIT !
55+
└── version.mlt
56+
```
57+
58+
This project uses the minimalist `mini_prg` skeleton, but other skeletons
59+
like `program` or `library` have more files.
60+
61+

docs/doc/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<h1>API documentation for drom</h1>
32
<p>You need to run the following commands in the project to generate this doc:
43
<pre>

docs/sphinx/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<h1>Sphinx doc for drom</h1>
32
<p>You need to run the following commands in the project to generate this doc:
43
<pre>

sphinx/_static/css/fixes.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

sphinx/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,4 @@
220220

221221
# entry point for setup
222222
def setup(app):
223-
app.add_stylesheet('css/fixes.css')
223+
app.add_css_file('css/fixes.css')

src/drom_lib/commandBuild.ml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,20 @@ let action ~args () =
2626
| Program ->
2727
try
2828
let src = "_build/default" // package.dir // "main.exe" in
29-
if Sys.file_exists package.name then begin
30-
if Sys.is_directory package.name then begin
29+
let executable_name = package.name ^ ".exe" in
30+
if Sys.file_exists executable_name then begin
31+
if Sys.is_directory executable_name then begin
3132
Printf.eprintf "Warning: %S is an existing directory. Could not copy %s\n%!" package.name src;
3233
Printf.eprintf " You should rename this directory to another name.\n%!";
3334
raise Exit
3435
end;
35-
Sys.remove package.name;
36+
Sys.remove executable_name;
3637
end;
3738
if Sys.file_exists src then begin
3839
let s = EzFile.read_file src in
39-
EzFile.write_file package.name s;
40+
EzFile.write_file executable_name s;
4041
incr n;
41-
Unix.chmod package.name 0o755
42+
Unix.chmod executable_name 0o755
4243

4344
end;
4445
with Exit -> ()

0 commit comments

Comments
 (0)