diff options
Diffstat (limited to 'yang/subdir.am')
-rw-r--r-- | yang/subdir.am | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/yang/subdir.am b/yang/subdir.am index a2243fb8e..828ebd908 100644 --- a/yang/subdir.am +++ b/yang/subdir.am @@ -88,6 +88,10 @@ 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 @@ -97,3 +101,29 @@ CLEANFILES += \ 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 |