| 1 |
OCAMLBUILD ?= ocamlbuild |
| 2 |
|
| 3 |
all: stage2 |
| 4 |
|
| 5 |
setup: |
| 6 |
$(MAKE) -C .. clean |
| 7 |
$(MAKE) -C .. src/ocamlbuild_config.ml |
| 8 |
ln -sf ../src |
| 9 |
ln -sf ../bin |
| 10 |
ln -sf ../plugin-lib |
| 11 |
|
| 12 |
stage1: setup |
| 13 |
@echo "BOOTSTRAP (1): building local ocamlbuild from '$(OCAMLBUILD)'" |
| 14 |
@$(OCAMLBUILD) -build-dir _build_stage1 bootstrap.otarget -no-plugin |
| 15 |
|
| 16 |
stage2: stage1 |
| 17 |
@echo "BOOTSTRAP (2): building local ocamlbuild from local ocamlbuild" |
| 18 |
@_build_stage1/bin/ocamlbuild.native -build-dir _build_stage2 bootstrap.otarget -no-plugin |
| 19 |
|
| 20 |
clean: |
| 21 |
@$(OCAMLBUILD) -clean |
| 22 |
@$(OCAMLBUILD) -build-dir _build_stage1 -clean |
| 23 |
@$(OCAMLBUILD) -build-dir _build_stage2 -clean |
| 24 |
@rm -f src bin plugin-lib |
| 25 |
@rm -f dest/ocamlbuild_{stage1,stage2}.native |
| 26 |
|