File: Makefile

package info (click to toggle)
mikmatch 1.0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 568 kB
  • sloc: ml: 3,894; makefile: 355; sh: 2
file content (99 lines) | stat: -rw-r--r-- 2,407 bytes parent folder | download | duplicates (3)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.PHONY: default install uninstall reinstall \
        all opt mikmatch-pcre mikmatch-str \
        common install-str install-pcre uninstall-str uninstall-pcre \
        backup clean archive pcre str

ifndef PREFIX
  BINDIR = $(shell dirname `which ocaml`)
  PREFIX = $(shell dirname $(BINDIR))
else
  BINDIR = $(PREFIX)/bin
endif
export PREFIX
export BINDIR


default: mikmatch-pcre
install: install-pcre
uninstall: uninstall-pcre
reinstall:
	$(MAKE) uninstall
	$(MAKE) install

## GODIVA/GODI targets
all: common
	cd pcre && $(MAKE) all-bc
	cd str && $(MAKE) all-bc
opt: common
	cd pcre && $(MAKE) all-nc
	cd str && $(MAKE) all-nc

## end of GODIVA targets

mikmatch-pcre: common pcre
mikmatch-str: common str

common:
	cd common && $(MAKE)

str: common
	cd str && $(MAKE)
pcre: common
	cd pcre && $(MAKE)

install-str:
	cd str && $(MAKE) install
install-pcre:
	cd pcre && $(MAKE) install

uninstall-str:
	cd str && $(MAKE) uninstall
uninstall-pcre:
	cd pcre && $(MAKE) uninstall


backup:
	scp -r . $$BACKUP_DIR/mikmatch/

clean::
	cd doc && $(MAKE) clean
	cd common && $(MAKE) clean
	cd str && $(MAKE) clean
	cd pcre && $(MAKE) clean



VERSION = $(shell ./VERSION)
export VERSION

# Only for developers; requires camlmix, hevea, pdflatex 
# and maybe other things.
archive:
	@echo "Making archive for version $(VERSION)"
	cd str && $(MAKE) version
	cd pcre && $(MAKE) version
	cd doc && $(MAKE)
	rm -rf /tmp/mikmatch /tmp/mikmatch-$(VERSION) && \
	 	cp -r . /tmp/mikmatch && \
		cd /tmp/mikmatch && \
			$(MAKE) clean && \
			rm -rf *~ mikmatch*.tar* `find . -name .svn` && \
		cd /tmp && cp -r mikmatch mikmatch-$(VERSION) && \
		tar czf mikmatch.tar.gz mikmatch && \
		tar cjf mikmatch.tar.bz2 mikmatch && \
		tar czf mikmatch-$(VERSION).tar.gz mikmatch-$(VERSION) && \
		tar cjf mikmatch-$(VERSION).tar.bz2 mikmatch-$(VERSION)
	mv /tmp/mikmatch.tar.gz /tmp/mikmatch.tar.bz2 .
	mv /tmp/mikmatch-$(VERSION).tar.gz /tmp/mikmatch-$(VERSION).tar.bz2 .
	cp mikmatch.tar.gz mikmatch.tar.bz2 $$WWW/
	cp mikmatch-$(VERSION).tar.gz mikmatch-$(VERSION).tar.bz2 $$WWW/
	cp LICENSE $$WWW/mikmatch-license.txt
	cp VERSION $$WWW/mikmatch-version
	cp Changes $$WWW/mikmatch-changes.txt
	$(MAKE) install-www-doc

install-www-doc:
	cp doc/mikmatch-manual.pdf $$WWW
	cp doc/mikmatch-manual.html $$WWW/mikmatch-manual-nocounter.html
	cp doc/mikmatch-ocamldoc/* $$WWW/mikmatch-ocamldoc
	touch -c $$WWW/mikmatch.html.mlx