From ee863e5dbd22bd58ecaae3dbdf93c61469cf3836 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Wed, 5 Jun 2019 17:53:08 +0200 Subject: [PATCH] YANG_INSTALLDIR fixes --- doc/FAQ.md | 2 +- example/hello/Makefile.in | 4 ++-- example/main/Makefile.in | 4 ++-- yang/Makefile.in | 2 -- yang/clixon/clixon-config@2019-06-05.yang | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/FAQ.md b/doc/FAQ.md index c052e9ae..37af03a0 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -305,7 +305,7 @@ The following configuration file options control the loading of Yang files: - `CLICON_YANG_MODULE_REVISION` : Specifies a revision to the main module. - `CLICON_YANG_MAIN_DIR` - Load all yang modules in this directory. -Note that the special `CLIXON_DATADIR`, by default `/usr/local/share/clixon` should be included in the yang dir path for Clixon system files to be found. +Note that the special `YANG_INSTALLDIR`, by default `/usr/local/share/clixon` should be included in the yang dir path for Clixon system files to be found. You can combine the options, however, if there are different variants of the same module, more specific options override less diff --git a/example/hello/Makefile.in b/example/hello/Makefile.in index 7ba400aa..f29d11ef 100644 --- a/example/hello/Makefile.in +++ b/example/hello/Makefile.in @@ -45,7 +45,7 @@ libdir = @exec_prefix@/lib APPNAME = hello # Here is where example yang appears -CLIXON_DATADIR = @CLIXON_DATADIR@ +YANG_INSTALLDIR = @YANG_INSTALLDIR@ # Install here if you want default clixon location: CLIXON_DEFAULT_CONFIG = @CLIXON_DEFAULT_CONFIG@ @@ -125,7 +125,7 @@ install: $(YANGSPECS) $(CLISPECS) $(PLUGINS) $(APPNAME).xml install -d -m 0755 $(DESTDIR)$(libdir)/$(APPNAME)/clispec install -m 0644 $(CLISPECS) $(DESTDIR)$(libdir)/$(APPNAME)/clispec install -d -m 0755 $(DESTDIR)$(datarootdir)/$(APPNAME)/yang - install -m 0644 $(YANGSPECS) $(DESTDIR)$(DESTDIR)$(CLIXON_DATADIR) + install -m 0644 $(YANGSPECS) $(DESTDIR)$(DESTDIR)$(YANG_INSTALLDIR) install -d -m 0755 $(DESTDIR)$(localstatedir)/$(APPNAME) # Uncomment for installing config file in /usr/local/etc instead diff --git a/example/main/Makefile.in b/example/main/Makefile.in index d0e502b5..363d460b 100644 --- a/example/main/Makefile.in +++ b/example/main/Makefile.in @@ -44,7 +44,7 @@ libdir = @exec_prefix@/lib APPNAME = example # Here is where example yang appears -CLIXON_DATADIR = @CLIXON_DATADIR@ +YANG_INSTALLDIR = @YANG_INSTALLDIR@ # Install here if you want default clixon location: CLIXON_DEFAULT_CONFIG = @CLIXON_DEFAULT_CONFIG@ @@ -129,7 +129,7 @@ install: $(YANGSPECS) $(CLISPECS) $(PLUGINS) $(APPNAME).xml install -m 0644 $(APPNAME).xml $(DESTDIR)$(sysconfdir) # install -m 0644 $(APPNAME).xml $(DESTDIR)$(CLIXON_DEFAULT_CONFIG) install -d -m 0755 $(DESTDIR)$(datarootdir)/$(APPNAME)/yang - install -m 0644 $(YANGSPECS) $(DESTDIR)$(DESTDIR)$(CLIXON_DATADIR) + install -m 0644 $(YANGSPECS) $(DESTDIR)$(DESTDIR)$(YANG_INSTALLDIR) install -d -m 0755 $(DESTDIR)$(libdir)/$(APPNAME)/cli install -m 0644 $(INSTALLFLAGS) $(CLI_PLUGIN) $(DESTDIR)$(libdir)/$(APPNAME)/cli install -d -m 0755 $(DESTDIR)$(libdir)/$(APPNAME)/backend diff --git a/yang/Makefile.in b/yang/Makefile.in index aa7ceb39..d9ee3301 100644 --- a/yang/Makefile.in +++ b/yang/Makefile.in @@ -39,8 +39,6 @@ includedir = @includedir@ datarootdir = @datarootdir@ enable_stdyangs = @enable_stdyangs@ -CLIXON_DATADIR = @CLIXON_DATADIR@ - SUBDIRS = clixon # See configure.ac ifeq ($(enable_stdyangs),yes) diff --git a/yang/clixon/clixon-config@2019-06-05.yang b/yang/clixon/clixon-config@2019-06-05.yang index 2e382e12..6a1112d8 100644 --- a/yang/clixon/clixon-config@2019-06-05.yang +++ b/yang/clixon/clixon-config@2019-06-05.yang @@ -205,7 +205,7 @@ module clixon-config { "Yang directory path for finding module and submodule files. A list of these options should be in the configuration. When loading a Yang module, Clixon searches this list in the order - they appear. Ensure that CLIXON_DATADIR(default + they appear. Ensure that YANG_INSTALLDIR(default /usr/local/share/clixon) is present in the path"; } leaf CLICON_YANG_MAIN_FILE {