File: Makefile

package info (click to toggle)
tyxml 2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 652 kB
  • sloc: ml: 8,786; makefile: 235; sh: 1
file content (78 lines) | stat: -rw-r--r-- 1,785 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

include Makefile.config
-include Makefile.local

all: files/META files/META.tyxml
	$(MAKE) -C syntax byte opt
	$(MAKE) -C lib byte opt

byte: files/META files/META.tyxml
	$(MAKE) -C syntax byte
	$(MAKE) -C lib byte

opt: files/META files/META.tyxml
	$(MAKE) -C syntax opt
	$(MAKE) -C lib opt

clean:
	$(MAKE) -C lib clean
	$(MAKE) -C syntax clean
	$(MAKE) -C doc clean
	rm -f files/META files/META.tyxml

distclean:
	$(MAKE) -C syntax distclean
	$(MAKE) -C lib distclean
	$(MAKE) -C doc distclean
	-rm -f *~ \#* .\#* files/META files/META.tyxml

.PHONY: doc
doc:
	$(MAKE) -C doc

depend:
	$(MAKE) -C syntax depend
	$(MAKE) -C lib depend

include Makefile.filelist
VERSION := $(shell head -n 1 VERSION)

files/META: files/META.in Makefile.config
	sed -e s%_LIBNAME_%${LIBNAME}%g \
	    -e s%_PACKAGENAME_%${PACKAGENAME}%g \
            -e s%_LIBDIR_%% \
            -e s%_SYNTAXDIR_%% \
	   $< > $@

files/META.tyxml: files/META.in Makefile.config
	sed -e s%_LIBNAME_%${LIBNAME}%g \
	    -e s%_PACKAGENAME_%${PACKAGENAME}%g \
            -e s%_LIBDIR_%directory\ =\ \"..\/lib\"% \
            -e s%_SYNTAXDIR_%directory\ =\ \"..\/syntax\"% \
	  $< > $@

install:
	$(OCAMLFIND) install ${PACKAGENAME} \
	  -patch-version ${VERSION} \
	  files/META ${INTF} ${IMPL} ${NATIMPL} \
	  ${MLI_TO_INSTALL}

install-byte:
	$(OCAMLFIND) install ${PACKAGENAME} \
	  -patch-version ${VERSION} \
	  files/META ${INTF} ${IMPL} ${MLI_TO_INSTALL}

install-opt:
	$(OCAMLFIND) install ${PACKAGENAME} \
	  -patch-version ${VERSION} \
	  files/META ${INTF} ${NATIMPL} ${MLI_TO_INSTALL}

uninstall:
	$(OCAMLFIND) remove ${PACKAGENAME}

reinstall: uninstall install
reinstall-byte: uninstall install-byte
reinstall-opt: uninstall install-opt

dist:
	DARCS_REPO=$(PWD) darcs dist -d ${PACKAGENAME}-${VERSION}