Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
480ad036
Commit
480ad036
authored
Mar 03, 2013
by
ian@well-typed.com
Browse files
Use more of the automatically generated INPLACE variables
parent
1da6975a
Changes
9
Hide whitespace changes
Inline
Side-by-side
ghc.mk
View file @
480ad036
...
...
@@ -889,7 +889,7 @@ install_packages: rts/package.conf.install
$(
call
installLibsTo,
$(
wildcard
libraries/
$p
/dist-install/build/
*
.so libraries/
$p
/dist-install/build/
*
.dll libraries/
$p
/dist-install/build/
*
.dylib
)
,
"
$(DESTDIR)$(topdir)
/
$p
-
$
(libraries/
$p_dist
-install_VERSION
)
"
))
$(
foreach
p,
$(INSTALL_PACKAGES)
,
\
$(
call
make-command,
\
"
$(
GHC_CABAL
_INPLACE)
"
copy
\
"
$
(
ghc-cabal
_INPLACE
)
"
copy
\
"
$(STRIP_CMD)
"
\
$p
$
(
INSTALL_DISTDIR_
$p
)
\
'
$(DESTDIR)
'
\
...
...
@@ -899,7 +899,7 @@ install_packages: rts/package.conf.install
"
$(INSTALLED_GHC_PKG_REAL)
"
--force
--global-package-db
"
$(INSTALLED_PACKAGE_CONF)
"
update rts/package.conf.install
$(
foreach
p,
$(INSTALL_PACKAGES)
,
\
$(
call
make-command,
\
"
$(
GHC_CABAL
_INPLACE)
"
register
\
"
$
(
ghc-cabal
_INPLACE
)
"
register
\
"
$(INSTALLED_GHC_REAL)
"
\
"
$(INSTALLED_GHC_PKG_REAL)
"
\
"
$(DESTDIR)$(topdir)
"
\
...
...
@@ -984,7 +984,7 @@ unix-binary-dist-prep:
echo
"BUILD_DOCBOOK_PS =
$(BUILD_DOCBOOK_PS)
"
>>
$(BIN_DIST_MK)
echo
"BUILD_DOCBOOK_PDF =
$(BUILD_DOCBOOK_PDF)
"
>>
$(BIN_DIST_MK)
echo
"BUILD_MAN =
$(BUILD_MAN)
"
>>
$(BIN_DIST_MK)
echo
"
GHC_CABAL
_INPLACE = utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist"
>>
$(BIN_DIST_MK)
echo
"
ghc-cabal
_INPLACE = utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist"
>>
$(BIN_DIST_MK)
echo
"UseSystemLibFFI =
$(UseSystemLibFFI)
"
>>
$(BIN_DIST_MK)
cd
$(BIN_DIST_PREP_DIR)
&&
autoreconf
$(
call
removeFiles,
$(BIN_DIST_PREP_TAR)
)
...
...
mk/config.mk.in
View file @
480ad036
...
...
@@ -441,8 +441,6 @@ SPLIT = $(INPLACE_LIB)/$(GHC_SPLIT_PGM)
UNLIT
=
$(INPLACE_LIB)
/
$(GHC_UNLIT_PGM)
TOUCHY
=
$(INPLACE_LIB)
/touchy
$(exeext)
MKDIRHIER
=
$(INPLACE_BIN)
/mkdirhier
GHC_CABAL_INPLACE
=
$(INPLACE_BIN)
/ghc-cabal
$(exeext)
GHC_PKG_INPLACE
=
$(INPLACE_BIN)
/ghc-pkg
$(exeext)
GENERATED_FILE
=
chmod
a-w
EXECUTABLE_FILE
=
chmod
+x
...
...
rts/ghc.mk
View file @
480ad036
...
...
@@ -73,8 +73,8 @@ rts_H_FILES += $(DTRACEPROBES_H)
endif
# collect the -l flags that we need to link the rts dyn lib.
rts/libs.depend
:
$
(GHC_PKG
_INPLACE)
"
$(
GHC_PKG
_INPLACE)
"
field rts extra-libraries
\
rts/libs.depend
:
$
$(ghc-pkg
_INPLACE)
"
$
(
ghc-pkg
_INPLACE)"
field rts extra-libraries
\
|
sed
-e
's/^extra-libraries: //'
-e
's/\([a-z0-9]*\)[ ]*/-l\1 /g'
>
$@
...
...
rules/build-package-data.mk
View file @
480ad036
...
...
@@ -99,16 +99,16 @@ $1/$2/build/autogen/cabal_macros.h : $1/$2/package-data.mk
# This rule configures the package, generates the package-data.mk file
# for our build system, and registers the package for use in-place in
# the build tree.
$1/$2/package-data.mk
:
$$
(GHC_CABAL
_INPLACE) $$($1_$2_GHC_PKG_DEP) $1/$$($1_PACKAGE).cabal $$(wildcard $1/configure) $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_CONFIG_DEP)
$1/$2/package-data.mk
:
$$
$$(ghc-cabal
_INPLACE) $$($1_$2_GHC_PKG_DEP) $1/$$($1_PACKAGE).cabal $$(wildcard $1/configure) $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_CONFIG_DEP)
# Checking packages built with the bootstrapping compiler would
# generally be a waste of time. Either we will rebuild them with
# stage1/stage2, or we don't really care about them.
ifneq
"$3" "0"
ifneq
"$$($1_NO_CHECK)" "YES"
"$$(
GHC_CABAL
_INPLACE)"
check
$1
"$$(
ghc-cabal
_INPLACE)"
check
$1
endif
endif
"$$(
GHC_CABAL
_INPLACE)"
configure
--with-ghc
=
"
$$
(
$1_$2_HC_CONFIG
)"
--with-ghc-pkg
=
"
$$
(
$1_$2_GHC_PKG
)"
$$
(
$1_CONFIGURE_OPTS
)
$$
(
$1_$2_CONFIGURE_OPTS
)
--
$2
$1
"$$(
ghc-cabal
_INPLACE)"
configure
--with-ghc
=
"
$$
(
$1_$2_HC_CONFIG
)"
--with-ghc-pkg
=
"
$$
(
$1_$2_GHC_PKG
)"
$$
(
$1_CONFIGURE_OPTS
)
$$
(
$1_$2_CONFIGURE_OPTS
)
--
$2
$1
ifeq
"$$($1_$2_PROG)" ""
ifneq
"$$($1_$2_REGISTER_PACKAGE)" "NO"
$$(call
cmd,$1_$2_GHC_PKG)
update
--force
$$($1_$2_GHC_PKG_OPTS)
$1/$2/inplace-pkg-config
...
...
rules/haddock.mk
View file @
480ad036
...
...
@@ -43,9 +43,9 @@ ifneq "$$(BINDIST)" "YES"
# We need the quadruple dollars for the dependencies, as it isn't
# guaranteed that we are processing the packages in dependency order,
# so we don't want to expand it yet.
$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE)
:
$$(INPLACE_BIN)/haddock$$(exeext) $$
(GHC_CABAL
_INPLACE) $$($1_$2_HS_SRCS) $$$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_DEPS) | $$$$(dir $$$$@)/.
$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE)
:
$$(INPLACE_BIN)/haddock$$(exeext) $$
$$(ghc-cabal
_INPLACE) $$($1_$2_HS_SRCS) $$$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_DEPS) | $$$$(dir $$$$@)/.
ifeq
"$$(HSCOLOUR_SRCS)" "YES"
"
$
$(
GHC_CABAL
_INPLACE)
"
hscolour
$2
$1
"
$$
(
ghc-cabal
_INPLACE)"
hscolour
$2
$1
endif
"
$
$(TOP)
/
$
$(INPLACE_BIN)
/haddock"
\
--odir
=
"
$1
/
$2
/doc/html/
$$
(
$1_PACKAGE
)"
\
...
...
rules/manual-package-config.mk
View file @
480ad036
...
...
@@ -15,7 +15,7 @@ define manual-package-config # args: $1 = dir
$(call
trace,
manual-package-config($1))
$(call
profStart,
manual-package-config($1))
$1/package.conf.inplace
:
$1/package.conf.in $$
(GHC_PKG
_INPLACE)
$1/package.conf.inplace
:
$1/package.conf.in $$
$$(ghc-pkg
_INPLACE)
$
$(CPP)
$
$(RAWCPP_FLAGS)
-P
\
-DTOP
=
'"$
$(TOP)
"'
\
$$
(
$1_PACKAGE_CPP_OPTS
)
\
...
...
@@ -23,7 +23,7 @@ $1/package.conf.inplace : $1/package.conf.in $$(GHC_PKG_INPLACE)
grep
-v
'^#pragma GCC'
$$
@.raw |
\
sed
-e
's/""//g'
-e
's/:[ ]*,/: /g'
>
$$
@
"$$(
GHC_PKG
_INPLACE)"
update
--force
$$@
"$$(
ghc-pkg
_INPLACE)"
update
--force
$$@
# This is actually a real file, but we need to recreate it on every
# "make install", so we declare it as phony
...
...
rules/package-config.mk
View file @
480ad036
...
...
@@ -43,8 +43,8 @@ else
$1_$2_HC_PKGCONF
=
$1_$2_HC_CONFIG
=
$
$(TOP)
/
$
$(GHC_STAGE1)
$1_$2_HC_CONFIG_DEP
=
$
$(GHC_STAGE1)
$1_$2_GHC_PKG
=
$
$(TOP)
/
$
$(
GHC_PKG
_INPLACE)
$1_$2_GHC_PKG_DEP
=
$
$
(GHC_PKG
_INPLACE)
$1_$2_GHC_PKG
=
$
$(TOP)
/
$$
(
ghc-pkg
_INPLACE
)
$1_$2_GHC_PKG_DEP
=
$$
$$
(
ghc-pkg
_INPLACE
)
$1_$2_GHC_PKG_OPTS
=
# If stage is not 0 then we always use stage1 for making .depend, as later
# stages aren't available early enough
...
...
utils/ghc-cabal/ghc.mk
View file @
480ad036
...
...
@@ -18,7 +18,9 @@ CABAL_DOTTED_VERSION := $(shell grep "^Version:" libraries/Cabal/Cabal/Cabal.cab
CABAL_VERSION
:=
$(
subst
.,
$(comma)
,
$(CABAL_DOTTED_VERSION)
)
CABAL_CONSTRAINT
:=
--constraint
=
"Cabal ==
$(CABAL_DOTTED_VERSION)
"
$(GHC_CABAL_INPLACE)
:
utils/ghc-cabal/dist/build/tmp/ghc-cabal$(exeext) | $$(dir $$@)/.
ghc-cabal_INPLACE
=
inplace/bin/ghc-cabal
$(exeext)
$(ghc-cabal_INPLACE)
:
utils/ghc-cabal/dist/build/tmp/ghc-cabal$(exeext) | $$(dir $$@)/.
"
$(CP)
"
$<
$@
utils/ghc-cabal/dist/build/tmp/ghc-cabal$(exeext)
:
$(wildcard libraries/Cabal/Cabal/Distribution/*/*/*.hs)
...
...
@@ -45,7 +47,7 @@ utils/ghc-cabal/dist/build/tmp/ghc-cabal$(exeext): utils/ghc-cabal/Main.hs $(TOU
$(eval
$(call
clean-target,utils/ghc-cabal,dist,\
utils/ghc-cabal/dist
bootstrapping))
$(eval
$(call
all-target,utils/ghc-cabal,$(
GHC_CABAL
_INPLACE)))
$(eval
$(call
all-target,utils/ghc-cabal,$(
ghc-cabal
_INPLACE)))
# -----------------------------------------------------------------------------
# Now make another copy that goes in bindists. This needs to be built
...
...
utils/ghc-pkg/ghc.mk
View file @
480ad036
...
...
@@ -47,7 +47,7 @@ utils/ghc-pkg_dist_INSTALL_INPLACE = YES
$(eval
$(call
build-prog,utils/ghc-pkg,dist,0))
$(
GHC_PKG
_INPLACE)
:
| $(INPLACE_PACKAGE_CONF)/.
$(
ghc-pkg
_INPLACE)
:
| $(INPLACE_PACKAGE_CONF)/.
utils/ghc-pkg/dist/package-data.mk
:
\
utils/ghc-pkg/dist/build/Version.hs
...
...
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