2012-10-17 09:33:37 +00:00
|
|
|
# Makefile
|
|
|
|
# --------
|
|
|
|
# Copyright : (c) 2012, Jeremie Dimino <jeremie@dimino.org>
|
|
|
|
# Licence : BSD3
|
|
|
|
#
|
|
|
|
# Generic Makefile for oasis project
|
|
|
|
|
|
|
|
# Set to setup.exe for the release
|
|
|
|
SETUP := setup-dev.exe
|
|
|
|
|
|
|
|
# Default rule
|
|
|
|
default: build
|
|
|
|
|
|
|
|
# Setup for the development version
|
|
|
|
setup-dev.exe: _oasis setup.ml
|
|
|
|
sed '/^#/D' setup.ml > setup_dev.ml
|
|
|
|
ocamlfind ocamlopt -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || \
|
|
|
|
ocamlfind ocamlc -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || true
|
|
|
|
rm -f setup_dev.*
|
|
|
|
|
|
|
|
# Setup for the release
|
|
|
|
setup.exe: setup.ml
|
2016-03-02 17:41:54 +00:00
|
|
|
ocamlopt.opt -w -3 -o $@ $< || ocamlopt -w -3 -o $@ $< || ocamlc -w -3 -o $@ $<
|
2012-10-17 09:33:37 +00:00
|
|
|
rm -f setup.cmx setup.cmi setup.o setup.obj setup.cmo
|
|
|
|
|
|
|
|
build: $(SETUP) setup.data
|
|
|
|
./$(SETUP) -build $(BUILDFLAGS)
|
|
|
|
|
|
|
|
doc: $(SETUP) setup.data build
|
|
|
|
./$(SETUP) -doc $(DOCFLAGS)
|
2014-10-28 00:40:23 +00:00
|
|
|
cp style.css _build/utop-api.docdir/
|
2012-10-17 09:33:37 +00:00
|
|
|
|
|
|
|
test: $(SETUP) setup.data build
|
|
|
|
./$(SETUP) -test $(TESTFLAGS)
|
|
|
|
|
|
|
|
all: $(SETUP)
|
|
|
|
./$(SETUP) -all $(ALLFLAGS)
|
|
|
|
|
|
|
|
install: $(SETUP) setup.data
|
2016-08-15 10:01:22 +00:00
|
|
|
ocamlfind remove utop 2>/dev/null || true
|
2012-10-17 09:33:37 +00:00
|
|
|
./$(SETUP) -install $(INSTALLFLAGS)
|
|
|
|
|
|
|
|
uninstall: $(SETUP) setup.data
|
|
|
|
./$(SETUP) -uninstall $(UNINSTALLFLAGS)
|
|
|
|
|
|
|
|
reinstall: $(SETUP) setup.data
|
2016-08-15 10:01:22 +00:00
|
|
|
ocamlfind remove utop 2>/dev/null || true
|
2012-10-17 09:33:37 +00:00
|
|
|
./$(SETUP) -reinstall $(REINSTALLFLAGS)
|
|
|
|
|
|
|
|
clean: $(SETUP)
|
|
|
|
./$(SETUP) -clean $(CLEANFLAGS)
|
|
|
|
|
|
|
|
distclean: $(SETUP)
|
|
|
|
./$(SETUP) -distclean $(DISTCLEANFLAGS)
|
|
|
|
|
|
|
|
configure: $(SETUP)
|
|
|
|
./$(SETUP) -configure $(CONFIGUREFLAGS)
|
|
|
|
|
|
|
|
setup.data: $(SETUP)
|
|
|
|
./$(SETUP) -configure $(CONFIGUREFLAGS)
|
|
|
|
|
2014-10-28 00:40:23 +00:00
|
|
|
gh-pages: doc
|
|
|
|
git clone `git config --get remote.origin.url` .gh-pages --reference .
|
|
|
|
git -C .gh-pages checkout --orphan gh-pages
|
|
|
|
git -C .gh-pages reset
|
|
|
|
git -C .gh-pages clean -dxf
|
|
|
|
cp -t .gh-pages/ _build/utop-api.docdir/*
|
|
|
|
git -C .gh-pages add .
|
|
|
|
git -C .gh-pages commit -m "Update Pages"
|
|
|
|
git -C .gh-pages push origin gh-pages -f
|
|
|
|
rm -rf .gh-pages
|
|
|
|
|
|
|
|
.PHONY: default build doc test all install uninstall reinstall clean distclean configure gh-pages
|