diff options
| author | Ruslan Babayev <ruslan@babayev.com> | 2021-10-17 22:03:46 -0700 | 
|---|---|---|
| committer | Ruslan Babayev <ruslan@babayev.com> | 2021-11-11 23:05:46 -0800 | 
| commit | 688c536fb3bd933f27324b68dfc756a0cccc9269 (patch) | |
| tree | fcd4cedbc662e285787bb2311888dad3313a08b5 /yang/subdir.am | |
| parent | fc3ebe1235821426f1456e85a50de577ab065590 (diff) | |
yang: confd: compile yang modules to fxs
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
Diffstat (limited to 'yang/subdir.am')
| -rw-r--r-- | yang/subdir.am | 26 | 
1 files changed, 26 insertions, 0 deletions
diff --git a/yang/subdir.am b/yang/subdir.am index a2243fb8e4..0f2bb00278 100644 --- a/yang/subdir.am +++ b/yang/subdir.am @@ -97,3 +97,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  | 
