From 9776ee864f5e567cfe3ad3fc6de1c1436604b7ef Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sun, 22 Jul 2018 18:33:13 +0200 Subject: [PATCH] * Makefile change: Removed the make include file: clixon.mk and clixon.mk.in * These generated the Makefile variables: clixon_DBSPECDIR, clixon_SYSCONFDIR, clixon_LOCALSTATEDIR, clixon_LIBDIR, clixon_DATADIR which have been replaced by generic autoconf variables instead. --- CHANGELOG.md | 3 + Makefile.in | 12 +-- clixon.mk.cpp | 46 ----------- configure | 8 +- configure.ac | 7 +- datastore/Makefile.in | 7 +- datastore/keyvalue/Makefile.in | 1 - datastore/text/Makefile.in | 2 - example/Makefile.in | 49 ++++++------ include/clixon_config.h.in~ | 142 --------------------------------- include/clixon_config.h~ | 134 ------------------------------- lib/src/clixon_yang.c | 2 +- test/test_auth_ext.sh | 2 +- test/test_datastore.sh | 2 +- test/test_install.sh | 3 - yang/Makefile.in | 15 ++-- 16 files changed, 51 insertions(+), 384 deletions(-) delete mode 100644 clixon.mk.cpp delete mode 100644 include/clixon_config.h.in~ delete mode 100644 include/clixon_config.h~ diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c8ac7d..ff9c8650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,9 @@ translate { * xpath_each() is removed * The old API can be enabled by setting COMPAT_XSL in include/clixon_custom.h and recompile. +* Makefile change: Removed the make include file: clixon.mk and clixon.mk.in + * These generated the Makefile variables: clixon_DBSPECDIR, clixon_SYSCONFDIR, clixon_LOCALSTATEDIR, clixon_LIBDIR, clixon_DATADIR which have been replaced by generic autoconf variables instead. + * Removed cli callback vector functions. Set COMPAT_CLIV if you need to keep these functions in include/clixon_custom.h. * Replace functions as follows in CLI SPEC files: * cli_setv --> cli_set diff --git a/Makefile.in b/Makefile.in index 9c914381..84368869 100644 --- a/Makefile.in +++ b/Makefile.in @@ -56,7 +56,7 @@ SUBDIRS = lib apps include etc datastore util yang .PHONY: doc all clean depend $(SUBDIRS) install loc TAGS .config.status docker -all: $(SUBDIRS) clixon.mk +all: $(SUBDIRS) $(SUBDIRS): (cd $@ && $(MAKE) $(MFLAGS) all) @@ -65,12 +65,7 @@ depend: for i in $(SUBDIRS) doc example docker; \ do (cd $$i && $(MAKE) $(MFLAGS) depend); done -clixon.mk: clixon.mk.cpp - $(CPP) -P -traditional-cpp -x assembler-with-cpp -Dprefix=$(prefix) -Dlocalstatedir=$(localstatedir) -Dsysconfdir=$(sysconfdir) -Ddatadir=$(datadir) -Dlibdir=$(libdir) $< > $@ - -install: clixon.mk - install -d -m 0755 $(DESTDIR)$(datadir)/clixon - install -m 0644 clixon.mk $(DESTDIR)$(datadir)/clixon +install: for i in $(SUBDIRS) doc; \ do (cd $$i; $(MAKE) $(MFLAGS) $@)||exit 1; done; \ echo "Install for compilation by: make install-include" @@ -83,7 +78,6 @@ install-include: uninstall: for i in $(SUBDIRS) doc example docker; \ do (cd $$i && $(MAKE) $(MFLAGS) $@)||exit 1; done; - rm -f $(DESTDIR)$(datadir)/clixon/clixon.mk doc: cd $@; $(MAKE) $(MFLAGS) $@ @@ -100,7 +94,7 @@ clean: distclean: rm -f Makefile TAGS config.status config.log *~ .depend - rm -rf autom4te.cache clixon.mk build-root/rpmbuild + rm -rf autom4te.cache build-root/rpmbuild rm -f build-root/*.tar.xz build-root/*.rpm extras/rpm/Makefile for i in $(SUBDIRS) doc example docker; \ do (cd $$i && $(MAKE) $(MFLAGS) $@); done diff --git a/clixon.mk.cpp b/clixon.mk.cpp deleted file mode 100644 index 2f27c669..00000000 --- a/clixon.mk.cpp +++ /dev/null @@ -1,46 +0,0 @@ -# -# ***** BEGIN LICENSE BLOCK ***** -# -# Copyright (C) 2009-2018 Olof Hagsand and Benny Holmgren -# -# This file is part of CLIXON -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Alternatively, the contents of this file may be used under the terms of -# the GNU General Public License Version 3 or later (the "GPL"), -# in which case the provisions of the GPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of the GPL, and not to allow others to -# use your version of this file under the terms of Apache License version 2, -# indicate your decision by deleting the provisions above and replace them with -# the notice and other provisions required by the GPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the Apache License version 2 or the GPL. -# -# ***** END LICENSE BLOCK ***** -# - -# -# Include this file in your application Makefile using eg: -# -include $(datarootdir)/clixon/clixon.mk -# then you can use the DIRS below in your install rules. -# You also get rules for the application configure file. -# NOTE: APPNAME must be defined in the local Makefile - -clixon_DBSPECDIR=prefix/share/$(APPNAME) -clixon_SYSCONFDIR=sysconfdir -clixon_LOCALSTATEDIR=localstatedir/$(APPNAME) -clixon_LIBDIR=libdir/$(APPNAME) -clixon_DATADIR=datadir/clixon # for system yang files - diff --git a/configure b/configure index 6ee0a7d2..a6e6a366 100755 --- a/configure +++ b/configure @@ -621,6 +621,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +CLIXON_DATADIR EGREP GREP LEXLIB @@ -4308,11 +4309,12 @@ fi done -# This is to find clixon system files in the source code. -# same as clixon_DATADIR defined in clixon.mk.cpp for Makefiles +# This is to find clixon system files in the source code and Makefile + +CLIXON_DATADIR="${prefix}/share/clixon" cat >>confdefs.h <<_ACEOF -#define CLIXON_DATADIR "${prefix}/share/clixon" +#define CLIXON_DATADIR "${CLIXON_DATADIR}" _ACEOF diff --git a/configure.ac b/configure.ac index 46c5fd07..964141c1 100644 --- a/configure.ac +++ b/configure.ac @@ -178,9 +178,10 @@ AC_CHECK_LIB(dl, dlopen) AC_CHECK_FUNCS(inet_aton sigaction sigvec strlcpy strsep strndup alphasort versionsort strverscmp) -# This is to find clixon system files in the source code. -# same as clixon_DATADIR defined in clixon.mk.cpp for Makefiles -AC_DEFINE_UNQUOTED(CLIXON_DATADIR, "${prefix}/share/clixon", [Clixon data dir for system yang files etc]) +# This is to find clixon system files in the source code and Makefile +AC_SUBST(CLIXON_DATADIR) +CLIXON_DATADIR="${prefix}/share/clixon" +AC_DEFINE_UNQUOTED(CLIXON_DATADIR, "${CLIXON_DATADIR}", [Clixon data dir for system yang files etc]) # Default location for config file AC_DEFINE_UNQUOTED(CLIXON_DEFAULT_CONFIG,"${DEFAULT_CONFIG}",[Location for apps to find default config file]) diff --git a/datastore/Makefile.in b/datastore/Makefile.in index 16beab79..98bc8a0e 100644 --- a/datastore/Makefile.in +++ b/datastore/Makefile.in @@ -78,8 +78,6 @@ APPL = datastore_client all: $(SUBDIRS) $(APPL) --include $(DESTDIR)$(datarootdir)/clixon/clixon.mk - .SUFFIXES: .SUFFIXES: .c .o @@ -101,14 +99,11 @@ install-include: for i in $(SUBDIRS); \ do (cd $$i ; $(MAKE) $(MFLAGS) $@)||exit 1; done; -install: $(APPL) - install -d -m 0755 $(DESTDIR)$(bindir) - install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(bindir) +install: for i in $(SUBDIRS); \ do (cd $$i && $(MAKE) $(MFLAGS) $@)||exit 1; done uninstall: - rm -f $(DESTDIR)$(bindir)/$(APPL) for i in $(SUBDIRS); \ do (cd $$i && $(MAKE) $(MFLAGS) $@)||exit 1; done diff --git a/datastore/keyvalue/Makefile.in b/datastore/keyvalue/Makefile.in index 19aa6fe6..08fc997f 100644 --- a/datastore/keyvalue/Makefile.in +++ b/datastore/keyvalue/Makefile.in @@ -63,7 +63,6 @@ OBJS = $(SRC:.c=.o) all: $(PLUGIN) --include $(DESTDIR)$(datarootdir)/clixon/clixon.mk $(PLUGIN): $(SRC) $(CC) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) $(LDFLAGS) -shared -o $@ -lc $^ $(LIBS) diff --git a/datastore/text/Makefile.in b/datastore/text/Makefile.in index cdc2adb5..23c2a7bf 100644 --- a/datastore/text/Makefile.in +++ b/datastore/text/Makefile.in @@ -63,8 +63,6 @@ OBJS = $(SRC:.c=.o) all: $(PLUGIN) --include $(DESTDIR)$(datarootdir)/clixon/clixon.mk - $(PLUGIN): $(SRC) ifeq ($(HOST_VENDOR),apple) $(CC) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) $(LDFLAGS) -shared -undefined dynamic_lookup -o $@ -lc $^ $(LIBS) diff --git a/example/Makefile.in b/example/Makefile.in index ce86c28b..c95ff1de 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -37,8 +37,13 @@ prefix = @prefix@ bindir = @bindir@ includedir = @includedir@ datarootdir = @datarootdir@ +sysconfdir = @sysconfdir@ +datarootdir = @datarootdir@ +localstatedir = @localstatedir@ +libdir = @exec_prefix@/lib APPNAME = example + CC = @CC@ CFLAGS = @CFLAGS@ -rdynamic -fPIC INSTALLFLAGS = @INSTALLFLAGS@ @@ -60,9 +65,6 @@ PLUGINS = $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $(RESTCONF_ all: $(PLUGINS) -# Note: clixon.mk has rules for clixon_DBSPECDIR, clixon_SYSCONFDIR, etc used below --include $(DESTDIR)$(datarootdir)/clixon/clixon.mk - CLISPECS = $(APPNAME)_cli.cli YANGSPECS = $(APPNAME).yang @@ -116,21 +118,21 @@ distclean: clean rm -f Makefile *~ .depend install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $(RESTCONF_PLUGIN) $(APPNAME).xml - install -d -m 0755 $(DESTDIR)$(clixon_SYSCONFDIR) - install -m 0644 $(APPNAME).xml $(DESTDIR)$(clixon_SYSCONFDIR) - install -d -m 0755 $(DESTDIR)$(clixon_DBSPECDIR)/yang - install -m 0644 $(YANGSPECS) $(DESTDIR)$(clixon_DBSPECDIR)/yang - install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/cli - install -m 0644 $(INSTALLFLAGS) $(CLI_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/cli - install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/backend - install -m 0644 $(INSTALLFLAGS) $(BE_PLUGIN) $(BE2_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/backend - install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/netconf - install -m 0644 $(INSTALLFLAGS) $(NETCONF_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/netconf - install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/restconf - install -m 0644 $(INSTALLFLAGS) $(RESTCONF_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/restconf - install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/clispec - install -m 0644 $(CLISPECS) $(DESTDIR)$(clixon_LIBDIR)/clispec - install -d -m 0755 $(DESTDIR)$(clixon_LOCALSTATEDIR) + install -d -m 0755 $(DESTDIR)$(sysconfdir) + install -m 0644 $(APPNAME).xml $(DESTDIR)$(sysconfdir) + install -d -m 0755 $(DESTDIR)$(datarootdir)/$(APPNAME)/yang + install -m 0644 $(YANGSPECS) $(DESTDIR)$(datarootdir)/$(APPNAME)/yang + 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 + install -m 0644 $(INSTALLFLAGS) $(BE_PLUGIN) $(BE2_PLUGIN) $(DESTDIR)$(libdir)/$(APPNAME)/backend + install -d -m 0755 $(DESTDIR)$(libdir)/$(APPNAME)/netconf + install -m 0644 $(INSTALLFLAGS) $(NETCONF_PLUGIN) $(DESTDIR)$(libdir)/$(APPNAME)/netconf + install -d -m 0755 $(DESTDIR)$(libdir)/$(APPNAME)/restconf + install -m 0644 $(INSTALLFLAGS) $(RESTCONF_PLUGIN) $(DESTDIR)$(libdir)/$(APPNAME)/restconf + install -d -m 0755 $(DESTDIR)$(libdir)/$(APPNAME)/clispec + install -m 0644 $(CLISPECS) $(DESTDIR)$(libdir)/$(APPNAME)/clispec + install -d -m 0755 $(DESTDIR)$(localstatedir)/$(APPNAME) docker: sudo docker build -t $(IMAGE) . @@ -138,12 +140,13 @@ docker: push: sudo docker push $(IMAGE) - uninstall: - rm -rf $(DESTDIR)$(clixon_SYSCONFDIR)/$(APPNAME).xml - rm -rf $(DESTDIR)$(clixon_DBSPECDIR) - rm -rf $(DESTDIR)$(clixon_LOCALSTATEDIR) - rm -rf $(DESTDIR)$(clixon_LIBDIR) + echo "libdir:$(libdir)" + echo "libdir2:$(libdir2)" + rm -rf $(DESTDIR)$(sysconfdir)/$(APPNAME).xml + rm -rf $(DESTDIR)$(datarootdir)/$(APPNAME) + rm -rf $(DESTDIR)$(localstatedir)/$(APPNAME) + rm -rf $(DESTDIR)$(libdir)/$(APPNAME) install-include: diff --git a/include/clixon_config.h.in~ b/include/clixon_config.h.in~ deleted file mode 100644 index d356c165..00000000 --- a/include/clixon_config.h.in~ +++ /dev/null @@ -1,142 +0,0 @@ -/* include/clixon_config.h.in. Generated from configure.ac by autoheader. */ - -/* Clixon data dir for system yang files etc */ -#undef CLIXON_DATADIR - -/* Location for apps to find default config file */ -#undef CLIXON_DEFAULT_CONFIG - -/* Clixon major release */ -#undef CLIXON_VERSION_MAJOR - -/* Clixon minor release */ -#undef CLIXON_VERSION_MINOR - -/* Clixon path version */ -#undef CLIXON_VERSION_PATCH - -/* Clixon version string */ -#undef CLIXON_VERSION_STRING - -/* Define to 1 if you have the `alphasort' function. */ -#undef HAVE_ALPHASORT - -/* Define to 1 if you have the header file. */ -#undef HAVE_CLIGEN_CLIGEN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_CRYPT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_DEPOT_H - -/* Define to 1 if you have the `inet_aton' function. */ -#undef HAVE_INET_ATON - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `cligen' library (-lcligen). */ -#undef HAVE_LIBCLIGEN - -/* Define to 1 if you have the `crypt' library (-lcrypt). */ -#undef HAVE_LIBCRYPT - -/* Define to 1 if you have the `dl' library (-ldl). */ -#undef HAVE_LIBDL - -/* Define to 1 if you have the `fcgi' library (-lfcgi). */ -#undef HAVE_LIBFCGI - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define to 1 if you have the `qdbm' library (-lqdbm). */ -#undef HAVE_LIBQDBM - -/* Define to 1 if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_IF_VLAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_QDBM_DEPOT_H - -/* Define to 1 if you have the `sigaction' function. */ -#undef HAVE_SIGACTION - -/* Define to 1 if you have the `sigvec' function. */ -#undef HAVE_SIGVEC - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strndup' function. */ -#undef HAVE_STRNDUP - -/* Define to 1 if you have the `strsep' function. */ -#undef HAVE_STRSEP - -/* Define to 1 if you have the `strverscmp' function. */ -#undef HAVE_STRVERSCMP - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UCRED_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `versionsort' function. */ -#undef HAVE_VERSIONSORT - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#undef YYTEXT_POINTER - -#include diff --git a/include/clixon_config.h~ b/include/clixon_config.h~ deleted file mode 100644 index 5be37864..00000000 --- a/include/clixon_config.h~ +++ /dev/null @@ -1,134 +0,0 @@ -/* include/clixon_config.h. Generated from clixon_config.h.in by configure. */ -/* include/clixon_config.h.in. Generated from configure.ac by autoheader. */ - -/* Clixon major release */ -#define CLIXON_VERSION_MAJOR 3 - -/* Clixon minor release */ -#define CLIXON_VERSION_MINOR 3 - -/* Clixon path version */ -#define CLIXON_VERSION_PATCH 2 - -/* Clixon version string */ -#define CLIXON_VERSION_STRING "3.3.2" - -/* Define to 1 if you have the `alphasort' function. */ -#define HAVE_ALPHASORT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CLIGEN_CLIGEN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CRYPT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DEPOT_H */ - -/* Define to 1 if you have the `inet_aton' function. */ -#define HAVE_INET_ATON 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `crypt' library (-lcrypt). */ -#define HAVE_LIBCRYPT 1 - -/* Define to 1 if you have the `dl' library (-ldl). */ -#define HAVE_LIBDL 1 - -/* Define to 1 if you have the `fcgi' library (-lfcgi). */ -#define HAVE_LIBFCGI 1 - -/* Define to 1 if you have the `m' library (-lm). */ -#define HAVE_LIBM 1 - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#define HAVE_LIBNSL 1 - -/* Define to 1 if you have the `qdbm' library (-lqdbm). */ -#define HAVE_LIBQDBM 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LINUX_IF_VLAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_QDBM_DEPOT_H 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigvec' function. */ -#define HAVE_SIGVEC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strndup' function. */ -#define HAVE_STRNDUP 1 - -/* Define to 1 if you have the `strsep' function. */ -#define HAVE_STRSEP 1 - -/* Define to 1 if you have the `strverscmp' function. */ -#define HAVE_STRVERSCMP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UCRED_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `versionsort' function. */ -#define HAVE_VERSIONSORT 1 - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -#include diff --git a/lib/src/clixon_yang.c b/lib/src/clixon_yang.c index 7008ae71..afdedbc1 100644 --- a/lib/src/clixon_yang.c +++ b/lib/src/clixon_yang.c @@ -1835,7 +1835,7 @@ yang_parse_recurse(const char *yang_dir, if ((nr = yang_parse_find_match(yang_dir, module, fbuf)) < 0) goto done; if (nr == 0){ - clicon_err(OE_YANG, errno, "No matching %s yang files found (expected module name or absolute filename)", module); + clicon_err(OE_YANG, errno, "No matching %s yang files found in %s (expected module name or absolute filename)", module, yang_dir); goto done; } } diff --git a/test/test_auth_ext.sh b/test/test_auth_ext.sh index c53dcf55..c1806891 100755 --- a/test/test_auth_ext.sh +++ b/test/test_auth_ext.sh @@ -16,7 +16,7 @@ nacmfile=$dir/nacmfile cat < $cfg $cfg - /usr/local/share/clixon + /usr/local/share/example/yang $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_datastore.sh b/test/test_datastore.sh index d9155b0e..8427ed9f 100755 --- a/test/test_datastore.sh +++ b/test/test_datastore.sh @@ -6,7 +6,7 @@ . ./lib.sh fyang=$dir/ietf-ip.yang -datastore=datastore_client +datastore=../datastore/datastore_client cat < $fyang module ietf-ip{ diff --git a/test/test_install.sh b/test/test_install.sh index 5e88336b..032bba4a 100755 --- a/test/test_install.sh +++ b/test/test_install.sh @@ -19,9 +19,6 @@ fi if [ ! -d $dir/www-data ]; then err $dir/www-data fi -if [ ! -f $dir/usr/local/share/clixon/clixon.mk ]; then - err $dir/usr/local/share/clixon/clixon.mk -fi if [ ! -f $dir/usr/local/share/clixon/clixon-config* ]; then err $dir/usr/local/share/clixon/clixon-config* fi diff --git a/yang/Makefile.in b/yang/Makefile.in index 66b2621f..469f026b 100644 --- a/yang/Makefile.in +++ b/yang/Makefile.in @@ -38,6 +38,8 @@ bindir = @bindir@ includedir = @includedir@ datarootdir = @datarootdir@ +CLIXON_DATADIR = @CLIXON_DATADIR@ + YANGSPECS = clixon-config@2018-04-30.yang YANGSPECS += ietf-netconf@2011-06-01.yang YANGSPECS += ietf-netconf-acm@2018-02-14.yang @@ -48,22 +50,17 @@ APPNAME = clixon # subdir ehere these files are installed all: -# Note: clixon.mk has a rule for: --include $(DESTDIR)$(datarootdir)/clixon/clixon.mk - clean: distclean: clean rm -f Makefile *~ .depend install: $(YANGSPECS) - echo $(DESTDIR)$(datarootdir)/clixon/clixon.mk - echo $(DESTDIR)$(clixon_DATADIR) - install -d -m 0755 $(DESTDIR)$(clixon_DATADIR) - install -m 0644 $(YANGSPECS) $(DESTDIR)$(clixon_DATADIR) + install -d -m 0755 $(DESTDIR)$(CLIXON_DATADIR) + install -m 0644 $(YANGSPECS) $(DESTDIR)$(CLIXON_DATADIR) -uninstall: - (cd $(DESTDIR)$(clixon_DATADIR); rm -rf $(YANGSPECS)) +uninstall: + (cd $(DESTDIR)$(CLIXON_DATADIR); rm -rf *.yang) install-include: