add a simple trace facility to the build system
[ghc.git] / rules / tags-package.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://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13
14 # Build the tags files for a package. Use like this:
15 #
16 # $(eval $(call tags-package,compiler,stage2))
17 #
18 # Uses the same metadata as build-package.
19
20 define tags-package
21 $(call trace, tags-package($1,$2))
22 # $1 = dir
23 # $2 = distdir
24
25 .PHONY: tags_$1
26 tags_$1:
27 inplace/bin/ghctags --topdir $$(TOP)/inplace/lib -c --use-cabal-config $1/$2 -- $$($1_$2_TAGS_HC_OPTS) $$($1_$2_v_ALL_HC_OPTS) -- $$($1_$2_HS_SRCS)
28
29 .PHONY: TAGS_$1
30 TAGS_$1:
31 inplace/bin/ghctags --topdir $$(TOP)/inplace/lib -e --use-cabal-config $1/$2 -- $$($1_$2_TAGS_HC_OPTS) $$($1_$2_v_ALL_HC_OPTS) -- $$($1_$2_HS_SRCS)
32
33 endef
34