File: rules

package info (click to toggle)
hscolour 1.24.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 220 kB
  • sloc: haskell: 1,169; sh: 15; makefile: 11
file content (34 lines) | stat: -rwxr-xr-x 1,156 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f


# In order to generated colourised HTML for the libghc-hscolour-doc package
# we need a special hack because the colour docs are generated by an executable
# create by this package and we don't want this package to depend on itself.

pwd := $(shell pwd)

# Modify the GHC configure parameters to point to a local version of
# HsColour.
DEB_SETUP_GHC_CONFIGURE_ARGS += --with-hscolour=$(pwd)/hscolour-wrapper

# Generate a fake version of the executable (a trivial shell script) which is
# available at configure time. This shell script will exec the real HsColour
# executable if it can be found. If it can't be found it will give a sensible
# result for a version request (which is enough to fool haddock) and exit with
# an error for anything else.
hscolour-wrapper : debian/hscolour-wrapper
	cp $+ $@
	chmod u+x $@

# Force generation of the wrapper script.
configure-ghc-stamp : hscolour-wrapper

# Ensure arch-all-only works 
build-haddock-stamp: build-ghc-stamp

clean ::
	rm -f hscolour-wrapper

# Standard way of building Haskell binary.
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk