diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2020-04-03 01:52:07 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-14 07:56:38 -0400 |
commit | b69cc8842aa7e2df52b92a9c9ad3b9d8dcf624ab (patch) | |
tree | 75f3d9372c05b9c4f8f9fb5d148ba1af301ecf58 /hadrian | |
parent | 074c1ccd3f8c3fcab117e336316173e8e869230a (diff) | |
download | haskell-b69cc8842aa7e2df52b92a9c9ad3b9d8dcf624ab.tar.gz |
hadrian: get rid of unnecessary levels of nesting in source-dist
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Builder.hs | 1 | ||||
-rw-r--r-- | hadrian/src/Rules/SourceDist.hs | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index 34027d7bbb..dc687e9ac5 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -285,6 +285,7 @@ instance H.Builder Builder where unit $ cmd [Cwd output] [path] buildArgs unit $ cmd [Cwd output] [path] buildArgs + Tar _ -> cmd buildOptions echo [path] buildArgs _ -> cmd echo [path] buildArgs -- TODO: Some builders are required only on certain platforms. For example, diff --git a/hadrian/src/Rules/SourceDist.hs b/hadrian/src/Rules/SourceDist.hs index b844c54c8a..6a01ab4602 100644 --- a/hadrian/src/Rules/SourceDist.hs +++ b/hadrian/src/Rules/SourceDist.hs @@ -23,12 +23,14 @@ sourceDistRules = do root -/- "source-dist" -/- "ghc-*-src.tar.xz" %> \fname -> do let tarName = takeFileName fname dropTarXz = dropExtension . dropExtension - treePath = root -/- "source-dist" -/- dropTarXz tarName + treeDir = dropTarXz tarName + treePath = root -/- "source-dist" -/- treeDir prepareTree treePath - runBuilder + runBuilderWithCmdOptions + [Cwd $ root -/- "source-dist"] (Tar Create) - ["cJf", fname, treePath] - ["cJf", fname] [treePath] + ["cJf", tarName, treeDir] + ["cJf", tarName] [treeDir] "GIT_COMMIT_ID" %> \fname -> writeFileChanged fname =<< setting ProjectGitCommitId "VERSION" %> \fname -> |