File: rules

package info (click to toggle)
obrowser 1.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,216 kB
  • ctags: 3,498
  • sloc: ml: 13,505; makefile: 343; sh: 11
file content (42 lines) | stat: -rwxr-xr-x 1,070 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
#!/usr/bin/make -f
# -*- makefile -*-
include /usr/share/ocaml/ocamlvars.mk

DOCDIR = debian/obrowser-doc/usr/share/doc/obrowser-doc
export OCAMLFIND_DESTDIR=$(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)

%:
	dh --with ocaml $@

.PHONY: override_dh_auto_install
override_dh_auto_install:
	install -d $(OCAMLFIND_DESTDIR)
	$(MAKE) install

.PHONY: override_dh_ocaml
override_dh_ocaml:
	dh_ocaml -Xstdlib.cma -Xmutex.cmi -Xstd_exit.cmo \
	  `cd $(OCAML_STDLIB_DIR) && for u in *.cmi; do echo -n " -X$$u"; done`

.PHONY: override_dh_install
override_dh_install:
	dh_install --list-missing
ifneq (,$(findstring obrowser-doc, $(shell dh_listpackages)))
# Build the documentation packages
	cp -a examples tutorial $(DOCDIR)
# Clean up inappropriate files
	find $(DOCDIR) \( \
	  -name '*.exe' -or \
	  -name '*.cm*' -or \
	  -name '*.byte' -or \
	  -name '*.o' -or \
	  -name .depend -or \
	  -name LICENSE \
	\) -delete
	rm -f $(DOCDIR)/tutorial/distrib
	rm -f $(DOCDIR)/examples/scribble/server
endif

.PHONY: override_dh_compress
override_dh_compress:
	dh_compress -X.js -X.uue