File: Makefile.am

package info (click to toggle)
suricata 1:4.1.2-2~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 43,224 kB
  • sloc: ansic: 361,324; python: 5,742; sh: 4,520; makefile: 1,052; perl: 867
file content (73 lines) | stat: -rw-r--r-- 1,232 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
EXTRA_DIST = 	Cargo.toml \
		src \
		.cargo/config.in \
		gen-c-headers.py

if HAVE_RUST

EXTRA_DIST +=	Cargo.lock

if HAVE_CARGO_VENDOR
EXTRA_DIST +=	vendor
endif

if HAVE_RUST_VENDOR
FROZEN = --frozen
endif

if !RUST_DEBUG
if !DEBUG
RELEASE = --release
endif
endif

if HAVE_LUA
RUST_FEATURES +=	lua
endif

if DEBUG
RUST_FEATURES +=	debug
endif

all-local:
if HAVE_PYTHON
	cd $(top_srcdir)/rust && $(HAVE_PYTHON) ./gen-c-headers.py
endif
	cd $(top_srcdir)/rust && \
		CARGO_HOME=$(CARGO_HOME) \
		CARGO_TARGET_DIR=$(abs_top_builddir)/rust/target \
		$(CARGO) build $(RELEASE) $(FROZEN) \
			--features "$(RUST_FEATURES)"

clean-local:
	-rm -rf target

distclean-local: clean-local
	rm -rf gen Cargo.lock

check:
	CARGO_HOME=$(CARGO_HOME) $(CARGO) test

Cargo.lock: Cargo.toml
	CARGO_HOME=$(CARGO_HOME) $(CARGO) generate-lockfile

if HAVE_CARGO_VENDOR
vendor:
	CARGO_HOME=$(CARGO_HOME) $(CARGO) vendor > /dev/null
else
vendor:
endif

# Can only include the headers if we have Python to generate them.
if HAVE_PYTHON
EXTRA_DIST +=	gen/c-headers
gen/c-headers:
	cd $(top_srcdir)/rust && $(HAVE_PYTHON) ./gen-c-headers.py
else
gen/c-headers:
endif
else # HAVE_RUST

all-local clean-local check vendor gen/c-headers:

endif # HAVE_RUST