File: Makefile

package info (click to toggle)
pushpin 1.41.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,056 kB
  • sloc: cpp: 44,382; python: 1,305; sh: 139; makefile: 73; javascript: 34; php: 27
file content (44 lines) | stat: -rw-r--r-- 863 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# controlled leading whitespace, per the GNU make manual
nullstring :=
space := $(nullstring) # end of the line

ifdef RELEASE
cargo_flags = $(space)--offline --locked --release
endif

ifdef TOOLCHAIN
cargo_toolchain = $(space)+$(TOOLCHAIN)
endif

all: postbuild

build: FORCE
	cargo$(cargo_toolchain) build$(cargo_flags)

cargo-test: FORCE
	cargo$(cargo_toolchain) test$(cargo_flags) --all-features

cargo-clean: FORCE
	cargo clean

postbuild: build FORCE
	cd postbuild && $(MAKE) -f Makefile

postbuild-install: FORCE
	cd postbuild && $(MAKE) -f Makefile install

postbuild-clean: FORCE
	cd postbuild && $(MAKE) -f Makefile clean

postbuild-distclean: FORCE
	cd postbuild && [ ! -f Makefile ] || $(MAKE) -f Makefile distclean

check: cargo-test

install: postbuild-install

clean: cargo-clean postbuild-clean

distclean: cargo-clean postbuild-distclean

FORCE: