Add a Makefile
It compiles setup.ml to a native executable.
This commit is contained in:
parent
cd2f0bd205
commit
6e911b41dc
|
@ -0,0 +1,59 @@
|
||||||
|
# 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
|
||||||
|
ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $<
|
||||||
|
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)
|
||||||
|
|
||||||
|
test: $(SETUP) setup.data build
|
||||||
|
./$(SETUP) -test $(TESTFLAGS)
|
||||||
|
|
||||||
|
all: $(SETUP)
|
||||||
|
./$(SETUP) -all $(ALLFLAGS)
|
||||||
|
|
||||||
|
install: $(SETUP) setup.data
|
||||||
|
./$(SETUP) -install $(INSTALLFLAGS)
|
||||||
|
|
||||||
|
uninstall: $(SETUP) setup.data
|
||||||
|
./$(SETUP) -uninstall $(UNINSTALLFLAGS)
|
||||||
|
|
||||||
|
reinstall: $(SETUP) setup.data
|
||||||
|
./$(SETUP) -reinstall $(REINSTALLFLAGS)
|
||||||
|
|
||||||
|
clean: $(SETUP)
|
||||||
|
./$(SETUP) -clean $(CLEANFLAGS)
|
||||||
|
|
||||||
|
distclean: $(SETUP)
|
||||||
|
./$(SETUP) -distclean $(DISTCLEANFLAGS)
|
||||||
|
|
||||||
|
configure: $(SETUP)
|
||||||
|
./$(SETUP) -configure $(CONFIGUREFLAGS)
|
||||||
|
|
||||||
|
setup.data: $(SETUP)
|
||||||
|
./$(SETUP) -configure $(CONFIGUREFLAGS)
|
||||||
|
|
||||||
|
.PHONY: default build doc test all install uninstall reinstall clean distclean configure
|
1
_oasis
1
_oasis
|
@ -12,6 +12,7 @@ Authors: Jérémie Dimino
|
||||||
Homepage: http://utop.forge.ocamlcore.org/
|
Homepage: http://utop.forge.ocamlcore.org/
|
||||||
BuildTools: ocamlbuild
|
BuildTools: ocamlbuild
|
||||||
Plugins: DevFiles (0.3), META (0.3)
|
Plugins: DevFiles (0.3), META (0.3)
|
||||||
|
XDevFilesEnableMakefile: false
|
||||||
FilesAB: src/lib/uTop_version.ml.ab
|
FilesAB: src/lib/uTop_version.ml.ab
|
||||||
Synopsis: Universal toplevel for OCaml
|
Synopsis: Universal toplevel for OCaml
|
||||||
Description:
|
Description:
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# OASIS_START
|
||||||
|
make configure CONFIGUREFLAGS="$*"
|
||||||
|
# OASIS_STOP
|
3
setup.ml
3
setup.ml
|
@ -1,14 +1,13 @@
|
||||||
(*
|
(*
|
||||||
* setup.ml
|
* setup.ml
|
||||||
* --------
|
* --------
|
||||||
* Copyright : (c) 2011, Jeremie Dimino <jeremie@dimino.org>
|
* Copyright : (c) 2012, Jeremie Dimino <jeremie@dimino.org>
|
||||||
* Licence : BSD3
|
* Licence : BSD3
|
||||||
*
|
*
|
||||||
* This file is a part of utop.
|
* This file is a part of utop.
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(* OASIS_START *)
|
(* OASIS_START *)
|
||||||
(* DO NOT EDIT (digest: 7f47a529f70709161149c201ccd90f0b) *)
|
|
||||||
#use "topfind";;
|
#use "topfind";;
|
||||||
#require "oasis.dynrun";;
|
#require "oasis.dynrun";;
|
||||||
open OASISDynRun;;
|
open OASISDynRun;;
|
||||||
|
|
Loading…
Reference in New Issue