File: rules

package info (click to toggle)
haskell-hadrian 9.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,840 kB
  • sloc: haskell: 12,374; python: 374; makefile: 234; ansic: 176; sh: 76
file content (36 lines) | stat: -rwxr-xr-x 869 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
#!/usr/bin/make -f

SETUP := $(CURDIR)/setup
PKG_DB := $(CURDIR)/debian/packages.conf/
INSTDIR := $(CURDIR)/tmp/

define build
	$(SETUP) configure --package-db=$(PKG_DB) --prefix=$(INSTDIR) -O ${1} \
		&& $(SETUP) build --builddir=dist \
		&& $(SETUP) install --builddir=dist
endef


%:
	dh $@

.PHONY: override_dh_auto_build
override_dh_auto_build:
	ghc -O -o $(SETUP) hadrian/Setup.hs
	ghc-pkg init $(PKG_DB)
	cd libraries/ghc-platform/ && $(call build)
	cd utils/ghc-toolchain/ && $(call build)
	cd hadrian && $(call build, -f-selftest -f-threaded)

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	dh_auto_clean
	rm -f $(SETUP) hadrian/Setup.o hadrian/Setup.hi
	rm -rf libraries/ghc-platform/dist
	rm -rf utils/ghc-toolchain/dist
	rm -rf hadrian/dist
	rm -rf $(PKG_DB) $(INSTDIR)

.PHONY: override_dh_strip
override_dh_strip:
	dh_strip --no-automatic-dbgsym