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
14d3b9c9
Commit
14d3b9c9
authored
Sep 19, 2007
by
Ian Lynagh
Browse files
Fix --print-docdir for relocatable builds; fixes
#1226
parent
e1038459
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/Makefile
View file @
14d3b9c9
...
...
@@ -272,6 +272,11 @@ endif
@
echo
"cUSER_WAY_OPTS =
\"
$(USER_WAY_OPTS)
\"
"
>>
$(CONFIG_HS)
@
echo
"cDEFAULT_TMPDIR =
\"
$(DEFAULT_TMPDIR)
\"
"
>>
$(CONFIG_HS)
@
echo
"cDocDir =
\"
$(docdir)
\"
"
>>
$(CONFIG_HS)
ifeq
"$(RelocatableBuild)" "YES"
@
echo
"cRelocatableBuild = True"
>>
$(CONFIG_HS)
else
@
echo
"cRelocatableBuild = False"
>>
$(CONFIG_HS)
endif
@
echo
done
.
CLEAN_FILES
+=
$(CONFIG_HS)
...
...
compiler/main/Main.hs
View file @
14d3b9c9
...
...
@@ -96,8 +96,6 @@ main =
exitWith
ExitSuccess
ShowSupportedLanguages
->
do
showSupportedLanguages
exitWith
ExitSuccess
ShowDocDir
->
do
showDocDir
exitWith
ExitSuccess
ShowVersion
->
do
showVersion
exitWith
ExitSuccess
ShowNumVersion
->
do
putStrLn
cProjectVersion
...
...
@@ -173,7 +171,7 @@ main =
ShowUsage
->
showGhcUsage
dflags
cli_mode
PrintLibdir
->
putStrLn
(
topDir
dflags
)
ShowSupportedLanguages
->
alreadyHandled
ShowDocDir
->
alreadyHandled
ShowDocDir
->
showDocDir
(
topDir
dflags
)
ShowVersion
->
alreadyHandled
ShowNumVersion
->
alreadyHandled
ShowInterface
f
->
doShowIface
dflags
f
...
...
@@ -477,10 +475,11 @@ showSupportedLanguages :: IO ()
showSupportedLanguages
=
do
mapM_
putStrLn
supportedLanguages
exitWith
ExitSuccess
showDocDir
::
IO
()
showDocDir
=
do
putStrLn
cDocDir
exitWith
ExitSuccess
showDocDir
::
FilePath
->
IO
()
showDocDir
topdir
=
putStrLn
docDir
where
docDir
=
if
cRelocatableBuild
then
topdir
++
"/doc"
else
cDocDir
showVersion
::
IO
()
showVersion
=
do
...
...
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