diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index 29a8973e61b96c8e119c235af40ec8d0f69246b8..0bfc021601963679cbf5269537b53d8927fedfd6 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -8,10 +8,7 @@ module Builder ( -- * Builder properties builderProvenance, systemBuilderPath, builderPath, isSpecified, needBuilders, runBuilder, runBuilderWith, runBuilderWithCmdOptions, getBuilderPath, - builderEnvironment, - - -- * Ad hoc builder invocation - applyPatch + builderEnvironment ) where import Control.Exception.Extra (Partial) @@ -177,7 +174,6 @@ data Builder = Alex | MergeObjects Stage -- ^ linker to be used to merge object files. | Nm | Objdump - | Patch | Python | Ranlib | Testsuite TestMode @@ -438,7 +434,6 @@ systemBuilderPath builder = case builder of Makeinfo -> fromKey "makeinfo" Nm -> fromKey "nm" Objdump -> fromKey "objdump" - Patch -> fromKey "patch" Python -> fromKey "python" Ranlib -> fromKey "ranlib" Testsuite _ -> fromKey "python" @@ -490,15 +485,6 @@ systemBuilderPath builder = case builder of isSpecified :: Builder -> Action Bool isSpecified = fmap (not . null) . systemBuilderPath --- | Apply a patch by executing the 'Patch' builder in a given directory. -applyPatch :: FilePath -> FilePath -> Action () -applyPatch dir patch = do - let file = dir -/- patch - needBuilders [Patch] - path <- builderPath Patch - putBuild $ "| Apply patch " ++ file - quietly $ cmd' [Cwd dir, FileStdin file] [path, "-p0"] - -- Note [cmd wrapper] -- ~~~~~~~~~~~~~~~~~~ -- `cmd'` is a wrapper for Shake's `cmd` that allows us to customize what is