Skip to content

Commit

Permalink
[build] disable legacy_parser by default, see make config
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Apr 18, 2022
1 parent 4d250b3 commit a630a03
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
run: |
opam depext camlp5 || true # no depext on opam 2.1
opam install 'camlp5>=8'
opam exec -- make config LEGACY_PARSER=1
- name: Install real dependencies
run: |
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ CP5:=$(shell if ocamlfind query camlp5 2>/dev/null >&2; then : ; else echo "INFO
build:
dune build $(DUNE_OPTS) @all

config:
@(if [ -z $$LEGACY_PARSER ]; \
then echo '(dirs :standard \ legacy_parser)'; \
else echo '(dirs :standard )'; \
fi ) > src/dune.config

install:
dune install $(DUNE_OPTS)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ you can type
opam pin add elpi https://github.com/LPCIC/elpi.git
```
You can also clone this repository and type `make build`.
If you want to build the legacy parser, do begin with
`make config LEGACY_PARSER=1` and then `make build`.

Finally, each CI run builds statically linked binaries for the
three supported operating systems, click on any
Expand Down
2 changes: 2 additions & 0 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@
(echo "% File generated by elpi -document-builtins, do not edit")
(run elpi -document-builtins))))
)

(include dune.config)
1 change: 1 addition & 0 deletions src/dune.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(dirs :standard \ legacy_parser)
1 change: 0 additions & 1 deletion src/legacy_parser/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(library
(name elpi_legacy_parser)
(public_name elpi.legacy_parser)
(optional)
(libraries elpi.util elpi.parser camlp5.gramlib)
(flags -w -A)
(preprocess (per_module ((action (run camlp5o -I . -I +camlp5 pa_extend.cmo pa_lexer.cmo %{input-file})) parser)))
Expand Down

0 comments on commit a630a03

Please sign in to comment.