Skip to content

Commit

Permalink
Merge pull request #125 from djs55/allow-older-ocaml
Browse files Browse the repository at this point in the history
Makefile: don't automatically run configure
  • Loading branch information
djs55 committed Aug 24, 2014
2 parents 968f690 + db1a0f5 commit be9ea20
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ xenopsd-xc
config.mk
dist
_build
configure
setup.bin
setup.data
scripts/vif
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ clean:

-include config.mk

config.mk: configure
./configure

configure: configure.ml
ocamlfind ocamlc -linkpkg -package findlib,cmdliner -o configure configure.ml
@rm -f configure.cm*
config.mk:
echo Please re-run configure
exit 1

setup.bin: setup.ml
@ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $<
Expand Down
12 changes: 12 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

D=$(mktemp -d)
function cleanup {
cd /
rm -rf $D
}
trap cleanup EXIT

cp configure.ml $D
(cd $D; ocamlfind ocamlopt -package "cmdliner,findlib,unix" -linkpkg configure.ml -o configure)
$D/configure $*

0 comments on commit be9ea20

Please sign in to comment.