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