Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Kaznacheev
GHC
Commits
2e3235c9
Commit
2e3235c9
authored
14 years ago
by
Ian Lynagh
Browse files
Options
Downloads
Patches
Plain Diff
Remove redundant libraries/cabal-bin.hs
parent
f297744c
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.darcs-boring
+0
-1
0 additions, 1 deletion
.darcs-boring
libraries/cabal-bin.hs
+0
-62
0 additions, 62 deletions
libraries/cabal-bin.hs
with
0 additions
and
63 deletions
.darcs-boring
+
0
−
1
View file @
2e3235c9
...
...
@@ -91,7 +91,6 @@
# Other library bits that get generated:
^libraries/bootstrapping/
^libraries/stamp/
^libraries/cabal-bin$
^libraries/ifBuildable(/|$)
^libraries/installPackage(/|$)
^libraries/index.html
...
...
This diff is collapsed.
Click to expand it.
libraries/cabal-bin.hs
deleted
100644 → 0
+
0
−
62
View file @
f297744c
module
Main
(
main
)
where
import
Control.Monad
import
Data.Maybe
import
Distribution.PackageDescription
import
Distribution.PackageDescription.Parse
import
Distribution.Simple
import
Distribution.Simple.Utils
import
Distribution.Verbosity
import
System.Directory
import
System.Environment
import
System.FilePath
import
qualified
Distribution.Make
as
Make
import
qualified
Distribution.Simple
as
Simple
setupProg
::
FilePath
setupProg
=
"./Setup"
main
::
IO
()
main
=
do
unprocessedArgs
<-
getArgs
let
verbosity
=
verbose
case
unprocessedArgs
of
ghc
:
packageConf
:
useCabalVersion
:
args
->
doit
verbosity
ghc
packageConf
useCabalVersion
args
_
->
die
"Bad args"
doit
::
Verbosity
->
FilePath
->
FilePath
->
String
->
[
String
]
->
IO
()
doit
verbosity
ghc
packageConf
useCabalVersion
args
=
do
exists
<-
doesFileExist
setupProg
if
exists
then
rawSystemExit
verbosity
setupProg
args
else
do
gpdFile
<-
defaultPackageDesc
verbosity
gpd
<-
readPackageDescription
verbosity
gpdFile
let
pd
=
packageDescription
gpd
case
buildType
pd
of
Just
Simple
->
Simple
.
defaultMainArgs
args
Just
Make
->
Make
.
defaultMainArgs
args
Just
Configure
->
defaultMainWithHooksArgs
autoconfUserHooks
args
_
|
packageName
pd
==
PackageName
"Cabal"
->
-- Cabal is special...*sigh*
Simple
.
defaultMainArgs
args
|
otherwise
->
runSetup
verbosity
ghc
packageConf
useCabalVersion
args
runSetup
::
Verbosity
->
FilePath
->
FilePath
->
String
->
[
String
]
->
IO
()
runSetup
verbosity
ghc
packageConf
useCabalVersion
args
=
do
-- Don't bother building Setup if we are cleaning. If we need to
-- build Setup in order to build, and Setup isn't built already,
-- then there shouldn't be anything to clean anyway.
unless
cleaning
$
rawSystemExit
verbosity
ghc
[
"-package-conf"
,
packageConf
,
"--make"
,
"Setup"
,
"-package"
,
"Cabal-"
++
useCabalVersion
,
"-o"
,
"Setup"
]
rawSystemExit
verbosity
"./Setup"
args
where
cleaning
=
case
args
of
"clean"
:
_
->
True
_
->
False
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment