Skip to content

Fix Makefile to detect changes again #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions ml-proto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
NAME = wasm
NAME_OPT = $(NAME).opt
NAME_UNOPT = $(NAME)
Makefile = Makefile
DIRS = given host spec
LIBS = str bigarray

OCB_FLAGS += # -use-ocamlfind
OCB_FLAGS += # -cflags -w
OCB_FLAGS += # -cflags +a-4-41-42-44-45
OCB_FLAGS += -libs str,bigarray
OCB_FLAGS += -I host -I given -I spec
OCB_FLAGS += $(DIRS:%=-I %)
OCB_FLAGS += $(LIBS:%=-libs %)
OCB = ocamlbuild $(OCB_FLAGS)

.PHONY: all opt unopt
unopt: $(NAME_UNOPT)
opt: $(NAME_OPT)
all: opt unopt test
Expand All @@ -26,26 +28,29 @@ $(NAME_OPT): main.native
$(NAME_UNOPT): main.d.byte
mv $< $@

main.native: $(MAKEFILE)
.PHONY: main.native
main.native:
$(OCB) $@

main.d.byte: $(MAKEFILE)
.PHONY: main.d.byte
main.d.byte:
$(OCB) $@

.PHONY: test
test:
./runtests.py

.PHONY: zip
zip:
git archive --format=zip --prefix=$(NAME)/ \
-o $(NAME).zip HEAD

.PHONY: clean
clean:
$(OCB) -clean

.PHONY: check
check:
# check that we can find all relevant libraries
# when using ocamlfind
ocamlfind query str bigarray

zip:
git archive --format=zip --prefix=$(NAME)/ \
-o $(NAME).zip HEAD

.INTERMEDIATE: main.native main.d.byte
.PHONY: all opt unopt clean test check zip