File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
export GHC0 ?= ghc-9.8.4
2
2
export CABAL0 ?= _stage0/bin/cabal
3
3
4
- STAGE = 1
5
- STAGE_DIR = _stage$(STAGE )
4
+ STAGE_DIR = $(abspath _$(STAGE ) )
6
5
7
6
CABAL_ARGS += --store-dir $(abspath $(STAGE_DIR ) /store)
8
7
CABAL_ARGS += --logs-dir $(abspath $(STAGE_DIR ) /logs)
@@ -24,21 +23,22 @@ $(CONFIGURE) : % : %.ac
24
23
25
24
$(CABAL0 ) :
26
25
mkdir -p $(@D )
27
- cabal install --project-dir libraries/Cabal --installdir $(abspath $(@D ) ) cabal-install:exe:cabal
26
+ cabal install --project-dir libraries/Cabal --installdir $(abspath $(@D ) ) --overwrite-policy=always cabal-install:exe:cabal
28
27
29
- STAGE1_EXES += ghc unlit
28
+ PROJECT_FILE = cabal.project. $( STAGE )
30
29
31
30
define STAGE_RULES
32
- STAGE $( STAGE ) _TARGETS += $(addprefix $(STAGE_DIR ) /bin/,$(STAGE $(STAGE ) _EXES ) )
33
-
34
- .PHONY: stage $(STAGE )
35
- stage $(STAGE ) : $$( STAGE $( STAGE ) _TARGETS )
36
-
37
- $$( STAGE $( STAGE ) _TARGETS ) &: $(CABAL0 ) $( CONFIGURE )
38
- $( CABAL0 ) $( CABAL_ARGS ) install --project-file cabal.project.stage $( STAGE ) --installdir $$( abspath $$( @D ) ) $( addprefix exe:, $( STAGE $( STAGE ) _EXES ) )
31
+ $( let EXES, $(addprefix $(STAGE_DIR ) /bin/,$($(STAGE ) _TARGETS) ) ,
32
+ .PHONY: $( STAGE )
33
+ $(STAGE ) _EXES = $( EXES )
34
+ $(STAGE ) : $( EXES )
35
+ $( EXES ) &: $( CABAL0 ) $( PROJECT_FILE ) $( CONFIGURE )
36
+ $( CABAL0 ) $( CABAL_ARGS ) install --project-file $( PROJECT_FILE ) --installdir $(STAGE_DIR ) /bin --overwrite-policy=always $( addprefix exe:, $( $( STAGE ) _TARGETS) ) \
37
+ )
39
38
endef
40
39
41
- STAGE = 1
40
+ STAGE = stage1
41
+ stage1_TARGETS = ghc ghc-toolchain-bin
42
42
$(eval $(STAGE_RULES))
43
43
44
44
clean :
You can’t perform that action at this time.
0 commit comments