rts: Enable USDT probes object on Linux
[ghc.git] / rules / hs-suffix-rules-srcdir.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
7 # To understand how the build system works and how to modify it, see
8 # http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13
14 define hs-suffix-rules-srcdir
15 # args: $1 = dir, $2 = distdir, $3 = srcdir
16
17 # Preprocessing Haskell source
18
19 ifneq "$$(BINDIST)" "YES"
20
21 $1/$2/build/%.hs : $1/$3/%.ly | $$$$(dir $$$$@)/.
22 $$(call cmd,HAPPY) $$($1_$2_ALL_HAPPY_OPTS) $$< -o $$@
23
24 $1/$2/build/%.hs : $1/$3/%.y | $$$$(dir $$$$@)/.
25 $$(call cmd,HAPPY) $$($1_$2_ALL_HAPPY_OPTS) $$< -o $$@
26
27 $1/$2/build/%.hs : $1/$2/build/%.ly | $$$$(dir $$$$@)/.
28 $$(call cmd,HAPPY) $$($1_$2_ALL_HAPPY_OPTS) $$< -o $$@
29
30 $1/$2/build/%.hs : $1/$2/build/%.y | $$$$(dir $$$$@)/.
31 $$(call cmd,HAPPY) $$($1_$2_ALL_HAPPY_OPTS) $$< -o $$@
32
33 $1/$2/build/%.hs : $1/$3/%.x | $$$$(dir $$$$@)/.
34 $$(call cmd,ALEX) $$($1_$2_ALL_ALEX_OPTS) $$< -o $$@
35
36 $1/$2/build/%_hsc.c $1/$2/build/%_hsc.h $1/$2/build/%.hs : $1/$3/%.hsc $$$$(hsc2hs_INPLACE) | $$$$(dir $$$$@)/.
37 $$(call cmd,hsc2hs_INPLACE) $$($1_$2_ALL_HSC2HS_OPTS) $$< -o $$@
38
39 # Now the rules for hs-boot files.
40
41 $1/$2/build/%.hs-boot : $1/$3/%.hs-boot
42 "$$(CP)" $$< $$@
43
44 $1/$2/build/%.lhs-boot : $1/$3/%.lhs-boot
45 "$$(CP)" $$< $$@
46
47 endif
48
49 endef
50