| ... |
... |
@@ -483,14 +483,11 @@ bindistRules = do |
|
483
|
483
|
, crossStageInterps
|
|
484
|
484
|
]
|
|
485
|
485
|
|
|
486
|
|
- -- Stage the autoreconf inputs (aclocal.m4 and the m4/ macro directory) next
|
|
487
|
|
- -- to each per-stage generated configure.ac under _build, then run
|
|
488
|
|
- -- 'autoreconf' to produce a per-stage 'configure' script there.
|
|
489
|
|
- --
|
|
490
|
|
- -- The 'Autoreconf' builder auto-needs <dir>/configure.ac (Builder.hs); we
|
|
491
|
|
- -- also explicitly need the staged macros so editing them triggers
|
|
492
|
|
- -- re-generation of 'configure'. BinaryDist.hs copies this configure into
|
|
493
|
|
- -- the bindist; it no longer runs autoreconf itself.
|
|
|
486
|
+ -- We can build two kinds of bindists: Regular Stage2 (including
|
|
|
487
|
+ -- cross-compilers) and fully cross-compiled Stage3. To avoid
|
|
|
488
|
+ -- race-conditions, stale files, etc. build the `configure` scripts as part
|
|
|
489
|
+ -- of the stage's _build files. This requires copying several files such that
|
|
|
490
|
+ -- they are available to the autoconf run.
|
|
494
|
491
|
forM_ [Stage1, Stage2] $ \stage -> do
|
|
495
|
492
|
let distribDir = root -/- stageString stage -/- "distrib"
|
|
496
|
493
|
|
| ... |
... |
@@ -498,9 +495,6 @@ bindistRules = do |
|
498
|
495
|
top <- topDirectory
|
|
499
|
496
|
copyFile (top -/- "aclocal.m4") out
|
|
500
|
497
|
|
|
501
|
|
- -- Autoconf auxiliary files required by autoreconf (config.sub,
|
|
502
|
|
- -- config.guess, install-sh). They live in-tree at the repo root and must
|
|
503
|
|
- -- be staged next to configure.ac for autoreconf to find them.
|
|
504
|
498
|
forM_ ["config.sub", "config.guess", "install-sh"] $ \f ->
|
|
505
|
499
|
distribDir -/- f %> \out -> do
|
|
506
|
500
|
top <- topDirectory
|