Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
always use curl to download files, and put in Makefile dependencies s…
…o that if the distfile is present, it will not be re-downloaded (for helping with packaging)
  • Loading branch information
avsm committed Jul 8, 2012
1 parent 3b8ea25 commit 0c6750c
Showing 1 changed file with 33 additions and 20 deletions.
53 changes: 33 additions & 20 deletions src_ext/Makefile
@@ -1,47 +1,60 @@
OS = $(shell uname -s)
ifeq ($(OS),Darwin)
WGET ?= ftp
else
WGET ?= wget -qN
endif
FETCH ?= curl -OL

all: clone depends.ocp

depends.ocp: depends.ocp.boot
cp $< $@

clone: cudf extlib ocaml-re ocamlgraph dose ocaml-arg
clone: cudf.stamp extlib.stamp ocaml-re.stamp ocamlgraph.stamp dose.stamp ocaml-arg.stamp

cudf:
$(WGET) http://www.ocamlpro.com/pub/cudf.tar.gz
cudf.tar.gz:
$(FETCH) http://www.ocamlpro.com/pub/cudf.tar.gz

extlib-1.5.2.tar.gz:
$(FETCH) http://ocaml-extlib.googlecode.com/files/extlib-1.5.2.tar.gz
@touch $@

cudf.stamp: cudf.tar.gz
tar xfz cudf.tar.gz
@touch $@

dose.tar.gz:
$(FETCH) http://www.ocamlpro.com/pub/dose.tar.gz

ocaml-arg.tar.gz:
$(FETCH) http://www.ocamlpro.com/pub/ocaml-arg.tar.gz

ocamlgraph-1.8.1.tar.gz:
$(FETCH) http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.1.tar.gz

ocaml-re.tar.gz:
$(FETCH) http://www.ocamlpro.com/pub/ocaml-re.tar.gz

extlib:
$(WGET) http://ocaml-extlib.googlecode.com/files/extlib-1.5.2.tar.gz
extlib.stamp: extlib-1.5.2.tar.gz
tar xfz extlib-1.5.2.tar.gz
mv extlib-1.5.2 extlib
@touch $@

dose:
$(WGET) http://www.ocamlpro.com/pub/dose.tar.gz
dose.stamp: dose.tar.gz
tar xfz dose.tar.gz
@touch $@

ocaml-arg:
$(WGET) http://www.ocamlpro.com/pub/ocaml-arg.tar.gz
ocaml-arg.stamp: ocaml-arg.tar.gz
tar xfz ocaml-arg.tar.gz

ocamlgraph:
$(WGET) http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.1.tar.gz
ocamlgraph.stamp: ocamlgraph-1.8.1.tar.gz
tar xfz ocamlgraph-1.8.1.tar.gz
mv ocamlgraph-1.8.1 ocamlgraph
@touch $@

ocaml-re:
$(WGET) http://www.ocamlpro.com/pub/ocaml-re.tar.gz
ocaml-re.stamp: ocaml-re.tar.gz
tar xfz ocaml-re.tar.gz
@touch $@

clean:
rm -rf *~

distclean: clean
rm -rf cudf extlib ocaml-re ocamlgraph dose ocaml-arg
rm -f depends.ocp
rm -rf *.tar.gz
rm -f *.tar.gz *.stamp

0 comments on commit 0c6750c

Please sign in to comment.