X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-prog.mk;h=99093d3feec57c154d10adbf6823666eb608a78f;hb=237fea9fd27a276f6674c76e2eeff0c6634576dd;hp=4c07ad6308593f506be112f7d3af5c43213384a5;hpb=295016c3c0aa1f407436136e39ababf2dc8b50c6;p=ghc-hetmet.git diff --git a/rules/build-prog.mk b/rules/build-prog.mk index 4c07ad6..99093d3 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -21,6 +21,7 @@ define build-prog $(call trace, build-prog($1,$2,$3)) +$(call profStart, build-prog($1,$2,$3)) # $1 = dir # $2 = distdir # $3 = GHC stage to use (0 == bootstrapping compiler) @@ -40,6 +41,7 @@ $(call clean-target,$1,$2,$1/$2) ifneq "$$($1_$2_NOT_NEEDED)" "YES" $$(eval $$(call build-prog-helper,$1,$2,$3)) endif +$(call profEnd, build-prog($1,$2,$3)) endef @@ -80,7 +82,7 @@ $(call build-package-data,$1,$2,$3) ifneq "$$(NO_INCLUDE_PKGDATA)" "YES" ifeq "$3" "0" include $1/$2/package-data.mk -else ifeq "$(phase)" "" +else ifeq "$(phase)" "final" include $1/$2/package-data.mk endif endif @@ -154,7 +156,7 @@ $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2 "$$($1_$2_HC)" -o $$@ $$($1_$2_v_ALL_HC_OPTS) $$(LD_OPTS) $$($1_$2_GHC_LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) else $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/. - "$$(CC)" -o $$@ $$($1_$2_v_ALL_CC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$($1_$2_v_EXTRA_CC_OPTS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) + "$$($1_$2_CC)" -o $$@ $$($1_$2_v_ALL_CC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$($1_$2_v_EXTRA_CC_OPTS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) endif # Note [lib-depends] if this program is built with stage1 or greater, we @@ -186,20 +188,6 @@ INSTALL_BINS += $1/$2/build/tmp/$$($1_$2_PROG) endif endif -# --- DEPENDENCIES -# We always have the dependency rules available, as we need to know -# how to build hsc2hs's dependency file in phase 0 -$(call build-dependencies,$1,$2,$3) -ifneq "$(phase)" "0" -# From phase 1 we actually include the dependency files for the -# bootstrapping stuff -ifeq "$3" "0" -$(call include-dependencies,$1,$2,$3) -else ifeq "$(phase)" "" -# In the final phase, we also include the dependency files for -# everything else -$(call include-dependencies,$1,$2,$3) -endif -endif +$(call dependencies,$1,$2,$3) endef