sort-paragraphs in runBuilderWith
authorBjörn Gohla <b.gohla@gmx.de>
Sat, 21 Sep 2019 13:13:30 +0000 (15:13 +0200)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Mon, 23 Sep 2019 21:53:23 +0000 (17:53 -0400)
hadrian/src/Builder.hs

index 1a4b9c9..587c62f 100644 (file)
@@ -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,