File: rules

package info (click to toggle)
mlton 20130715-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 60,900 kB
  • ctags: 69,386
  • sloc: xml: 34,418; ansic: 17,399; lisp: 2,879; makefile: 1,605; sh: 1,254; pascal: 256; python: 143; asm: 97
file content (38 lines) | stat: -rwxr-xr-x 1,596 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
#!/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

# 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
DEB_MAKE_BUILD_TARGET   = all
DEB_MAKE_INSTALL_TARGET = install-no-strip DESTDIR=$(CURDIR)/debian/tmp/ PREFIX=/usr MAN_PREFIX_EXTRA=/share
DEB_MAKE_CHECK_TARGET   = check

DEB_DH_STRIP_ARGS_DEFAULT = --no-automatic-dbgsym

# 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_MULTIARCH)
	ln -s $(DEB_HOST_MULTIARCH) $(CURDIR)/debian/tmp/usr/lib/mlton/targets/self

# Remove licenses and empty directories to appease lintian
common-install-indep::
	rm README; cp doc/README .
	rm -f $(CURDIR)/debian/tmp/usr/lib/mlton/sml/smlnj-lib/HTML4/helper.py # we don't need a python dependency for an unrelated helper script
	rm -f $(CURDIR)/debian/tmp/usr/lib/mlton/sml/smlnj-lib/HTML4/tests/test001.html # would reveal user IP if loaded due to external validation image
	find $(CURDIR)/debian/tmp -type d -empty -delete
	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