Skip to content
GitLab
Menu
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
93605e1d
Commit
93605e1d
authored
Jan 22, 2016
by
joehillen
Browse files
Add build.stack.sh
parent
0bde9c13
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
93605e1d
...
...
@@ -4,3 +4,4 @@ cfg/system.config
cabal.sandbox.config
dist/
.cabal-sandbox/
.stack-work/
build.stack.sh
0 → 100755
View file @
93605e1d
#!/usr/bin/env bash
set
-euo
pipefail
# readlink on os x, doesn't support -f, to prevent the
# need of installing coreutils (e.g. through brew, just
# for readlink, we use the follownig substitute.
#
# source: http://stackoverflow.com/a/1116890
function
rl
{
TARGET_FILE
=
"
$1
"
cd
"
$(
dirname
"
$TARGET_FILE
"
)
"
TARGET_FILE
=
"
$(
basename
"
$TARGET_FILE
"
)
"
# Iterate down a (possible) chain of symlinks
while
[
-L
"
$TARGET_FILE
"
]
do
TARGET_FILE
=
"
$(
readlink
"
$TARGET_FILE
"
)
"
cd
"
$(
dirname
"
$TARGET_FILE
"
)
"
TARGET_FILE
=
"
$(
basename
"
$TARGET_FILE
"
)
"
done
# Compute the canonicalized name by finding the physical path
# for the directory we're in and appending the target file.
PHYS_DIR
=
"
$(
pwd
-P
)
"
RESULT
=
"
$PHYS_DIR
/
$TARGET_FILE
"
echo
"
$RESULT
"
}
absoltueRoot
=
"
$(
dirname
"
$(
rl
"
$0
"
)
"
)
"
cd
"
$absoltueRoot
"
stack build
--no-library-profiling
stack
exec
ghc-shake
--
\
--lint
\
--directory
"
$absoltueRoot
/.."
\
--colour
\
"
$@
"
stack.yaml
0 → 100644
View file @
93605e1d
# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver
:
lts-4.2
# Local packages, usually specified by relative directory name
packages
:
-
'
.'
# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps
:
[]
# Override default flag values for local packages and extra-deps
flags
:
{}
# Extra package databases containing global packages
extra-package-dbs
:
[]
# Control whether we use the GHC we find on the path
# system-ghc: false
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 1.0.0
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
Write
Preview
Supports
Markdown
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