Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
883d9808
Commit
883d9808
authored
Oct 02, 2009
by
Ian Lynagh
Browse files
Use "order only constraints" for directories
There are now 104 calls to mkdirhier, down from 1201, when validating.
parent
6a2a2197
Changes
14
Hide whitespace changes
Inline
Side-by-side
compiler/ghc.mk
View file @
883d9808
...
...
@@ -141,8 +141,7 @@ $(eval $(call clean-target,compiler,config_hs,$(compiler_CONFIG_HS)))
PLATFORM_H
=
ghc_boot_platform.h
compiler/stage1/$(PLATFORM_H)
:
mk/config.mk mk/project.mk
"
$(MKDIRHIER)
"
$(
dir
$@
)
compiler/stage1/$(PLATFORM_H)
:
mk/config.mk mk/project.mk | $$(dir $$@)/.
"
$(RM)
"
$(RM_OPTS)
$@
@
echo
"Creating
$@
..."
@
echo
"#ifndef __PLATFORM_H__"
>
$@
...
...
@@ -188,8 +187,7 @@ endif
# For stage2 and above, the BUILD platform is the HOST of stage1, and
# the HOST platform is the TARGET of stage1. The TARGET remains the same
# (stage1 is the cross-compiler, not stage2).
compiler/stage2/$(PLATFORM_H)
:
mk/config.mk mk/project.mk
"
$(MKDIRHIER)
"
$(
dir
$@
)
compiler/stage2/$(PLATFORM_H)
:
mk/config.mk mk/project.mk | $$(dir $$@)/.
"
$(RM)
"
$(RM_OPTS)
$@
@
echo
"Creating
$@
..."
@
echo
"#ifndef __PLATFORM_H__"
>
$@
...
...
ghc.mk
View file @
883d9808
...
...
@@ -83,6 +83,11 @@
.PHONY
:
default all haddock
# We need second expansion for the way we handle directories, so that
# | $$$$(dir $$$$@)/.
# expands to the directoy of a rule that uses a % pattern.
.SECONDEXPANSION
:
default
:
all
# Catch make if it runs away into an infinite loop
...
...
@@ -397,6 +402,12 @@ libraries/ghc-prim/dist-install/package-data.mk : rts/package.conf.inplace
rts/package.conf.inplace
:
libffi/package.conf.inplace
endif
# -----------------------------------------------------------------------------
# Directories
%/.
:
$(MKDIRHIER)
"
$(MKDIRHIER)
"
$@
# -----------------------------------------------------------------------------
# Special magic for the ghc-prim package
...
...
@@ -417,8 +428,7 @@ endef
PRIMOPS_TXT
=
$(GHC_COMPILER_DIR)
/prelude/primops.txt
libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs
:
$(GENPRIMOP_INPLACE) $(PRIMOPS_TXT)
"
$(MKDIRHIER)
"
$(
dir
$@
)
libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs
:
$(GENPRIMOP_INPLACE) $(PRIMOPS_TXT) | $$(dir $$@)/.
"
$(GENPRIMOP_INPLACE)
"
--make-haskell-wrappers
<
$(PRIMOPS_TXT)
>
$@
libraries/ghc-prim/GHC/Prim.hs
:
$(GENPRIMOP_INPLACE) $(PRIMOPS_TXT)
...
...
@@ -702,13 +712,13 @@ libraries/ghc-prim/dist-install/doc/html/ghc-prim/ghc-prim.haddock: \
libraries/ghc-prim/dist-install/build/autogen/GHC/PrimopWrappers.hs
libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs
:
\
$(PRIMOPS_TXT) $(GENPRIMOP_INPLACE)
$(MKDIRHIER)
"
$(MKDIRHIER)
"
$(
dir
$@
)
$(PRIMOPS_TXT) $(GENPRIMOP_INPLACE)
\
| $
$(dir
$
$@)
/.
"
$(GENPRIMOP_INPLACE)
"
--make-haskell-source
<
$<
>
$@
libraries/ghc-prim/dist-install/build/autogen/GHC/PrimopWrappers.hs
:
\
$(PRIMOPS_TXT) $(GENPRIMOP_INPLACE)
$(MKDIRHIER)
"
$(MKDIRHIER)
"
$(
dir
$@
)
$(PRIMOPS_TXT) $(GENPRIMOP_INPLACE)
\
| $
$(dir
$
$@)
/.
"
$(GENPRIMOP_INPLACE)
"
--make-haskell-wrappers
<
$<
>
$@
# -----------------------------------------------------------------------------
...
...
rts/ghc.mk
View file @
883d9808
...
...
@@ -62,11 +62,9 @@ rts_AUTO_APPLY_CMM = rts/dist/build/AutoApply.cmm
$(rts_AUTO_APPLY_CMM)
:
$(GENAPPLY_INPLACE)
"
$(GENAPPLY_INPLACE)
"
>
$@
rts/dist/build/sm/Evac_thr.c
:
rts/sm/Evac.c
"
$(MKDIRHIER)
"
$(
dir
$@
)
rts/dist/build/sm/Evac_thr.c
:
rts/sm/Evac.c | $$(dir $$@)/.
cp
$<
$@
rts/dist/build/sm/Scav_thr.c
:
rts/sm/Scav.c
"
$(MKDIRHIER)
"
$(
dir
$@
)
rts/dist/build/sm/Scav_thr.c
:
rts/sm/Scav.c | $$(dir $$@)/.
cp
$<
$@
rts_H_FILES
=
$(
wildcard
includes/
*
.h
)
$(
wildcard
rts/
*
.h
)
...
...
rules/build-dependencies.mk
View file @
883d9808
...
...
@@ -21,8 +21,7 @@ endif
ifneq
"$$($1_$2_NO_BUILD_DEPS)" "YES"
$$($1_$2_depfile)
:
$$(MKDIRHIER) $$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC_MK_DEPEND_DEP) $$($1_$2_C_FILES) $$($1_$2_S_FILES)
"
$
$(MKDIRHIER)
"
$1
/
$2
/build
$$($1_$2_depfile)
:
$$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC_MK_DEPEND_DEP) $$($1_$2_C_FILES) $$($1_$2_S_FILES) | $$$$(dir $$$$@)/.
"
$
$(RM)
"
$
$(RM_OPTS)
$$
@.tmp
touch
$$
@.tmp
ifneq
"$$($1_$2_C_SRCS)$$($1_$2_S_SRCS)" ""
...
...
rules/build-perl.mk
View file @
883d9808
...
...
@@ -37,8 +37,7 @@ clean_$1 : clean_$1_$2
# INPLACE_BIN etc. might be empty if we're cleaning
ifeq
"$(findstring clean,$(MAKECMDGOALS))" ""
ifneq
"$$(BINDIST)" "YES"
$1/$2/$$($1_$2_PROG).prl
:
$1/$$($1_PERL_SRC) $$(UNLIT)
"
$
$(MKDIRHIER)
"
$1
/
$2
$1/$2/$$($1_$2_PROG).prl
:
$1/$$($1_PERL_SRC) $$(UNLIT) | $$$$(dir $$$$@)/.
"
$
$(UNLIT)
"
$
$(UNLIT_OPTS)
$$
<
$$
@
$1/$2/$$($1_$2_PROG)
:
$1/$2/$$($1_$2_PROG).prl
...
...
@@ -48,8 +47,7 @@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl
cat
$$
<
>>
$$
@
$
$(EXECUTABLE_FILE)
$$
@
$$($1_$2_INPLACE)
:
$1/$2/$$($1_$2_PROG)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$$($1_$2_INPLACE)
:
$1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/.
"
$
$(CP)
"
$$
<
$$
@
$
$(EXECUTABLE_FILE)
$$
@
endif
...
...
rules/build-prog.mk
View file @
883d9808
...
...
@@ -96,12 +96,10 @@ $(call c-objs,$1,$2,v)
$(call
hs-objs,$1,$2,v)
ifeq
"$$(BootingFromHc)" "NO"
$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)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$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 $$$$@)/.
"
$$
(
$1_$2_HC
)"
-o
$$
@
$$
(
$1_$2_v_ALL_HC_OPTS
)
$
$(LD_OPTS)
$$
(
$1_$2_v_HS_OBJS
)
$$
(
$1_$2_v_C_OBJS
)
$$
(
$1_$2_v_S_OBJS
)
$$
(
$1_$2_OTHER_OBJS
)
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)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$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
)
endif
...
...
@@ -136,8 +134,7 @@ $(call clean-target,$1,$2_inplace,$$($1_$2_INPLACE))
# INPLACE_BIN might be empty if we're distcleaning
ifeq
"$(findstring clean,$(MAKECMDGOALS))" ""
$$($1_$2_INPLACE)
:
$1/$2/build/tmp/$$($1_$2_PROG) $$(MKDIRHIER)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$$($1_$2_INPLACE)
:
$1/$2/build/tmp/$$($1_$2_PROG) | $$$$(dir $$$$@)/.
"
$
$(CP)
"
-p
$$
<
$$
@
touch
$$
@
endif
...
...
rules/c-suffix-rules.mk
View file @
883d9808
...
...
@@ -20,8 +20,7 @@ define c-suffix-rules
# UseGhcForCc is only relevant when not booting from HC files.
ifeq
"$4 $$(BootingFromHc)" "YES NO"
$1/$2/build/%.$$($3_osuf)
:
$1/%.c $$(MKDIRHIER) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_osuf)
:
$1/%.c $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_GHC_CC_OPTS
)
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_osuf)
:
$1/$2/build/%.c $$($1_$2_HC_DEP)
...
...
@@ -30,8 +29,7 @@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $$($1_$2_HC_DEP)
$1/$2/build/%.$$($3_osuf)
:
$1/$2/build/%.$$($3_way_)s $$($1_$2_HC_DEP)
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_GHC_CC_OPTS
)
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_osuf)
:
$1/%.S $$(MKDIRHIER) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_osuf)
:
$1/%.S $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_GHC_CC_OPTS
)
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_way_)s
:
$1/$2/build/%.c $$($1_$2_HC_DEP)
...
...
@@ -42,8 +40,7 @@ $1/$2/build/%.$$($3_way_)s : $1/%.c $$($1_$2_HC_DEP)
else
$1/$2/build/%.$$($3_osuf)
:
$1/%.c $$(MKDIRHIER)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_osuf)
:
$1/%.c | $$$$(dir $$$$@)/.
"
$
$(CC)
"
$$
(
$1_$2_$3_ALL_CC_OPTS
)
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_osuf)
:
$1/$2/build/%.c
...
...
@@ -52,8 +49,7 @@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c
$1/$2/build/%.$$($3_osuf)
:
$1/$2/build/%.$$($3_way_)s
"
$
$(AS)
"
$$
(
$1_$2_$3_ALL_AS_OPTS
)
-o
$$
@
$$
<
$1/$2/build/%.$$($3_osuf)
:
$1/%.S $$(MKDIRHIER)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_osuf)
:
$1/%.S | $$$$(dir $$$$@)/.
"
$
$(CC)
"
$$
(
$1_$2_$3_ALL_CC_OPTS
)
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_way_)s
:
$1/$2/build/%.c
...
...
rules/cmm-suffix-rules.mk
View file @
883d9808
...
...
@@ -22,28 +22,22 @@ ifneq "$$(CLEANING)" "YES"
ifneq
"$$(BootingFromHc)" "YES"
$1/$2/build/%.$$($3_way_)o
:
$1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_way_)o
:
$1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_MOST_HC_OPTS
)
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_way_)o
:
$1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_way_)o
:
$1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_MOST_HC_OPTS
)
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_way_)hc
:
$1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_way_)hc
:
$1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_MOST_HC_OPTS
)
-C
$$
<
-o
$$
@
$1/$2/build/%.$$($3_way_)hc
:
$1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_way_)hc
:
$1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_MOST_HC_OPTS
)
-C
$$
<
-o
$$
@
$1/$2/build/%.$$($3_way_)s
:
$1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_way_)s
:
$1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_MOST_HC_OPTS
)
-S
$$
<
-o
$$
@
$1/$2/build/%.$$($3_way_)s
:
$1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_way_)s
:
$1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
"
$$
(
$1_$2_HC
)"
$$
(
$1_$2_$3_MOST_HC_OPTS
)
-S
$$
<
-o
$$
@
endif
...
...
rules/haddock.mk
View file @
883d9808
...
...
@@ -37,8 +37,7 @@ ifeq "$$(HSCOLOUR_SRCS)" "YES"
$1_$2_HADDOCK_FLAGS
+=
--hyperlink-source
endif
$$($$($1_PACKAGE)_HADDOCK_FILE)
:
$$(MKDIRHIER) $$(INPLACE_BIN)/haddock$$(exeext) $$(GHC_CABAL_INPLACE) $$($1_$2_HS_SRCS) $$($$($1_PACKAGE)_HADDOCK_DEPS)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$$($$($1_PACKAGE)_HADDOCK_FILE)
:
$$(INPLACE_BIN)/haddock$$(exeext) $$(GHC_CABAL_INPLACE) $$($1_$2_HS_SRCS) $$($$($1_PACKAGE)_HADDOCK_DEPS) | $$$$(dir $$$$@)/.
"
$
$(GHC_CABAL_INPLACE)
"
haddock
$2
$1
--with-haddock
=
$
$(TOP)
/
$
$(INPLACE_BIN)
/haddock
--with-ghc
=
$
$(TOP)
/
$
$(INPLACE_BIN)
/ghc-stage2
$$
(
$1_$2_HADDOCK_FLAGS
)
$$
(
$1_$2_HADDOCK_OPTS
)
# Make the haddocking depend on the library .a file, to ensure
...
...
rules/hs-suffix-rules-srcdir.mk
View file @
883d9808
...
...
@@ -18,20 +18,16 @@ define hs-suffix-rules-srcdir
ifneq
"$$(BootingFromHc)" "YES"
$1/$2/build/%.hs
:
$1/$4/%.ly $$(MKDIRHIER)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.hs
:
$1/$4/%.ly | $$$$(dir $$$$@)/.
"
$
$(HAPPY)
"
$$
(
$1_$2_$3_ALL_HAPPY_OPTS
)
$$
<
-o
$$
@
$1/$2/build/%.hs
:
$1/$4/%.y $$(MKDIRHIER)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.hs
:
$1/$4/%.y | $$$$(dir $$$$@)/.
"
$
$(HAPPY)
"
$$
(
$1_$2_$3_ALL_HAPPY_OPTS
)
$$
<
-o
$$
@
$1/$2/build/%.hs
:
$1/$4/%.x $$(MKDIRHIER)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.hs
:
$1/$4/%.x | $$$$(dir $$$$@)/.
"
$
$(ALEX)
"
$$
(
$1_$2_$3_ALL_ALEX_OPTS
)
$$
<
-o
$$
@
$1/$2/build/%_hsc.c $1/$2/build/%_hsc.h $1/$2/build/%.hs
:
$1/$4/%.hsc $$(HSC2HS_INPLACE)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%_hsc.c $1/$2/build/%_hsc.h $1/$2/build/%.hs
:
$1/$4/%.hsc $$(HSC2HS_INPLACE) | $$$$(dir $$$$@)/.
"
$
$(HSC2HS_INPLACE)
"
$$
(
$1_$2_$3_ALL_HSC2HS_OPTS
)
$$
<
-o
$$
@
# Compiling Haskell source
...
...
@@ -53,8 +49,7 @@ endif
# XXX: for some reason these get used in preference to the direct
# .hs->.o rule, I don't know why --SDM
$1/$2/build/%.$$($3_osuf)
:
$1/$4/%.hc includes/ghcautoconf.h includes/ghcplatform.h $$(MKDIRHIER)
"
$
$(MKDIRHIER)
"
$
$(
dir
$$
@
)
$1/$2/build/%.$$($3_osuf)
:
$1/$4/%.hc includes/ghcautoconf.h includes/ghcplatform.h | $$$$(dir $$$$@)/.
"
$
$(CC)
"
$$
(
$1_$2_$3_ALL_CC_OPTS
)
-Iincludes
-x
c
-c
$$
<
-o
$$
@
$1/$2/build/%.$$($3_osuf)
:
$1/$2/build/%.hc includes/ghcautoconf.h includes/ghcplatform.h
...
...
utils/ghc-cabal/ghc.mk
View file @
883d9808
...
...
@@ -18,13 +18,10 @@ CABAL_DOTTED_VERSION := $(shell grep "^Version:" libraries/Cabal/Cabal.cabal | s
CABAL_VERSION
:=
$(
subst
.,
$(comma)
,
$(CABAL_DOTTED_VERSION)
)
CABAL_CONSTRAINT
:=
--constraint
=
"Cabal ==
$(CABAL_DOTTED_VERSION)
"
$(GHC_CABAL_INPLACE)
:
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
"
$(MKDIRHIER)
"
$(
dir
$@
)
$(GHC_CABAL_INPLACE)
:
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext) | $$(dir $$@)/.
"
$(CP)
"
$<
$@
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(GHC_CABAL_DIR)/ghc-cabal.hs $(MKDIRHIER)
"
$(MKDIRHIER)
"
bootstrapping
"
$(MKDIRHIER)
"
$(
dir
$@
)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(GHC_CABAL_DIR)/ghc-cabal.hs | $$(dir $$@)/. bootstrapping/.
"
$(GHC)
"
$(SRC_HC_OPTS)
--make
$(GHC_CABAL_DIR)
/ghc-cabal.hs
-o
$@
\
-Wall
$(WERROR)
\
-DCABAL_VERSION
=
$(CABAL_VERSION)
\
...
...
@@ -54,8 +51,7 @@ $(GHC_CABAL_DIR)_dist-dummy-ghc_MODULES = dummy-ghc
$(GHC_CABAL_DIR)_dist-dummy-ghc_PROG
=
dummy-ghc
$(exeext)
# depend on project.mk, so we pick up the new version number if it changes.
$(GHC_CABAL_DIR)/dist-dummy-ghc/build/dummy-ghc.hs
:
$(GHC_CABAL_DIR)/ghc.mk $(MKDIRHIER) mk/project.mk
"
$(MKDIRHIER)
"
$(
dir
$@
)
$(GHC_CABAL_DIR)/dist-dummy-ghc/build/dummy-ghc.hs
:
$(GHC_CABAL_DIR)/ghc.mk mk/project.mk | $$(dir $$@)/.
echo
"import System.Environment; import System.Cmd; import System.Exit"
>
$@
echo
"main :: IO ()"
>>
$@
echo
"main = do args <- getArgs; if args == [
\"
--numeric-version
\"
] then putStrLn
\"
$(ProjectVersion)
\"
else do e <- rawSystem
\"
$(GHC_STAGE0)
\"
args; exitWith e"
>>
$@
...
...
utils/ghc-pkg/ghc.mk
View file @
883d9808
...
...
@@ -30,8 +30,7 @@ endif
else
$(GHC_PKG_INPLACE)
:
utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext) $(MKDIRHIER)
"
$(MKDIRHIER)
"
$(INPLACE_PACKAGE_CONF)
$(GHC_PKG_INPLACE)
:
utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext) | $$(dir $$@)/. $(INPLACE_PACKAGE_CONF)/.
"
$(RM)
"
$(RM_OPTS)
$(INPLACE_PACKAGE_CONF)
/
*
ifeq
"$(Windows)" "YES"
cp
$<
$@
...
...
@@ -47,9 +46,7 @@ endif
# depend on ghc-cabal, otherwise we build Cabal twice when building in parallel
# The binary package is not warning-clean, so we need a few -fno-warns here.
utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext)
:
utils/ghc-pkg/Main.hs utils/ghc-pkg/Version.hs $(GHC_CABAL_INPLACE) $(MKDIRHIER)
"
$(MKDIRHIER)
"
bootstrapping
"
$(MKDIRHIER)
"
utils/ghc-pkg/dist/build
utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext)
:
utils/ghc-pkg/Main.hs utils/ghc-pkg/Version.hs $(GHC_CABAL_INPLACE) | bootstrapping/. $$(dir $$@)/.
"
$(GHC)
"
$(SRC_HC_OPTS)
--make
utils/ghc-pkg/Main.hs
-o
$@
\
-Wall
-fno-warn-unused-imports
\
-DCABAL_VERSION
=
$(CABAL_VERSION)
\
...
...
utils/mkdependC/ghc.mk
View file @
883d9808
...
...
@@ -10,8 +10,7 @@
#
# -----------------------------------------------------------------------------
$(MKDEPENDC)
:
utils/mkdependC/mkdependC.prl $(MKDIRHIER)
"
$(MKDIRHIER)
"
$(
dir
$@
)
$(MKDEPENDC)
:
utils/mkdependC/mkdependC.prl | $$(dir $$@)/.
"
$(RM)
"
$(RM_OPTS)
$@
echo
'#!
$(PERL)
'
>>
$@
echo
'$$DEFAULT_TMPDIR = "
$(DEFAULT_TMPDIR)
";'
>>
$@
...
...
utils/runghc/ghc.mk
View file @
883d9808
...
...
@@ -18,8 +18,7 @@ utils/runghc_dist_INSTALL_SHELL_WRAPPER = YES
ifneq
"$(BINDIST)" "YES"
# hack: the build system has trouble with Main modules not called Main.hs
utils/runghc/dist/build/Main.hs
:
utils/runghc/runghc.hs $(MKDIRHIER)
"
$(MKDIRHIER)
"
$(
dir
$@
)
utils/runghc/dist/build/Main.hs
:
utils/runghc/runghc.hs | $$(dir $$@)/.
"
$(CP)
"
$<
$@
endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment