From 2778929466dafefd55a0673625f4520a234df986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gohla?= Date: Sat, 21 Sep 2019 15:13:30 +0200 Subject: sort-paragraphs in runBuilderWith --- hadrian/src/Builder.hs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'hadrian') diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index 1a4b9c9d49..587c62fa16 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -242,6 +242,7 @@ instance H.Builder Builder where Ar Unpack _ -> cmd echo [Cwd output] [path] buildArgs Autoreconf dir -> cmd echo [Cwd dir] ["sh", path] buildArgs + Configure dir -> do -- Inject /bin/bash into `libtool`, instead of /bin/sh, -- otherwise Windows breaks. TODO: Figure out why. @@ -249,7 +250,6 @@ instance H.Builder Builder where let env = AddEnv "CONFIG_SHELL" bash cmd echo env [Cwd dir] ["sh", path] buildOptions buildArgs - HsCpp -> captureStdout GenApply -> captureStdout GenPrimopCode -> do @@ -257,16 +257,6 @@ instance H.Builder Builder where Stdout stdout <- cmd (Stdin stdin) [path] buildArgs writeFileChanged output stdout - Make dir -> cmd echo path ["-C", dir] buildArgs - - Xelatex -> do - unit $ cmd [Cwd output] [path] buildArgs - unit $ cmd [Cwd output] [path] buildArgs - unit $ cmd [Cwd output] [path] buildArgs - unit $ cmd [Cwd output] ["makeindex"] (input -<.> "idx") - unit $ cmd [Cwd output] [path] buildArgs - unit $ cmd [Cwd output] [path] buildArgs - GhcPkg Copy _ -> do Stdout pkgDesc <- cmd [path] [ "--expand-pkgroot" @@ -280,9 +270,21 @@ instance H.Builder Builder where Exit _ <- cmd echo [path] (buildArgs ++ [input]) return () + HsCpp -> captureStdout + + Make dir -> cmd echo path ["-C", dir] buildArgs + Makeinfo -> do cmd echo [path] "--no-split" [ "-o", output] [input] + Xelatex -> do + unit $ cmd [Cwd output] [path] buildArgs + unit $ cmd [Cwd output] [path] buildArgs + unit $ cmd [Cwd output] [path] buildArgs + unit $ cmd [Cwd output] ["makeindex"] (input -<.> "idx") + unit $ cmd [Cwd output] [path] buildArgs + unit $ cmd [Cwd output] [path] buildArgs + _ -> cmd echo [path] buildArgs -- TODO: Some builders are required only on certain platforms. For example, -- cgit v1.2.1