-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
105 lines (78 loc) · 2.64 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- Makefile -*-
# Generated by "drom project"
.PHONY: all build build-deps fmt fmt-check install dev-deps test
.PHONY: clean distclean
TARGET_PLAT ?= linux
DUNE = opam exec -- dune
DUNE_ARGS ?= --root=$$(pwd)
DUNE_CROSS_ARGS = $(strip $(if $(filter win32,${TARGET_PLAT}),-x windows) \
$(if $(filter darwin,${TARGET_PLAT}),-x osx))
ifeq ($(BUILD_STATIC_EXECS),true)
export LINKING_MODE=static
endif
VERSION = 0.1.5
DEV_DEPS := merlin ocamlformat odoc
SPHINX_TARGET:=_drom/docs/sphinx
ODOC_TARGET:=_drom/docs/doc/.
# Use these non-generated files to include more rules here (and
# Makefile.trailer at the end)
-include Makefile.header
-include Makefile.config
all: build
build:
./scripts/before.sh build
ifeq ($(TARGET_PLAT)_$(BUILD_STATIC_EXECS),linux_true)
./scripts/static-build.sh
else
${DUNE} build ${DUNE_ARGS} ${DUNE_CROSS_ARGS} @install
./scripts/copy-bin.sh superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_ast sql_parser cobol_cfg
endif
./scripts/after.sh build
build-deps:
if ! [ -e _opam ]; then \
opam switch create . 4.14.1 --no-install ; \
fi
opam install ./opam/*.opam --deps-only
.PHONY: doc-common odoc view sphinx
doc-common: build
mkdir -p _drom/docs
rsync -auv docs/. _drom/docs/.
sphinx: doc-common
./scripts/before.sh sphinx ${SPHINX_TARGET}
sphinx-build sphinx ${SPHINX_TARGET}
./scripts/after.sh sphinx ${SPHINX_TARGET}
odoc: doc-common
mkdir -p ${ODOC_TARGET}
./scripts/before.sh odoc ${ODOC_TARGET}
${DUNE} build ${DUNE_ARGS} @doc
rsync -auv --delete _build/default/_doc/_html/. ${ODOC_TARGET}
./scripts/after.sh odoc ${ODOC_TARGET}
doc: doc-common odoc sphinx
view:
xdg-open file://$$(pwd)/_drom/docs/index.html
fmt:
${DUNE} build ${DUNE_ARGS} @fmt --auto-promote
fmt-check:
${DUNE} build ${DUNE_ARGS} @fmt
install:
opam pin -y --no-action -k path .
opam install -y .
opam:
opam pin -k path .
uninstall:
opam uninstall .
dev-deps:
opam install autofonce
opam install ./opam/*.opam ./test/opam/*.opam --deps-only --with-doc --with-test
test:
./scripts/before.sh test
${DUNE} build ${DUNE_ARGS} ${DUNE_CROSS_ARGS} @runtest
${MAKE} test-syntax
./scripts/after.sh test
clean:
rm -rf _build
./scripts/after.sh clean
distclean: clean
rm -rf _opam _drom
./scripts/after.sh distclean
-include Makefile.trailer