Commit | Line | Data |
---|---|---|
a441e504 WT |
1 | #!/usr/bin/make -f |
2 | ||
3 | include /usr/share/cdbs/1/rules/debhelper.mk | |
4 | include /usr/share/cdbs/1/class/makefile.mk | |
5 | include /usr/share/cdbs/1/rules/patchsys-quilt.mk | |
6 | ||
7 | # MLton compiles optimized, debug, and pic versions on its own. | |
8 | DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) make -C $(DEB_BUILDDIR) | |
9 | ||
10 | # The MLton guide is html. Don't compress example .sml files. | |
11 | DEB_COMPRESS_EXCLUDE_ALL = mlton/guide .sml | |
12 | ||
13 | DEB_MAKE_CLEAN_TARGET = clean | |
14 | DEB_MAKE_BUILD_TARGET = all docs | |
15 | DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/tmp/ PREFIX=/usr | |
16 | DEB_MAKE_CHECK_TARGET = check | |
17 | ||
18 | DEB_DH_STRIP_ARGS_DEFAULT = --no-automatic-dbgsym | |
19 | ||
20 | # Useful when inspecting build logs | |
21 | common-configure-arch:: | |
22 | free | |
23 | ||
24 | # Move MLton target to per-architecture path | |
25 | common-install-arch:: | |
26 | mv $(CURDIR)/debian/tmp/usr/lib/mlton/targets/self $(CURDIR)/debian/tmp/usr/lib/mlton/targets/$(DEB_HOST_MULTIARCH) | |
27 | ln -s $(DEB_HOST_MULTIARCH) $(CURDIR)/debian/tmp/usr/lib/mlton/targets/self | |
28 | ||
29 | # Remove licenses and empty directories to appease lintian | |
30 | common-install-indep:: | |
31 | cp README.adoc README | |
32 | 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 | |
33 | 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 | |
34 | find $(CURDIR)/debian/tmp -type d -empty -delete | |
35 | if test -n "$(DEB_ISNATIVE)"; then mv \ | |
36 | $(CURDIR)/debian/tmp/usr/share/doc/mlton/changelog \ | |
37 | $(CURDIR)/debian/tmp/usr/share/doc/mlton/changelog.PreviousRelease; \ | |
38 | fi |