File: Makefile

package info (click to toggle)
ocamlbuild 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,832 kB
  • sloc: ml: 9,087; makefile: 521; sh: 187
file content (26 lines) | stat: -rw-r--r-- 697 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
OCAMLBUILD ?= ocamlbuild

all: stage2

setup:
	$(MAKE) -C .. clean
	$(MAKE) -C .. src/ocamlbuild_config.ml
	ln -sf ../src
	ln -sf ../bin
	ln -sf ../plugin-lib

stage1: setup
	@echo "BOOTSTRAP (1): building local ocamlbuild from '$(OCAMLBUILD)'"
	@$(OCAMLBUILD) -build-dir _build_stage1 bootstrap.otarget -no-plugin

stage2: stage1
	@echo "BOOTSTRAP (2): building local ocamlbuild from local ocamlbuild"
	@_build_stage1/bin/ocamlbuild.native -build-dir _build_stage2 bootstrap.otarget -no-plugin

clean:
	@$(OCAMLBUILD) -clean
	@$(OCAMLBUILD) -build-dir _build_stage1 -clean
	@$(OCAMLBUILD) -build-dir _build_stage2 -clean
	@rm -f src bin plugin-lib
	@rm -f dest/ocamlbuild_{stage1,stage2}.native