Skip to content

Commit

Permalink
move toplevel-specific logic to its own toplevel/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
gasche committed Feb 3, 2021
1 parent 6448437 commit b1eb5b6
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 14 deletions.
26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,30 @@ else
QTESTPKG = QTest2Lib
endif

INSTALL_FILES = _build/META _build/src/*.cma \
battop.ml _build/src/*.cmi _build/src/*.mli \
_build/src/batteriesHelp.cmo _build/src/batteriesConfig.cmo _build/src/batteriesPrint.cmo \
ocamlinit build/ocaml
INSTALL_FILES = _build/META _build/src/*.cma _build/src/*.cmi _build/src/*.mli \
toplevel/battop.ml _build/toplevel/*.cmi _build/toplevel/*.mli \
# Note: we do not currently install
# _build/toplevel/*.cma
# as there are no such files. If you create a proper library for batteries-help, you need to add *.cma
# to INSTALL_FILES.
_build/src/batteriesConfig.cmo _build/src/batteriesPrint.cmo _build/toplevel/batteriesHelp.cmo \
toplevel/ocamlinit build/ocaml
# the bin_annot flag in _tags is not handled by versions of ocamlbuild < 4.01.0
# hence we only install *.cmt{i} files if they were produced
ifneq ($(wildcard _build/src/*.cmt),)
INSTALL_FILES += _build/src/*.cmt
INSTALL_FILES += _build/toplevel/*.cmt
endif
ifneq ($(wildcard _build/src/*.cmti),)
INSTALL_FILES += _build/src/*.cmti
INSTALL_FILES += _build/toplevel/*.cmti
endif

OPT_INSTALL_FILES = _build/src/*.cmx _build/src/*.a _build/src/*.cmxa \
_build/src/*.cmxs _build/src/*.lib
OPT_INSTALL_FILES = \
_build/src/*.cmx _build/src/*.cmxa _build/src/*.cmxs \
_build/src/*.a _build/src/*.lib \
_build/toplevel/*.cmx _build/toplevel/*.cmxa _build/toplevel/*.cmxs \
_build/toplevel/*.a _build/toplevel/*.lib

ifneq ($(QTEST_SEED),)
QTEST_SEED_FLAG = --seed $(QTEST_SEED)
Expand All @@ -57,7 +66,7 @@ endif

# What to build
TARGETS = src/batteries.cma
TARGETS += src/batteriesHelp.cmo
TARGETS += toplevel/batteriesHelp.cmo
TARGETS += src/batteriesThread.cma
TARGETS += META
BENCH_TARGETS = benchsuite/bench_int.native
Expand Down Expand Up @@ -169,8 +178,7 @@ clean-prefilter:
# $(TESTFILES) from $(TESTABLE), and pass them to qtest from the
# `_build` directory.

DONTTEST=src/batteriesHelp.ml \
src/batteries_compattest.mlv \
DONTTEST=src/batteries_compattest.mlv \
src/batConcreteQueue_402.ml src/batConcreteQueue_403.ml
TESTABLE ?= $(filter-out $(DONTTEST),\
$(wildcard src/*.ml) $(wildcard src/*.mlv))
Expand Down
2 changes: 1 addition & 1 deletion _tags
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
true: package(bytes), warn_-3, bin_annot
"build": include
"src": include
"libs": include
"toplevel": include
"testsuite": include
"qtest": include
"benchsuite": include
Expand Down
1 change: 0 additions & 1 deletion src/_tags
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ true: debug
<batteriesThread.*>: threads
<{batMap,batVect,batFile,batPervasives,batParserCo,batSet,batLogger,batPathGen,batSplay}.ml>: warn_z
<{batPervasives,batIMap,batLog}.ml>: warn_-9
<batteriesHelp.*>: compiler-libs

<batBigarray.*>: inline(3)
# necessary to inline ofs_of_layout on V<4.2
1 change: 1 addition & 0 deletions toplevel/_tags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<batteriesHelp.*>: compiler-libs
3 changes: 0 additions & 3 deletions src/batteriesHelp.ml → toplevel/batteriesHelp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ let result_of_completions table singular subject (l:completion list) =
inconsistency singular subject; (*Report internal inconsistency*)
None) l

(**A deconstructor for [completion].*)
let get_qualified {qualified = q; _} = q

(**
Look for a given subject inside one of the manuals
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b1eb5b6

Please sign in to comment.