File: rules

package info (click to toggle)
mlton 20100608-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 36,624 kB
  • sloc: ansic: 18,441; lisp: 2,879; makefile: 1,572; sh: 1,326; pascal: 256; asm: 97
file content (36 lines) | stat: -rwxr-xr-x 1,365 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

HEAPSIZE := $(shell . debian/heap-size)
	
# MLton compiles optimized, debug, and pic versions on its own.
DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) make -C $(DEB_BUILDDIR)

# The MLton guide is html. Don't compress example .sml files.
DEB_COMPRESS_EXCLUDE_ALL = mlton/guide .sml

DEB_MAKE_CLEAN_TARGET   = clean clean-svn
DEB_MAKE_BUILD_TARGET   = all RUNTIME_ARGS="$(HEAPSIZE)"
DEB_MAKE_INSTALL_TARGET = install-no-strip DESTDIR=$(CURDIR)/debian/tmp/ PREFIX=/usr MAN_PREFIX_EXTRA=/share
DEB_MAKE_CHECK_TARGET   = check

# Useful when inspecting build logs
common-configure-arch::
	free

# Move MLton target to per-architecture path
common-install-arch::
	mv $(CURDIR)/debian/tmp/usr/lib/mlton/targets/self $(CURDIR)/debian/tmp/usr/lib/mlton/targets/$(DEB_HOST_GNU_TYPE)
	ln -s $(DEB_HOST_GNU_TYPE) $(CURDIR)/debian/tmp/usr/lib/mlton/targets/self

# Remove licenses and empty directories to appease lintian
common-install-indep::
	find $(CURDIR)/debian/tmp -type d -empty -delete
	rm -rf $(CURDIR)/debian/tmp/usr/share/doc/mlton/license
	if test -n "$(DEB_ISNATIVE)"; then mv \
		$(CURDIR)/debian/tmp/usr/share/doc/mlton/changelog \
		$(CURDIR)/debian/tmp/usr/share/doc/mlton/changelog.PreviousRelease; \
	fi