GHC new build system megapatch
[ghc-hetmet.git] / rules / includes-sources.mk
1
2 define includes-sources # args: $1 = dir, $2 = distdir
3
4 ifeq "$$($1_$2_INCLUDE_DIRS)" ""
5 $1_$2_INCLUDE_DIRS = .
6 endif
7
8 $1_$2_INSTALL_INCLUDES_SRCS :=\
9     $$(foreach file,$$($1_$2_INSTALL_INCLUDES),\
10         $$(firstword \
11             $$(wildcard \
12                 $$(foreach dir,$$($1_$2_INCLUDE_DIRS),\
13                     $1/$$(dir)/$$(file)))))
14 endef