Skip to content

Commit

Permalink
Revert to old Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information
johnelse committed Nov 7, 2015
1 parent 72d7834 commit 2d34b1e
Showing 1 changed file with 18 additions and 32 deletions.
50 changes: 18 additions & 32 deletions Makefile
@@ -1,58 +1,44 @@
all: build

ocamlfind_check=$(shell ocamlfind query $(1) > /dev/null 2> /dev/null && echo "true")

LWT=$(call ocamlfind_check,lwt)
ifeq ($(LWT), true)
LWTFLAG=--enable-lwt
LWT_FLAG=--enable-lwt
endif

CONFIGUREFLAGS=--enable-unix --enable-tests $(LWTFLAG)
BUILDFLAGS=-j 4
DOCFLAGS=-j 4
UNIX_FLAG=--enable-unix

NAME=osc
TESTS_FLAG=--enable-tests

# ###################################
# ###################################
NAME=osc
J=4

SETUP = ocaml setup.ml
setup.data: setup.ml
ocaml setup.ml -configure $(LWT_FLAG) $(UNIX_FLAG) $(TESTS_FLAG)

build: setup.data
$(SETUP) -build $(BUILDFLAGS)

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)

test: setup.data build
$(SETUP) -test $(TESTFLAGS)
ocaml setup.ml -build -j $(J)

all:
$(SETUP) -all $(ALLFLAGS)
doc: setup.data
ocaml setup.ml -doc -j $(J)

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
ocaml setup.ml -install

uninstall:
ocamlfind remove $(NAME)

reinstall: setup.data
ocamlfind remove $(NAME) || true
$(SETUP) -reinstall $(REINSTALLFLAGS)
ocaml setup.ml -reinstall

clean:
$(SETUP) -clean $(CLEANFLAGS)

distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)

setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)

configure:
$(SETUP) -configure $(CONFIGUREFLAGS)

.PHONY: build doc test all install uninstall reinstall clean distclean configure
ocamlbuild -clean
rm -f setup.data setup.log test.data

# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)
test: build
ocaml setup.ml -test

test-interop-sclang: build
./test-interop-sclang.sh
Expand Down

0 comments on commit 2d34b1e

Please sign in to comment.