Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 96 lines (85 sloc) 2.656 kb
b96ee974 »
2012-10-04 Ajout d'un Makefile pour compiler et installer (avec DESTDIR) sans êt…
1 DESTDIR=
2 prefix=/usr/local
3 exec_prefix=$(prefix)
4 bindir=$(exec_prefix)/bin
5 libdir=$(exec_prefix)/lib
6 datadir=$(prefix)/share
7 mandir=$(datadir)/man
8
9 SHELL=bash
10
11 all: stamp-world-install
12
13 clean::
14 $(MAKE) -C src clean
15 $(MAKE) -C contrib clean
16 $(RM) -r inst
17 $(RM) log.world-local log.install-local log.contrib log.bootstrap log.world-install
18 $(RM) stamp-world-local stamp-install-local stamp-contrib stamp-bootstrap stamp-world-install
19 $(RM) src/*.1 src/camlrun src/camlyacc
20 $(RM) contrib/camltk4/compiler/parser.output
21
22 distclean:: clean
23 $(RM) config/m.h config/s.h
24 $(RM) log.configure
25 $(RM) stamp-configure
26 for f in comp lex libr link ; do \
27 if test -f src/caml$$f.orig ; then \
28 mv -f src/caml$$f.orig src/caml$$f ;\
29 fi ;\
30 done
31
32 stamp-configure:
33 set -o pipefail ; $(MAKE) -C src configure \
34 2>&1 | tee log.configure
35 for f in comp lex libr link ; do \
36 cp src/caml$$f src/caml$$f.orig ;\
37 done
38 touch $@
39
40 stamp-world-local: stamp-configure
41 set -o pipefail ; $(MAKE) -C src world \
42 VBINDIR=$(CURDIR)/inst/bin \
43 LIBDIR=$(CURDIR)/inst/lib/caml-light \
44 MANDIR=$(CURDIR)/inst/man/man1 \
45 2>&1 | tee log.world-local
46 grep '#- : int = 10946' log.world-local
47 touch $@
48
49 stamp-bootstrap: stamp-world-local
50 set -o pipefail ; $(MAKE) -C src bootstrap \
51 VBINDIR=$(CURDIR)/inst/bin \
52 LIBDIR=$(CURDIR)/inst/lib/caml-light \
53 MANDIR=$(CURDIR)/inst/man/man1 \
54 2>&1 | tee log.bootstrap
55 grep '^The Caml Light system has successfully recompiled itself.$$' log.bootstrap
56 touch $@
57
58 stamp-install-local: stamp-bootstrap
59 set -o pipefail ; $(MAKE) -C src install \
60 VBINDIR=$(CURDIR)/inst/bin \
61 LIBDIR=$(CURDIR)/inst/lib/caml-light \
62 MANDIR=$(CURDIR)/inst/man/man1 \
63 2>&1 | tee log.install-local
64 touch $@
65
66 stamp-contrib: stamp-install-local
67 set -o pipefail ; $(MAKE) -C contrib all \
68 PATH=$(CURDIR)/inst/bin:$(PATH) \
69 TKINCLDIR=/usr/include/tcl8.5 \
70 TKLIBS="-ltk8.5 -ltcl8.5 -lX11" \
71 2>&1 | tee log.contrib
72 touch $@
73
74 stamp-world-install: stamp-contrib
75 $(MAKE) -C src clean
76 set -o pipefail ; $(MAKE) -C src world \
77 VBINDIR=$(bindir) \
78 LIBDIR=$(libdir)/caml-light \
79 MANDIR=$(mandir)/man1 \
80 2>&1 | tee log.world-install
81 grep '#- : int = 10946' log.world-install
82 touch $@
83
84 install: stamp-world-install
85 $(MAKE) -C src install \
86 VBINDIR=$(bindir) \
87 LIBDIR=$(DESTDIR)$(libdir)/caml-light \
88 MANDIR=$(DESTDIR)$(mandir)/man1 \
89 INSTROOT=$(DESTDIR)
90 mkdir -p $(DESTDIR)$(datadir)/emacs/site-lisp
91 $(MAKE) -C contrib install \
92 BINDIR=$(DESTDIR)$(bindir) \
93 LIBDIR=$(DESTDIR)$(libdir)/caml-light \
94 MANDIR=$(DESTDIR)$(mandir)/man1 \
95 EMACSLISPDIR=$(DESTDIR)$(datadir)/emacs/site-lisp \
96 INSTROOT=$(DESTDIR)
97
98
Something went wrong with that request. Please try again.