* INSTALLFLAGS added with default value -s(strip).

* For debug do: CFLAGS=-g INSTALLFLAGS= ./configure
This commit is contained in:
Olof hagsand 2018-04-30 12:06:19 +02:00
parent 1ac57dedaf
commit 7532fdde77
15 changed files with 63 additions and 41 deletions

View file

@ -74,6 +74,8 @@ clixon_plugin_api *clixon_plugin_init(clicon_handle h)
### Minor changes:
* INSTALLFLAGS added with default value -s(strip).
* For debug do: CFLAGS=-g INSTALLFLAGS= ./configure
* plugin_start() callbacks added for restconf
* Authentication
* Example extended with http basic authentication for restconf

View file

@ -47,7 +47,7 @@ CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
#INSTALL = @INSTALL@
INSTALL = @INSTALL@
INCLUDES = -I. -I@srcdir@ @INCLUDES@
SHELL = /bin/sh

View file

@ -1,11 +1,12 @@
# README for developers Clixon developers
# README for Clixon developers
1. How to document the code
2. How to work in git (branching)
3. How the meta-configure stuff works
4. How to debug
* [Code documentation](#documentation)
* [How to work in git (branching)](#branching)
* [How the meta-configure stuff works](#meta-configure)
* [How to debug](#debug)
## How to document the code
## Documentation
How to document the code
```
/*! This is a small comment on one line
@ -26,7 +27,8 @@
*/
```
## How to work in git (branching)
## Branching
How to work in git (branching)
Basically follows: http://nvie.com/posts/a-successful-git-branching-model/
only somewhat simplified:
@ -49,11 +51,16 @@ configure.ac --.
Makefile.in ---' `-> Makefile ---'
```
## How to debug
## Debug
How to debug
### Configure in debug mode
```
CFLAGS="-g -Wall" INSTALLFLAGS="" ./configure
```
### Make your own simplified yang and configuration file.
```
cat <<EOF > /tmp/my.yang
module mymodule{
container x {

View file

@ -7,15 +7,15 @@ The support is as follows:
* There is a yang config variable `CLICON_NACM_MODE` to set whether NACM is disabled, uses internal(embedded) NACM configuration, or external configuration. (See yang/clixon-config.yang)
* If the mode is internal, NACM configurations is expected to be in the regular configuration, managed by regular candidate/runing/commit procedures. This mode may have some problems with bootstrapping.
* If the mode is `external`, the `CLICON_NACM_FILE` yang config variable contains the name of a separate configuration file containing the NACM configurations. After changes in this file, the backend needs to be restarted.
* The [example](example/README.md) contains a http basic auth and a NACM backend callback for state variable.
* The [example](example/README.md) contains a http basic auth and a NACM backend callback for mandatory state variables.
* There are two [tests](test/README.md) using internal and external NACM config
* The backend provides a limited NACM support (when enabled) decscribed below
* The backend provides a limited NACM support (when enabled) described below
NACM functionality
==================
NACM is implemented in the backend and the access checks are made at a
single point: in from_client_msg() when an internal netconf RPC has
NACM is implemented in the backend and a single access check is made
in from_client_msg() when an internal netconf RPC has
just been received and decoded. The code is in nacm_access().
The functionality is as follows:

View file

@ -36,6 +36,7 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
prefix = @prefix@
@ -99,11 +100,11 @@ distclean: clean
# Put config file in etc/
install: install-lib $(APPL)
install -d -m 0755 $(DESTDIR)$(sbindir)
install -m 0755 -s $(APPL) $(DESTDIR)$(sbindir)
install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(sbindir)
install-lib: $(MYLIB)
install -d -m 0755 $(DESTDIR)$(libdir)
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
install -m 0644 $(INSTALLFLAGS) $(MYLIB) $(DESTDIR)$(libdir)
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_config.so.2
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_config.so
install -d -m 0755 $(DESTDIR)$(libdir)/clixon/plugins/backend

View file

@ -36,6 +36,7 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
prefix = @prefix@
@ -103,11 +104,11 @@ distclean: clean
# Put config file in etc/
install: install-lib $(APPL)
install -d -m 0755 $(DESTDIR)$(bindir)
install -m 0755 -s $(APPL) $(DESTDIR)$(bindir)
install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(bindir)
install-lib: $(MYLIB)
install -d -m 0755 $(DESTDIR)$(libdir)
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
install -m 0644 $(INSTALLFLAGS) $(MYLIB) $(DESTDIR)$(libdir)
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_cli.so.2
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_cli.so
install -d -m 0755 $(DESTDIR)$(libdir)/clixon/plugins/cli

View file

@ -35,6 +35,7 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
prefix = @prefix@
@ -101,11 +102,11 @@ distclean: clean
# Put config file in etc/
install: install-lib $(APPL)
install -d -m 0755 $(DESTDIR)$(bindir)
install -m 0755 -s $(APPL) $(DESTDIR)$(bindir)
install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(bindir)
install-lib: $(MYLIB)
install -d -m 0755 $(DESTDIR)$(libdir)
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
install -m 0644 $(INSTALLFLAGS) $(MYLIB) $(DESTDIR)$(libdir)
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_netconf.so.2
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_netconf.so

View file

@ -35,6 +35,7 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
prefix = @prefix@
@ -98,11 +99,11 @@ distclean: clean
# Put config file in etc/
install: install-lib $(APPL)
install -d -m 0755 $(DESTDIR)$(wwwdir)
install -m 0755 -s $(APPL) $(DESTDIR)$(wwwdir)
install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(wwwdir)
install-lib: $(MYLIB)
install -d -m 0755 $(DESTDIR)$(libdir)
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
install -m 0644 $(INSTALLFLAGS) $(MYLIB) $(DESTDIR)$(libdir)
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon_restconf.so.2
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon_restconf.so

11
configure vendored
View file

@ -639,6 +639,7 @@ EXE_SUFFIX
SH_SUFFIX
AR_SUFFIX
OBJ_SUFFIX
INSTALLFLAGS
CPPFLAGS
INCLUDES
LDFLAGS
@ -2141,8 +2142,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Default CFLAGS unless set by environment.
: ${CFLAGS="-O2"}
# Default CFLAGS unless set by environment
: ${CFLAGS="-O2 -Wall"}
: ${INSTALLFLAGS="-s"}
CLIXON_VERSION_MAJOR="3"
CLIXON_VERSION_MINOR="6"
@ -2343,6 +2345,7 @@ test -n "$target_alias" &&
# If yes, compile apps/restconf
#
ac_ext=c
@ -3277,12 +3280,12 @@ CPPFLAGS="-DHAVE_CONFIG_H ${CPPFLAGS}"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: compiler is $CC" >&5
$as_echo "compiler is $CC" >&6; }
CFLAGS="${CFLAGS} -Wall"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CPPFLAGS is $CPPFLAGS" >&5
$as_echo "CPPFLAGS is $CPPFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CFLAGS is $CFLAGS" >&5
$as_echo "CFLAGS is $CFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: INSTALLFLAGS is $INSTALLFLAGS" >&5
$as_echo "INSTALLFLAGS is $INSTALLFLAGS" >&6; }
for ac_prog in 'bison -y' byacc
do

View file

@ -38,8 +38,9 @@
AC_INIT(lib/clixon/clixon.h.in)
# Default CFLAGS unless set by environment.
: ${CFLAGS="-O2"}
# Default CFLAGS unless set by environment
: ${CFLAGS="-O2 -Wall"}
: ${INSTALLFLAGS="-s"}
CLIXON_VERSION_MAJOR="3"
CLIXON_VERSION_MINOR="6"
@ -77,6 +78,7 @@ AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(INCLUDES)
AC_SUBST(CPPFLAGS)
AC_SUBST(INSTALLFLAGS)
AC_SUBST(LIBS)
AC_SUBST(OBJ_SUFFIX)
AC_SUBST(AR_SUFFIX)
@ -93,10 +95,9 @@ CPPFLAGS="-DHAVE_CONFIG_H ${CPPFLAGS}"
AC_MSG_RESULT(compiler is $CC)
CFLAGS="${CFLAGS} -Wall"
AC_MSG_RESULT(CPPFLAGS is $CPPFLAGS)
AC_MSG_RESULT(CFLAGS is $CFLAGS)
AC_MSG_RESULT(INSTALLFLAGS is $INSTALLFLAGS)
AC_PROG_YACC
AC_PROG_LEX

View file

@ -45,6 +45,7 @@ localstatedir = @localstatedir@
sysconfdir = @sysconfdir@
CC = @CC@
CFLAGS = @CFLAGS@
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
with_restconf = @with_restconf@
@ -102,7 +103,7 @@ install-include:
install: $(APPL)
install -d -m 0755 $(DESTDIR)$(bindir)
install -m 0755 -s $(APPL) $(DESTDIR)$(bindir)
install -m 0755 $(INSTALLFLAGS) $(APPL) $(DESTDIR)$(bindir)
for i in $(SUBDIRS); \
do (cd $$i && $(MAKE) $(MFLAGS) $@)||exit 1; done

View file

@ -47,6 +47,7 @@ sysconfdir = @sysconfdir@
VPATH = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@ -rdynamic -fPIC
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
DATASTORE = keyvalue
@ -81,7 +82,7 @@ distclean: clean
install: $(PLUGIN)
install -d -m 0755 $(DESTDIR)$(libdir)/xmldb
install -m 0644 -s $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
install -m 0644 $(INSTALLFLAGS) $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
install-include:

View file

@ -47,6 +47,7 @@ HOST_VENDOR = @host_vendor@
VPATH = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@ -rdynamic -fPIC
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
DATASTORE = text
@ -85,7 +86,7 @@ distclean: clean
install: $(PLUGIN)
install -d -m 0755 $(DESTDIR)$(libdir)/xmldb
install -m 0644 -s $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
install -m 0644 $(INSTALLFLAGS) $(PLUGIN) $(DESTDIR)$(libdir)/xmldb
install-include:

View file

@ -41,6 +41,7 @@ datarootdir = @datarootdir@
APPNAME = example
CC = @CC@
CFLAGS = @CFLAGS@ -rdynamic -fPIC
INSTALLFLAGS = @INSTALLFLAGS@
INCLUDES = -I$(includedir) @INCLUDES@
@ -116,13 +117,13 @@ install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NET
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 -s $(CLI_PLUGIN) $(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 -s $(BE_PLUGIN) $(BE2_PLUGIN) $(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 -s $(NETCONF_PLUGIN) $(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 $(RESTCONF_PLUGIN) $(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)

View file

@ -52,6 +52,7 @@ CLIXON_MINOR = @CLIXON_VERSION_MINOR@
VPATH = @srcdir@
CC = @CC@
CFLAGS = -fPIC @CFLAGS@
INSTALLFLAGS = @INSTALLFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
@ -182,7 +183,7 @@ install-include:
install-lib: $(MYLIB)
install -m 0755 -d $(DESTDIR)$(libdir)
install -m 0644 -s $(MYLIB) $(DESTDIR)$(libdir)
install -m 0644 $(INSTALLFLAGS) $(MYLIB) $(DESTDIR)$(libdir)
ln -sf $(MYLIB) $(DESTDIR)$(libdir)/$(MYLIBSO) # -l:libclixon.so.3
ln -sf $(MYLIBSO) $(DESTDIR)$(libdir)/$(MYLIBLINK) # -l:libclixon.so