fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.2 KiB85 linesraw
1ifdef VERBOSE
2Q :=
3BOOTSTRAP_ARGS := -v
4else
5Q := @
6BOOTSTRAP_ARGS :=
7endif
8
9# Pass `-jN` to the bootstrap if it is specified.
10ifdef MAKEFLAGS
11  ifneq (,$(findstring -j, $(MAKEFLAGS)))
12    BOOTSTRAP_ARGS += $(filter -j%, $(MAKEFLAGS))
13  endif
14endif
15
16BOOTSTRAP := $(CFG_PYTHON) $(CFG_SRC_DIR)src/bootstrap/bootstrap.py
17
18all:
19	$(Q)$(BOOTSTRAP) build --stage 2 $(BOOTSTRAP_ARGS)
20	$(Q)$(BOOTSTRAP) doc --stage 2 $(BOOTSTRAP_ARGS)
21
22help:
23	$(Q)echo 'Welcome to the rustbuild build system!'
24	$(Q)echo
25	$(Q)echo This makefile is a thin veneer over the ./x.py script located
26	$(Q)echo in this directory. To get the full power of the build system
27	$(Q)echo you can run x.py directly.
28	$(Q)echo
29	$(Q)echo To learn more run \`./x.py --help\`
30
31clean:
32	$(Q)$(BOOTSTRAP) clean $(BOOTSTRAP_ARGS)
33
34rustc-stage1:
35	$(Q)$(BOOTSTRAP) build --stage 1 library/test $(BOOTSTRAP_ARGS)
36rustc-stage2:
37	$(Q)$(BOOTSTRAP) build --stage 2 library/test $(BOOTSTRAP_ARGS)
38
39docs: doc
40doc:
41	$(Q)$(BOOTSTRAP) doc --stage 2 $(BOOTSTRAP_ARGS)
42nomicon:
43	$(Q)$(BOOTSTRAP) doc --stage 2 src/doc/nomicon $(BOOTSTRAP_ARGS)
44book:
45	$(Q)$(BOOTSTRAP) doc --stage 2 src/doc/book $(BOOTSTRAP_ARGS)
46standalone-docs:
47	$(Q)$(BOOTSTRAP) doc --stage 2 src/doc $(BOOTSTRAP_ARGS)
48check:
49	$(Q)$(BOOTSTRAP) test --stage 2 $(BOOTSTRAP_ARGS)
50check-aux:
51	$(Q)$(BOOTSTRAP) test --stage 2 \
52		src/tools/cargo \
53		src/tools/cargotest \
54		$(BOOTSTRAP_ARGS)
55dist:
56	$(Q)$(BOOTSTRAP) dist $(BOOTSTRAP_ARGS)
57distcheck:
58	$(Q)$(BOOTSTRAP) dist $(BOOTSTRAP_ARGS)
59	$(Q)$(BOOTSTRAP) test --stage 2 distcheck $(BOOTSTRAP_ARGS)
60install:
61	$(Q)$(BOOTSTRAP) install $(BOOTSTRAP_ARGS)
62tidy:
63	$(Q)$(BOOTSTRAP) test --stage 2 src/tools/tidy $(BOOTSTRAP_ARGS)
64prepare:
65	$(Q)$(BOOTSTRAP) build --stage 2 nonexistent/path/to/trigger/cargo/metadata
66
67## MSVC native builders
68
69# this intentionally doesn't use `$(BOOTSTRAP)` so we can test the shebang on Windows
70ci-msvc-py:
71	$(Q)$(CFG_SRC_DIR)/x.py test --stage 2 tidy
72ci-msvc-ps1:
73	$(Q)$(CFG_SRC_DIR)/x.ps1 test --stage 2 --skip tidy
74ci-msvc: ci-msvc-py ci-msvc-ps1
75
76## MingW native builders
77
78# test both x and bootstrap entrypoints
79ci-mingw-x:
80	$(Q)$(CFG_SRC_DIR)/x test --stage 2 tidy
81ci-mingw-bootstrap:
82	$(Q)$(BOOTSTRAP) test --stage 2 --skip tidy
83ci-mingw: ci-mingw-x ci-mingw-bootstrap
84
85.PHONY: dist