Commit 3698ec54 authored by Guillaume Melquiond's avatar Guillaume Melquiond
Browse files

Create directories bin and lib/plugins on the fly (bug #21566).

Some people dump the content of tarballs into git repositories and thus
experience compilation failures. Indeed, some directories from the tarball
are empty and thus not preserved by git. So this commit creates these
directories on the fly.

As for plugins/printer, it has to be handled differently, since it is
needed by ocamldep and thus cannot be created on the fly. So its .keepme
file is put in the tarball to keep it nonempty.
parent a0c7d883
.gitattributes export-ignore
.gitignore export-ignore
.keepme export-ignore
/.gitlab-ci.yml export-ignore
/.mailmap export-ignore
......@@ -437,11 +437,14 @@ LIBPLUGCMXS = $(addsuffix .cmxs, $(addprefix lib/plugins/, $(PLUGINS)))
plugins.byte: $(LIBPLUGCMO)
plugins.opt : $(LIBPLUGCMXS)
mkdir lib/plugins
lib/plugins/%.cmxs: | lib/plugins
$(SHOW) 'Linking $@'
$(HIDE)$(OCAMLOPT) $(OFLAGS) -shared -o $@ $^
lib/plugins/%.cmo: | lib/plugins
$(SHOW) 'Linking $@'
$(HIDE)$(OCAMLC) $(BFLAGS) -pack -o $@ $^
......@@ -496,6 +499,9 @@ $(TOOLSDEP): $(TOOLSGENERATED)
byte: bin/why3.byte $(TOOLS_BIN:%=bin/%.byte)
opt: bin/why3.opt $(TOOLS_BIN:%=bin/%.opt)
mkdir bin
bin/why3.opt: lib/why3/why3.cmxa src/tools/main.cmx
bin/why3.byte: lib/why3/why3.cma src/tools/main.cmo
bin/why3config.opt: lib/why3/why3.cmxa src/tools/why3config.cmx
......@@ -1933,11 +1939,11 @@ src/tools/why3extract.cmx src/ide/gmain.cmx: %.cmx:
echo '$*.cmx : $*.cmi'; \
echo '$*.cmi : $*.cmo') $(TOTARGET)
bin/%.opt: | bin
$(SHOW) 'Linking $@'
bin/%.byte: | bin
$(SHOW) 'Linking $@'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment