diff options
author | Jérémie Dimino <jeremie@dimino.org> | 2012-10-20 11:51:41 +0200 |
---|---|---|
committer | Jérémie Dimino <jeremie@dimino.org> | 2012-10-20 11:51:41 +0200 |
commit | 4b06ddc408093d79e8c3a3319cee79f321b80b46 (patch) | |
tree | f61e4574fe7a427038c80c768d5c32bb74799756 | |
parent | 2ac74087eca9d1dd4c4083ebead4af5c10b635dc (diff) |
Add a Makefile
It compiles setup.ml to a native executable.
-rw-r--r-- | Makefile | 59 | ||||
-rw-r--r-- | _oasis | 1 | ||||
-rwxr-xr-x | configure | 5 | ||||
-rw-r--r-- | setup.ml | 3 |
4 files changed, 65 insertions, 3 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3ffbdc7 --- /dev/null +++ b/Makefile @@ -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 @@ -11,6 +11,7 @@ Authors: Jérémie Dimino Homepage: http://estring.forge.ocamlcore.org/ BuildTools: ocamlbuild Plugins: DevFiles (0.3), META (0.3) +XDevFilesEnableMakefile: false Synopsis: Extension for string literals Description: Estring allows to transforms string literals in programs by diff --git a/configure b/configure new file mode 100755 index 0000000..3234be2 --- /dev/null +++ b/configure @@ -0,0 +1,5 @@ +#!/bin/sh + +# OASIS_START +make configure CONFIGUREFLAGS="$*" +# OASIS_STOP @@ -3,12 +3,9 @@ * -------- * Copyright : (c) 2012, Jeremie Dimino <jeremie@dimino.org> * Licence : BSD3 - * - * This file is a part of estring. *) (* OASIS_START *) -(* DO NOT EDIT (digest: 7f47a529f70709161149c201ccd90f0b) *) #use "topfind";; #require "oasis.dynrun";; open OASISDynRun;; |