diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-02-28 10:50:20 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-14 05:26:11 -0400 |
commit | b989845e378081f0932a7fec528e68daeeaa14fb (patch) | |
tree | 9bb260a7c6f39346a0cdb93095c3bf1be4b572d8 | |
parent | c12a2ec5fe4e7f94d565c0e6398d1d79854db146 (diff) | |
download | haskell-b989845e378081f0932a7fec528e68daeeaa14fb.tar.gz |
Hadrian: fix absolute buildroot support (#17822)
Shake's "**" wildcard doesn't match absolute root. We must use "//" instead.
-rw-r--r-- | hadrian/src/Hadrian/Builder/Tar.hs | 6 | ||||
-rw-r--r-- | hadrian/src/Main.hs | 2 | ||||
-rw-r--r-- | hadrian/src/Rules/Generate.hs | 2 | ||||
-rw-r--r-- | hadrian/src/Settings/Builders/DeriveConstants.hs | 2 | ||||
-rw-r--r-- | hadrian/src/Settings/Builders/GenPrimopCode.hs | 36 |
5 files changed, 24 insertions, 24 deletions
diff --git a/hadrian/src/Hadrian/Builder/Tar.hs b/hadrian/src/Hadrian/Builder/Tar.hs index a576d83bf5..5b145a7127 100644 --- a/hadrian/src/Hadrian/Builder/Tar.hs +++ b/hadrian/src/Hadrian/Builder/Tar.hs @@ -28,9 +28,9 @@ instance NFData TarMode args :: (ShakeValue c, ShakeValue b) => TarMode -> Args c b args Create = mconcat [ arg "-c" - , output "**/*.gz" ? arg "--gzip" - , output "**/*.bz2" ? arg "--bzip2" - , output "**/*.xz" ? arg "--xz" + , output "//*.gz" ? arg "--gzip" + , output "//*.bz2" ? arg "--bzip2" + , output "//*.xz" ? arg "--xz" , arg "-f", arg =<< getOutput , getInputs ] args Extract = mconcat diff --git a/hadrian/src/Main.hs b/hadrian/src/Main.hs index 50a53afd94..5bd7101180 100644 --- a/hadrian/src/Main.hs +++ b/hadrian/src/Main.hs @@ -64,7 +64,7 @@ main = do -- Ignore access to autom4te.cache directories. -- They are managed externally by auto tools. - , "**/autom4te.cache/**" + , "//autom4te.cache/**" ] } diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs index 89642896a6..7106f0cb8b 100644 --- a/hadrian/src/Rules/Generate.hs +++ b/hadrian/src/Rules/Generate.hs @@ -98,7 +98,7 @@ generatePackageCode :: Context -> Rules () generatePackageCode context@(Context stage pkg _) = do root <- buildRootRules let dir = buildDir context - generated f = (root -/- dir -/- "**/*.hs") ?== f && not ("**/autogen/*" ?== f) + generated f = (root -/- dir -/- "**/*.hs") ?== f && not ("//autogen/*" ?== f) go gen file = generate file context gen generated ?> \file -> do let unpack = fromMaybe . error $ "No generator for " ++ file ++ "." diff --git a/hadrian/src/Settings/Builders/DeriveConstants.hs b/hadrian/src/Settings/Builders/DeriveConstants.hs index 0e7a1c1c11..a8fcf37d0b 100644 --- a/hadrian/src/Settings/Builders/DeriveConstants.hs +++ b/hadrian/src/Settings/Builders/DeriveConstants.hs @@ -24,7 +24,7 @@ deriveConstantsBuilderArgs = builder DeriveConstants ? do _ -> error $ "DeriveConstants: expected two outputs, got " ++ show outs mconcat [ mconcat $ flip fmap deriveConstantsPairs $ \(fileName, flag) -> - output ("**/" ++ fileName) ? arg flag + output ("//" ++ fileName) ? arg flag , arg "-o", arg outputFile , arg "--tmpdir", arg tempDir , arg "--gcc-program", arg =<< getBuilderPath (Cc CompileC Stage1) diff --git a/hadrian/src/Settings/Builders/GenPrimopCode.hs b/hadrian/src/Settings/Builders/GenPrimopCode.hs index f62cfde75f..e616ed3b43 100644 --- a/hadrian/src/Settings/Builders/GenPrimopCode.hs +++ b/hadrian/src/Settings/Builders/GenPrimopCode.hs @@ -4,21 +4,21 @@ import Settings.Builders.Common genPrimopCodeBuilderArgs :: Args genPrimopCodeBuilderArgs = builder GenPrimopCode ? mconcat - [ output "**/PrimopWrappers.hs" ? arg "--make-haskell-wrappers" - , output "**/Prim.hs" ? arg "--make-haskell-source" - , output "**/primop-data-decl.hs-incl" ? arg "--data-decl" - , output "**/primop-tag.hs-incl" ? arg "--primop-tag" - , output "**/primop-list.hs-incl" ? arg "--primop-list" - , output "**/primop-has-side-effects.hs-incl" ? arg "--has-side-effects" - , output "**/primop-out-of-line.hs-incl" ? arg "--out-of-line" - , output "**/primop-commutable.hs-incl" ? arg "--commutable" - , output "**/primop-code-size.hs-incl" ? arg "--code-size" - , output "**/primop-can-fail.hs-incl" ? arg "--can-fail" - , output "**/primop-strictness.hs-incl" ? arg "--strictness" - , output "**/primop-fixity.hs-incl" ? arg "--fixity" - , output "**/primop-primop-info.hs-incl" ? arg "--primop-primop-info" - , output "**/primop-vector-uniques.hs-incl" ? arg "--primop-vector-uniques" - , output "**/primop-vector-tys.hs-incl" ? arg "--primop-vector-tys" - , output "**/primop-vector-tys-exports.hs-incl" ? arg "--primop-vector-tys-exports" - , output "**/primop-vector-tycons.hs-incl" ? arg "--primop-vector-tycons" - , output "**/primop-usage.hs-incl" ? arg "--usage" ] + [ output "//PrimopWrappers.hs" ? arg "--make-haskell-wrappers" + , output "//Prim.hs" ? arg "--make-haskell-source" + , output "//primop-data-decl.hs-incl" ? arg "--data-decl" + , output "//primop-tag.hs-incl" ? arg "--primop-tag" + , output "//primop-list.hs-incl" ? arg "--primop-list" + , output "//primop-has-side-effects.hs-incl" ? arg "--has-side-effects" + , output "//primop-out-of-line.hs-incl" ? arg "--out-of-line" + , output "//primop-commutable.hs-incl" ? arg "--commutable" + , output "//primop-code-size.hs-incl" ? arg "--code-size" + , output "//primop-can-fail.hs-incl" ? arg "--can-fail" + , output "//primop-strictness.hs-incl" ? arg "--strictness" + , output "//primop-fixity.hs-incl" ? arg "--fixity" + , output "//primop-primop-info.hs-incl" ? arg "--primop-primop-info" + , output "//primop-vector-uniques.hs-incl" ? arg "--primop-vector-uniques" + , output "//primop-vector-tys.hs-incl" ? arg "--primop-vector-tys" + , output "//primop-vector-tys-exports.hs-incl" ? arg "--primop-vector-tys-exports" + , output "//primop-vector-tycons.hs-incl" ? arg "--primop-vector-tycons" + , output "//primop-usage.hs-incl" ? arg "--usage" ] |