File: Makefile

package info (click to toggle)
ocaml-sedlex 1.99.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 384 kB
  • sloc: ml: 3,177; makefile: 171; sh: 6
file content (74 lines) | stat: -rw-r--r-- 1,871 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
# The package sedlex is released under the terms of an MIT-like license.
# See the attached LICENSE file.
# Copyright 2005, 2013 by Alain Frisch and LexiFi.

include $(shell ocamlc -where)/Makefile.config

VERSION=1.99.2
# Don't forget to change META file as well

.PHONY: all opt clean test install package

all:
	(cd src/lib && $(MAKE) all doc)
	(cd src/syntax && $(MAKE) all)

opt:
	(cd src/syntax && $(MAKE) opt)
	(cd src/lib && $(MAKE) opt)

clean:
	rm -f *~ *.cm* *.a *.lib *.o *.obj
	(cd src/lib && $(MAKE) clean)
	(cd src/syntax && $(MAKE) clean)
	(cd examples && $(MAKE) clean)
	rm -rf libdoc

test: clean all opt
	cd examples && $(MAKE) test

INSTALL=META src/syntax/sedlex.cma src/syntax/ppx_sedlex$(EXE) src/lib/sedlexing.cma src/lib/sedlexing.cmi

INSTALL_OPT=src/syntax/sedlex.cmxs src/syntax/sedlex$(EXT_LIB) src/syntax/sedlex.cmxa src/syntax/ppx_sedlex.opt$(EXE) src/lib/sedlexing.cmx src/lib/sedlexing$(EXT_LIB) src/lib/sedlexing.cmxa

install:
	ocamlfind install sedlex $(INSTALL) $(INSTALL_OPT)

install_byteonly:
	ocamlfind install sedlex $(INSTALL)

uninstall:
	ocamlfind remove sedlex

PACKAGE = sedlex-$(VERSION)
DISTRIB = \
  CHANGES LICENSE META README.md Makefile \
  examples/Makefile \
  examples/tokenizer.ml \
  src/lib/Makefile \
  src/lib/sedlexing.ml \
  src/lib/sedlexing.mli \
  src/syntax/Makefile \
  src/syntax/sedlex_cset.ml \
  src/syntax/sedlex_cset.mli \
  src/syntax/sedlex.ml \
  src/syntax/sedlex.mli \
  src/syntax/sedlex_ppx.ml \
  src/syntax/unicode63.ml \
  src/syntax/unicode63.mli


package: clean
	rm -rf sedlex.tar.gz
	tar czf sedlex.tar.gz $(DISTRIB)
	rm -Rf $(PACKAGE)
	mkdir $(PACKAGE)
	cd $(PACKAGE) && tar xzf ../sedlex.tar.gz
	tar czf $(PACKAGE).tar.gz $(PACKAGE)
	rm -Rf $(PACKAGE) sedlex.tar.gz


TARGET=foo:bar/sedlex_dara
upload:
	scp $(PACKAGE).tar.gz README CHANGES $(TARGET)/
	rsync -avz libdoc $(TARGET)