Small build system refactoring
authorIan Lynagh <ian@well-typed.com>
Fri, 11 Jan 2013 13:14:29 +0000 (13:14 +0000)
committerIan Lynagh <ian@well-typed.com>
Fri, 11 Jan 2013 13:29:04 +0000 (13:29 +0000)
hs-suffix-rules now calls hs-suffix-rules-srcdir, saving some duplication

rules/build-package-way.mk
rules/build-prog.mk
rules/hs-suffix-rules.mk

index 76598de..aade4e9 100644 (file)
@@ -17,8 +17,6 @@ $(call profStart, build-package-way($1,$2,$3))
 
 $(call distdir-way-opts,$1,$2,$3,$4)
 $(call hs-suffix-rules,$1,$2,$3)
-$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\
-  $$(eval $$(call hs-suffix-rules-srcdir,$1,$2,$3,$$(dir))))
 
 $(call hs-objs,$1,$2,$3)
 
index 2c1836a..4111e17 100644 (file)
@@ -155,8 +155,6 @@ endif
 endif
 
 $(call hs-suffix-rules,$1,$2,$$($1_$2_PROGRAM_WAY))
-$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\
-  $$(eval $$(call hs-suffix-rules-srcdir,$1,$2,$$($1_$2_PROGRAM_WAY),$$(dir))))
 
 $(call c-objs,$1,$2,$$($1_$2_PROGRAM_WAY))
 $(call hs-objs,$1,$2,$$($1_$2_PROGRAM_WAY))
index 9b11e6e..fead7d1 100644 (file)
@@ -34,5 +34,8 @@ $(call hi-rule,$1/$2/build/autogen,$1/$2/build,$3)
 endif
 endif
 
+$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\
+  $$(eval $$(call hs-suffix-rules-srcdir,$1,$2,$3,$$(dir))))
+
 endef # hs-suffix-rules