Commit 7618644c authored by Armaël Guéneau's avatar Armaël Guéneau

Improve the install target

parent 46cb88d8
......@@ -63,10 +63,43 @@ clean:
# directory to this directory (cfml). Otherwise, perform a copy.
# TEMPORARY, this is TODO
WHERE := $(shell $(COQBIN)coqc -where)
CONTRIB := $(WHERE)/user-contrib
install:
rm -rf $(CONTRIB)/CFML
mkdir -p $(CONTRIB)
ln -s `pwd` $(CONTRIB)/CFML
COQ_WHERE := $(shell $(COQBIN)coqc -where)
COQ_CONTRIB := $(COQ_WHERE)/user-contrib
# As install depends on all, the file generator/cfml_config.ml is regenerated
# when `make install` is run; this ensures LIBDIR cannot be inconsistent.
install: all
# Install the generator binary
install -m755 $(CFML)/generator/_build/main.native $(BINDIR)/cfml_mlv
# install -m755 $(CFML)/generator/_build/makecmj.native $(BINDIR)/cfml_cmj
# Cleanup LIBDIR
rm -rf $(LIBDIR)
# Install the stdlib .cmj files
mkdir -p $(LIBDIR)/stdlib
install $(CFML)/lib/stdlib/*.cmj $(LIBDIR)/stdlib
# Install the auxiliary makefiles
mkdir -p $(LIBDIR)/make
install $(CFML)/lib/make/Makefile.cfml $(LIBDIR)/make
install -m755 $(CFML)/lib/make/ocamldep.post $(LIBDIR)/make
# Cleanup COQ_CONTRIB/CFML
rm -rf $(COQ_CONTRIB)/CFML
# Install the CFML core coq library
mkdir -p $(COQ_CONTRIB)/CFML/Core
install $(CFML)/lib/coq/*.vo $(COQ_CONTRIB)/CFML/Core
# Install the CFML stdlib coq library
mkdir -p $(COQ_CONTRIB)/CFML/Stdlib
install $(CFML)/lib/stdlib/*.vo $(COQ_CONTRIB)/CFML/Stdlib
uninstall:
rm -f $(BINDIR)/cfml_mlv
# rm -f $(BINDIR)/cfml_cmj
rm -rf $(LIBDIR)
rm -rf $(DOCDIR)
rm -rf $(COQ_CONTRIB)/CFML
Markdown is supported
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