Commit 0ad3af27 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Print more diagnostic info.

parent 1e5c0952
......@@ -49,6 +49,7 @@ packageDataOracle :: Rules ()
packageDataOracle = do
pkgData <- newCache $ \file -> do
need [file]
putNormal $ "Parsing " ++ file ++ "..."
liftIO $ readConfigFile file
addOracle $ \(PackageDataKey (file, key)) -> M.lookup key <$> pkgData file
return ()
......
......@@ -18,6 +18,7 @@ data PackageData = Modules FilePath
| IncludeDirs FilePath
| Deps FilePath
| DepKeys FilePath
| Synopsis FilePath
instance ShowArgs PackageData where
showArgs packageData = do
......@@ -28,6 +29,7 @@ instance ShowArgs PackageData where
IncludeDirs file -> ("INCLUDE_DIRS", file, ".")
Deps file -> ("DEPS" , file, "" )
DepKeys file -> ("DEP_KEYS" , file, "" )
Synopsis file -> ("SYNOPSIS" , file, "" )
fullKey = replaceSeparators '_' $ takeDirectory file ++ "_" ++ key
res <- askOracle $ PackageDataKey (file, fullKey)
return $ words $ case res of
......
......@@ -5,14 +5,16 @@ import Package.Base
{- "/usr/bin/ar" q
libraries/deepseq/dist-install/build/libHSdeeps_FT5iVCELxOr62eHY0nbvnU.a
@libraries/deepseq/dist-install/build/libHSdeeps_FT5iVCELxOr62eHY0nbvnU.a.contents
@libraries/deepseq/dist-install/build/libHSdeeps_FT5iVCELxOr62eHY0nbvnU.a
.contents
-}
-- "$$(XARGS)" $$(XARGS_OPTS) "$$($1_$2_AR)" $$($1_$2_AR_OPTS) $$($1_$2_EXTRA_AR_ARGS) $$@ < $$@.contents
-- "$$(XARGS)" $$(XARGS_OPTS) "$$($1_$2_AR)" $$($1_$2_AR_OPTS)
-- $$($1_$2_EXTRA_AR_ARGS) $$@ < $$@.contents
-- AR_OPTS = $(SRC_AR_OPTS) $(WAY$(_way)_AR_OPTS) $(EXTRA_AR_OPTS)
buildPackageLibrary :: Package -> TodoItem -> Rules ()
buildPackageLibrary (Package _ path _) (stage, dist, _) =
buildPackageLibrary (Package name path _) (stage, dist, _) =
let buildDir = path </> dist </> "build"
pkgData = path </> dist </> "package-data.mk"
in
......@@ -22,5 +24,11 @@ buildPackageLibrary (Package _ path _) (stage, dist, _) =
depObjs <- pkgDepObjects path dist way
need depObjs
libObjs <- pkgLibObjects path dist stage way
liftIO $ removeFiles "" [out]
liftIO $ removeFiles "." [out]
terseRun Ar $ arArgs <+> out <+> libObjs
when (way == vanilla) $ do
synopsis <- unwords <$> arg (Synopsis pkgData)
putNormal $ "Successfully built library for package "
++ name ++ "."
putNormal $ "Synopsis: " ++ synopsis ++ "."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment