Skip to content
Newer
Older
100644 60 lines (44 sloc) 1.32 KB
7f510c5 @samoht Few makefile tweaks
samoht authored Mar 7, 2012
1 # Make sure to have ocp-get-server running before launchin the tests
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored Mar 8, 2012
2 LOCALHOST ?= 127.0.0.1
3 OPAM_ROOT = /tmp/OPAM.TEST
4 OPAM_SERVER_ROOT = /tmp/OPAM.SERVER.TEST
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
5 BIN = /tmp
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored Mar 8, 2012
6
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
7 ENV = export OCAMLRUNPARAM=b PATH=$(BIN):$(PATH) &&
8 OCPGET = $(ENV) ocp-get --debug --root $(OPAM_ROOT)
9 OCPGET_SERVER = $(ENV) ocp-get-server --debug --root $(OPAM_SERVER_ROOT)
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored Mar 8, 2012
10
a779ca3 @samoht More tests
samoht authored Mar 15, 2012
11 PACKAGES = P1-1 P2-1 P2-1 P3-1-weird.version P4-1
7f510c5 @samoht Few makefile tweaks
samoht authored Mar 7, 2012
12
13 ARCHIVES = $(PACKAGES:%=packages/%.tar.gz)
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
14
7f510c5 @samoht Few makefile tweaks
samoht authored Mar 7, 2012
15 .PHONY: all upload
16
757fe55 @samoht Add more tests
samoht authored Mar 15, 2012
17 all: init upload info install
7f510c5 @samoht Few makefile tweaks
samoht authored Mar 7, 2012
18 @
19
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
20 install-binaries:
21 cp ../ocp-get ../ocp-get-server $(BIN)
22
23 runserver: install-binaries
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored Mar 8, 2012
24 $(OCPGET_SERVER)
25
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
26 init: install-binaries fresh
7f510c5 @samoht Few makefile tweaks
samoht authored Mar 7, 2012
27 $(OCPGET) init $(LOCALHOST)
28
29 upload: $(ARCHIVES) init
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
30 cd packages && $(OCPGET) upload P1
31 cd packages && $(OCPGET) upload P2
32 cd packages && $(OCPGET) upload P3
33 cd packages && $(OCPGET) upload P4
7f510c5 @samoht Few makefile tweaks
samoht authored Mar 7, 2012
34
35 info: upload
36 $(OCPGET) info
37
a779ca3 @samoht More tests
samoht authored Mar 15, 2012
38 install: upload
757fe55 @samoht Add more tests
samoht authored Mar 15, 2012
39 $(OCPGET) install P1
40 $(OCPGET) install P2
a779ca3 @samoht More tests
samoht authored Mar 15, 2012
41 $(OCPGET) install P3
42 $(OCPGET) install P4
43
44 upload-new: install
45 cd packages && \
46 cp P1.opam P1.opam.1 && cp P1.opam.2 P1.opam && \
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
47 $(OCPGET) upload P1 && \
a779ca3 @samoht More tests
samoht authored Mar 15, 2012
48 cp P1.opam.1 P1.opam
49
50 updgrade: upload-new
51 $(OCPGET) upgrade
757fe55 @samoht Add more tests
samoht authored Mar 15, 2012
52
5cf8b97 @samoht Improve test Makefile
samoht authored Mar 17, 2012
53 packages/%.tar.gz: packages/% packages/%/*
7f510c5 @samoht Few makefile tweaks
samoht authored Mar 7, 2012
54 cd packages && tar cz $* > $*.tar.gz
55
56 clean:
57 rm -f $(ARCHIVES)
58
59 fresh:
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored Mar 8, 2012
60 rm -rf $(OPAM_ROOT) $(OPAM_SERVER_ROOT)
Something went wrong with that request. Please try again.