[Git][ghc/ghc][master] hadrian: get rid of unnecessary levels of nesting in source-dist

Marge Bot gitlab at gitlab.haskell.org
Tue Apr 14 11:56:47 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
b69cc884 by Alp Mestanogullari at 2020-04-14T07:56:38-04:00
hadrian: get rid of unnecessary levels of nesting in source-dist

- - - - -


2 changed files:

- hadrian/src/Builder.hs
- hadrian/src/Rules/SourceDist.hs


Changes:

=====================================
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,


=====================================
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 ->



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b69cc8842aa7e2df52b92a9c9ad3b9d8dcf624ab

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b69cc8842aa7e2df52b92a9c9ad3b9d8dcf624ab
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200414/703d2f6f/attachment-0001.html>


More information about the ghc-commits mailing list