@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)
exitWith ExitSuccess
ShowSupportedLanguages -> do showSupportedLanguages
exitWith ExitSuccess
- ShowDocDir -> do showDocDir
- exitWith ExitSuccess
ShowVersion -> do showVersion
exitWith ExitSuccess
ShowNumVersion -> do putStrLn cProjectVersion
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
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