mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 08:32:50 -06:00
Setup.hs: less verbose output during the compilation of the RGL
Only show the full gf command line if an error occurs.
This commit is contained in:
9
Setup.hs
9
Setup.hs
@@ -343,12 +343,15 @@ run_gfc :: PackageDescription -> LocalBuildInfo -> [String] -> IO ()
|
|||||||
run_gfc pkg lbi args =
|
run_gfc pkg lbi args =
|
||||||
do let args' = ["-batch","-gf-lib-path="++rgl_src_dir,"+RTS","-K32M","-RTS"] ++ filter (not . null) args
|
do let args' = ["-batch","-gf-lib-path="++rgl_src_dir,"+RTS","-K32M","-RTS"] ++ filter (not . null) args
|
||||||
gf = default_gf pkg lbi
|
gf = default_gf pkg lbi
|
||||||
putStrLn $ "Running: " ++ gf ++ " " ++ unwords (map showArg args')
|
gf_cmdline = gf ++ " " ++ unwords (map showArg args')
|
||||||
|
-- putStrLn $ "Running: " ++ gf_cmdline
|
||||||
e <- rawSystem gf args'
|
e <- rawSystem gf args'
|
||||||
case e of
|
case e of
|
||||||
ExitSuccess -> return ()
|
ExitSuccess -> return ()
|
||||||
ExitFailure i -> die $ "gf exited with exit code: " ++ show i
|
ExitFailure i -> do putStrLn $ "Ran: " ++ gf_cmdline
|
||||||
where showArg arg = "'" ++ arg ++ "'"
|
die $ "gf exited with exit code: " ++ show i
|
||||||
|
where
|
||||||
|
showArg arg = if ' ' `elem` arg then "'" ++ arg ++ "'" else arg
|
||||||
|
|
||||||
default_gf pkg lbi = buildDir lbi </> exeName' </> exeNameReal
|
default_gf pkg lbi = buildDir lbi </> exeName' </> exeNameReal
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user