File: vsc.am

package info (click to toggle)
varnish 7.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 13,280 kB
  • sloc: ansic: 104,222; python: 2,679; makefile: 1,297; sh: 1,077; awk: 114; perl: 105; ruby: 41
file content (30 lines) | stat: -rw-r--r-- 802 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
## Generic rule to generate C code from VSC files. VSC files must be listed
## in the $(VSC_SRC) variable. The $(VSCTOOL) variable must point to the
## location of vsctool.py, normally set up by varnish.m4 at configure time.
## The resulting $(VSC_GEN) variable must be added to $(BUILT_SOURCES). The
## $(VSC_RST) variable references RST file names for manual pages includes.

VSC_GEN = $(VSC_SRC:.vsc=.c) $(VSC_SRC:.vsc=.h)

VSC_RST = $(VSC_SRC:.vsc=.rst)

_VSC_RST = $(VSC_SRC:.vsc=.rst_)

$(VSC_GEN) $(VSC_RST): $(VSCTOOL)

SUFFIXES = .vsc .c .h .rst

.vsc.c:
	$(AM_V_GEN) $(PYTHON) $(VSCTOOL) -c $<

.vsc.h:
	$(AM_V_GEN) $(PYTHON) $(VSCTOOL) -h $<

.vsc.rst:
	$(AM_V_GEN) $(PYTHON) $(VSCTOOL) -r $< >${@}_
	@mv ${@}_ $@

clean-local: vsc-clean

vsc-clean:
	rm -f $(VSC_GEN) $(VSC_RST) $(_VSC_RST)