Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
0ae70f98
Commit
0ae70f98
authored
Jun 23, 2011
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow Cabal reorganisation, and improve build system a little
parent
ab7c49bd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
19 deletions
+20
-19
boot
boot
+1
-0
ghc.mk
ghc.mk
+10
-13
ghc/ghc.mk
ghc/ghc.mk
+1
-0
rules/build-package.mk
rules/build-package.mk
+2
-0
utils/ghc-cabal/ghc.mk
utils/ghc-cabal/ghc.mk
+5
-5
utils/ghc-pkg/ghc.mk
utils/ghc-pkg/ghc.mk
+1
-1
No files found.
boot
View file @
0ae70f98
...
...
@@ -174,6 +174,7 @@ sub boot_pkgs {
or
die
"
Opening
$package
/ghc.mk failed: $!
";
print
GHCMK
"
${package}
_PACKAGE =
${pkg}
\n
";
print
GHCMK
"
${package}
_dist-install_GROUP = libraries
\n
";
print
GHCMK
"
\$
(if
\$
(filter
${dir}
,
\$
(STAGE0_PACKAGES)),
\$
(eval
\$
(call build-package,
${package}
,dist-boot,0)))
\n
";
print
GHCMK
"
\$
(eval
\$
(call build-package,
${package}
,dist-install,
\$
(if
\$
(filter
${dir}
,
\$
(STAGE2_PACKAGES)),2,1)))
\n
";
close
GHCMK
or
die
"
Closing
$package
/ghc.mk failed: $!
";
...
...
ghc.mk
View file @
0ae70f98
...
...
@@ -313,7 +313,7 @@ TH_PACKAGES := $(DPH_PACKAGES)
#
# We assume that the stage0 compiler has a suitable bytestring package,
# so we don't have to include it below.
STAGE0_PACKAGES
=
Cabal hpc extensible-exceptions binary bin-package-db hoopl
STAGE0_PACKAGES
=
Cabal
/cabal
hpc extensible-exceptions binary bin-package-db hoopl
# These packages are installed, but are installed hidden
# Why install them at all? Because the 'ghc' package depends on them
...
...
@@ -393,7 +393,7 @@ $(eval $(call addPackage,haskell2010))
$(eval
$(call
addPackage,hpc))
$(eval
$(call
addPackage,pretty))
$(eval
$(call
addPackage,template-haskell))
$(eval
$(call
addPackage,Cabal))
$(eval
$(call
addPackage,Cabal
/cabal
))
$(eval
$(call
addPackage,binary))
$(eval
$(call
addPackage,bin-package-db))
$(eval
$(call
addPackage,hoopl))
...
...
@@ -456,7 +456,10 @@ endif
# --------------------------------
# Misc package-related settings
BOOT_PKG_CONSTRAINTS
:=
$(
foreach
p,
$(STAGE0_PACKAGES)
,--constraint
"
$p
==
$(
shell
grep -i "
^Version:
" libraries/
$p
/
$p
.cabal | sed "
s/[^0-9.]//g
"
)
"
)
BOOT_PKG_CONSTRAINTS
:=
\
$(
foreach
d,
$(STAGE0_PACKAGES)
,
\
$(
foreach
p,
$(
basename
$(
notdir
$(
wildcard
libraries/
$d
/
*
.cabal
)))
,
\
--constraint
"
$p
==
$(
shell
grep -i "
^Version:
" libraries/
$d
/
$p
.cabal | sed "
s/[^0-9.]//g
"
)
"
))
# The actual .a and .so/.dll files: needed for dependencies.
ALL_STAGE1_LIBS
=
$(
foreach
lib,
$(PACKAGES)
,
$
(
libraries/
$(lib)
_dist-install_v_LIB
))
...
...
@@ -672,16 +675,6 @@ endif
$(eval
$(call
clean-target,$(BOOTSTRAPPING_CONF),,$(BOOTSTRAPPING_CONF)))
# These three libraries do not depend on each other, so we can build
# them straight off:
$(eval
$(call
build-package,libraries/hpc,dist-boot,0))
$(eval
$(call
build-package,libraries/extensible-exceptions,dist-boot,0))
$(eval
$(call
build-package,libraries/Cabal,dist-boot,0))
$(eval
$(call
build-package,libraries/binary,dist-boot,0))
$(eval
$(call
build-package,libraries/bin-package-db,dist-boot,0))
$(eval
$(call
build-package,libraries/hoopl,dist-boot,0))
# register the boot packages in strict sequence, because running
# multiple ghc-pkgs in parallel doesn't work (registrations may get
# lost).
...
...
@@ -689,7 +682,9 @@ fixed_pkg_prev=
$(foreach
pkg,$(STAGE0_PACKAGES),$(eval
$(call
fixed_pkg_dep,$(pkg),dist-boot)))
compiler/stage1/package-data.mk
:
$(fixed_pkg_prev)
endif
ifneq
"$(BINDIST)" "YES"
# Make sure we have all the GHCi libs by the time we've built
# ghc-stage2. DPH includes a bit of Template Haskell which needs the
# GHCI libs, and we don't have a better way to express that dependency.
...
...
@@ -1145,6 +1140,8 @@ clean_libraries:
# We have to define a clean target for each library manually, because the
# libraries/*/ghc.mk files are not included when we're cleaning.
ifeq
"$(CLEANING)" "YES"
$(foreach
lib,$(STAGE0_PACKAGES),\
$(eval
$(call
clean-target,libraries/$(lib),dist-boot,libraries/$(lib)/dist-boot)))
$(foreach
lib,$(PACKAGES)
$(PACKAGES_STAGE2),\
$(eval
$(call
clean-target,libraries/$(lib),dist-install,libraries/$(lib)/dist-install)))
endif
...
...
ghc/ghc.mk
View file @
0ae70f98
...
...
@@ -94,6 +94,7 @@ $(eval $(call build-prog,ghc,stage3,2))
ifneq
"$(BINDIST)" "YES"
ghc/stage1/build/tmp/$(ghc_stage1_PROG)
:
$(BOOT_LIBS)
ifeq
"$(GhcProfiled)" "YES"
ghc/stage2/build/tmp/$(ghc_stage2_PROG)
:
$(compiler_stage2_p_LIB)
ghc/stage2/build/tmp/$(ghc_stage2_PROG)
:
$(foreach lib
,
$(PACKAGES)
,
$(libraries/$(lib)_dist-install_p_LIB))
...
...
rules/build-package.mk
View file @
0ae70f98
...
...
@@ -132,7 +132,9 @@ check_$1: $$(GHC_CABAL_INPLACE)
$
$(GHC_CABAL_INPLACE)
check
$1
endif
ifneq
"$3" "0"
$(call
haddock,$1,$2)
endif
# Don't put bootstrapping packages in the bindist
ifneq
"$3" "0"
...
...
utils/ghc-cabal/ghc.mk
View file @
0ae70f98
...
...
@@ -14,16 +14,16 @@
# Euch, hideous hack:
# XXX This should be in a different Makefile
CABAL_DOTTED_VERSION
:=
$(
shell
grep
"^Version:"
libraries/Cabal/Cabal.cabal |
sed
"s/^Version: //"
)
CABAL_DOTTED_VERSION
:=
$(
shell
grep
"^Version:"
libraries/Cabal/
cabal/
Cabal.cabal |
sed
"s/^Version: //"
)
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) | $$(dir $$@)/.
"
$(CP)
"
$<
$@
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(wildcard libraries/Cabal/Distribution/*/*/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(wildcard libraries/Cabal/Distribution/*/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(wildcard libraries/Cabal/Distribution/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(wildcard libraries/Cabal/
cabal/
Distribution/*/*/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(wildcard libraries/Cabal/
cabal/
Distribution/*/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(wildcard libraries/Cabal/
cabal/
Distribution/*.hs)
$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext)
:
$(GHC_CABAL_DIR)/Main.hs | $$(dir $$@)/. bootstrapping/.
"
$(GHC)
"
$(SRC_HC_OPTS)
--make
$(GHC_CABAL_DIR)
/Main.hs
-o
$@
\
...
...
@@ -32,7 +32,7 @@ $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(GHC_CABAL_DIR)/Main.hs | $
-DCABAL_VERSION
=
$(CABAL_VERSION)
\
-odir
bootstrapping
\
-hidir
bootstrapping
\
-ilibraries
/Cabal
\
-ilibraries
/Cabal
/cabal
\
-ilibraries
/filepath
\
-ilibraries
/hpc
touch
$@
...
...
utils/ghc-pkg/ghc.mk
View file @
0ae70f98
...
...
@@ -58,7 +58,7 @@ utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main
-hidir
bootstrapping
\
-iutils
/ghc-pkg
\
-XCPP
-XExistentialQuantification
-XDeriveDataTypeable
\
-ilibraries
/Cabal
\
-ilibraries
/Cabal
/cabal
\
-ilibraries
/filepath
\
-ilibraries
/extensible-exceptions
\
-ilibraries
/hpc
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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