cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1434
Views
5
Helpful
3
Replies

how to edit Makefile for submodule yang?

kuiliu
Cisco Employee
Cisco Employee

The default MakeFile seems not compiling submodule yang file well, could anyone show me how to work with submodule yang in MakeFile?

1 Accepted Solution

Accepted Solutions

kuiliu
Cisco Employee
Cisco Employee

well, I think I figured out a way to work with submodule yang.

need to update Makefile to

1. change FXS that it only includes main module yang file names. (submodule yang file out not to be included here).

2. uncomment YANGPATH and set the value as

$(NCS_DIR)/src/ncs/yang/:./yang/

View solution in original post

3 Replies 3

camoberg
Cisco Employee
Cisco Employee

Could you provide some more details on what you are trying to achieve, and what you mean byt the "default Makefile"? An example would help.

Hi Carl,

I was working with NSO 4.6, and use "

ncs-make-package --service-skeleton java-and-template mpl3-vpn" to generate a package, there is a default Makefile generated by the command under mpls-l3vpn/src/ to make java and yang files, I tried to use the Makefile to compile yang files which are list below

KUILIU-M-31C5:yang kuiliu$ ls

bharti-common-types.yang

mpls-l3vpn-vpn.yang

mpls-l3vpn-link.yang

mpls-l3vpn.yang

the mpls-l3vpn.yang is a main module file

mpls-l3vpn-vpn.yang and mpls-l3vpn-link.yang are submodule files

By running command "make clean all"  and the error is

/Users/kuiliu/ncs-bin/./ncs-4.6/bin/ncsc  `ls bharti-common-types-ann.yang  > /dev/null 2>&1 && echo "-a bharti-common-types-ann.yang"` \

       -c -o ../load-dir/bharti-common-types.fxs yang/bharti-common-types.yang

/Users/kuiliu/ncs-bin/./ncs-4.6/bin/ncsc --java-disable-prefix --exclude-enums --fail-on-warnings --java-package com.tot.mplsl3vpn.namespaces --emit-java java/src/com/tot/mplsl3vpn/namespaces/bharti-common-types.java ../load-dir/bharti-common-types.fxs

/Users/kuiliu/ncs-bin/./ncs-4.6/bin/ncsc  `ls mpls-l3vpn-link-ann.yang  > /dev/null 2>&1 && echo "-a mpls-l3vpn-link-ann.yang"` \

       -c -o ../load-dir/mpls-l3vpn-link.fxs yang/mpls-l3vpn-link.yang

yang/mpls-l3vpn-link.yang:5: error: module 'mpls-l3vpn-vpn', revision '2017-07-19' not found

yang/mpls-l3vpn-link.yang:8: error: module 'bharti-common-types' not found

make: *** [../load-dir/mpls-l3vpn-link.fxs] Error 1

kuiliu
Cisco Employee
Cisco Employee

well, I think I figured out a way to work with submodule yang.

need to update Makefile to

1. change FXS that it only includes main module yang file names. (submodule yang file out not to be included here).

2. uncomment YANGPATH and set the value as

$(NCS_DIR)/src/ncs/yang/:./yang/