summaryrefslogtreecommitdiffstats
path: root/yang/subdir.am
blob: eb17c38dbc01796ff02c4fdab4d87ea12e8345f9 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
SUFFIXES += .yang .yang.c .yin .yin.c
EXTRA_DIST += yang/embedmodel.py

.yang.yang.c:
	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/yang/embedmodel.py $^ $@
.yin.yin.c:
	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/yang/embedmodel.py $^ $@

# use .yang.c files like this:
#
# ripd_ripd_SOURCES = \
#	...
# nodist_ripd_ripd_SOURCES = \
#	yang/frr-ripd.yang.c \
#	# end
#
# Note that putting the .yang.c file into a static library.a will NOT work
# because the entire file is "optimized out" since it does not contain any
# global symbols :(.  Just put it in the daemon.  Dynamic libraries.so work
# without problems, as seen in libfrr.

dist_yangmodels_DATA += yang/frr-affinity-map.yang
dist_yangmodels_DATA += yang/frr-filter.yang
dist_yangmodels_DATA += yang/frr-module-translator.yang
dist_yangmodels_DATA += yang/frr-nexthop.yang
dist_yangmodels_DATA += yang/frr-test-module.yang
dist_yangmodels_DATA += yang/frr-if-rmap.yang
dist_yangmodels_DATA += yang/frr-interface.yang
dist_yangmodels_DATA += yang/frr-route-map.yang
dist_yangmodels_DATA += yang/frr-zebra-route-map.yang
dist_yangmodels_DATA += yang/frr-ospf-route-map.yang
dist_yangmodels_DATA += yang/frr-ospf6-route-map.yang
dist_yangmodels_DATA += yang/frr-bgp-filter.yang
dist_yangmodels_DATA += yang/frr-bgp-route-map.yang
dist_yangmodels_DATA += yang/frr-vrf.yang
dist_yangmodels_DATA += yang/frr-route-types.yang
dist_yangmodels_DATA += yang/frr-routing.yang
dist_yangmodels_DATA += yang/ietf/ietf-routing-types.yang
dist_yangmodels_DATA += yang/ietf/ietf-interfaces.yang
dist_yangmodels_DATA += yang/ietf/ietf-bgp-types.yang

if BFDD
dist_yangmodels_DATA += yang/frr-bfdd.yang
endif

if EIGRPD
dist_yangmodels_DATA += yang/frr-eigrpd.yang
endif

if RIPD
dist_yangmodels_DATA += yang/frr-ripd.yang
endif

if RIPNGD
dist_yangmodels_DATA += yang/frr-ripngd.yang
endif

if ISISD
dist_yangmodels_DATA += yang/frr-isisd.yang
endif

if VRRPD
dist_yangmodels_DATA += yang/frr-vrrpd.yang
endif

if STATICD
dist_yangmodels_DATA += yang/frr-staticd.yang
endif

if ZEBRA
dist_yangmodels_DATA += yang/frr-zebra.yang
endif

if PIMD
dist_yangmodels_DATA += yang/frr-gmp.yang
dist_yangmodels_DATA += yang/frr-pim.yang
dist_yangmodels_DATA += yang/frr-pim-rp.yang
endif

if BGPD
dist_yangmodels_DATA += yang/frr-bgp-common-structure.yang
dist_yangmodels_DATA += yang/frr-bgp-common.yang
dist_yangmodels_DATA += yang/frr-bgp-common-multiprotocol.yang
dist_yangmodels_DATA += yang/frr-bgp-neighbor.yang
dist_yangmodels_DATA += yang/frr-bgp-peer-group.yang
dist_yangmodels_DATA += yang/frr-deviations-bgp-datacenter.yang
dist_yangmodels_DATA += yang/frr-bgp-rpki.yang
dist_yangmodels_DATA += yang/frr-bgp-bmp.yang
dist_yangmodels_DATA += yang/frr-bgp-types.yang
dist_yangmodels_DATA += yang/frr-bgp.yang
endif

if OSPFD
dist_yangmodels_DATA += yang/frr-ospfd.yang
endif

if PATHD
dist_yangmodels_DATA += yang/frr-pathd.yang
endif

CLEANFILES += \
	yang/*.c \
	yang/ietf/*.c \
	yang/confd/*.c \
	#

if CONFD

SUBMODULES = $(shell cd $(top_srcdir); grep -l belongs-to $(dist_yangmodels_DATA))
EXCLUDED_MODULES = $(SUBMODULES) yang/frr-module-translator.yang
YANG_MODULES = $(filter-out $(EXCLUDED_MODULES),$(dist_yangmodels_DATA))

fxsdir = $(sysconfdir)/confd
fxs_DATA = $(YANG_MODULES:.yang=.fxs)

SUFFIXES += .fxs
CLEANFILES += $(fxs_DATA)

AM_V_CONFDC = $(AM_V_CONFDC_@AM_V@)
AM_V_CONFDC_ = $(AM_V_CONFDC_@AM_DEFAULT_V@)
AM_V_CONFDC_0 = @echo "  CONFDC  " $@;

CONFDC_FLAGS = --yangpath $(srcdir)/yang --yangpath $(srcdir)/yang/ietf

yang/%.fxs: yang/%.yang yang/confd/confd.%.yang
	$(AM_V_CONFDC)$(CONFDC) $(CONFDC_FLAGS) -c -o $@ -a $(srcdir)/yang/confd/confd.$*.yang -- $<

yang/%.fxs: yang/%.yang
	$(AM_V_CONFDC)$(CONFDC) $(CONFDC_FLAGS) -c -o $@ -- $<

endif