distclean

This commit is contained in:
Olof Hagsand 2016-02-28 16:46:49 +01:00
parent 79b77943f9
commit caccfe8f2d
6 changed files with 21 additions and 10 deletions

View file

@ -49,7 +49,7 @@ $(SUBDIRS):
(cd $@ && $(MAKE) $(MFLAGS) all) (cd $@ && $(MAKE) $(MFLAGS) all)
depend: depend:
for i in $(SUBDIRS) doc example; \ for i in $(SUBDIRS) doc example docker; \
do (cd $$i && $(MAKE) $(MFLAGS) depend); done do (cd $$i && $(MAKE) $(MFLAGS) depend); done
# template clixon.conf file # template clixon.conf file
@ -73,7 +73,7 @@ install-include:
echo "To install example app: cd example; make; make install" echo "To install example app: cd example; make; make install"
uninstall: uninstall:
for i in $(SUBDIRS) doc example; \ for i in $(SUBDIRS) doc example docker; \
do (cd $$i && $(MAKE) $(MFLAGS) $@); done; do (cd $$i && $(MAKE) $(MFLAGS) $@); done;
rm -f $(datadir)/clixon/clixon.conf.cpp rm -f $(datadir)/clixon/clixon.conf.cpp
rm -f $(datadir)/clixon/clixon.mk rm -f $(datadir)/clixon/clixon.mk
@ -88,14 +88,14 @@ configure: configure.ac
cd $(srcdir) && autoconf cd $(srcdir) && autoconf
clean: clean:
for i in $(SUBDIRS) doc example; \ for i in $(SUBDIRS) doc example docker; \
do (cd $$i && $(MAKE) $(MFLAGS) $@); done; do (cd $$i && $(MAKE) $(MFLAGS) $@); done;
distclean: distclean:
rm -f Makefile TAGS config.status config.log *~ .depend rm -f Makefile TAGS config.status config.log *~ .depend
rm -rf Makefile autom4te.cache rm -rf Makefile autom4te.cache
rm -rf clixon.conf.cpp clixon.mk rm -rf clixon.conf.cpp clixon.mk
for i in $(SUBDIRS) doc example; \ for i in $(SUBDIRS) doc example docker; \
do (cd $$i && $(MAKE) $(MFLAGS) $@); done do (cd $$i && $(MAKE) $(MFLAGS) $@); done
docker: docker:

View file

@ -75,7 +75,7 @@ clean:
rm -f *.core $(APPL) $(APPOBJ) $(LIBOBJ) $(MYLIB) $(MYLIBSO) $(MYLIBLINK) rm -f *.core $(APPL) $(APPOBJ) $(LIBOBJ) $(MYLIB) $(MYLIBSO) $(MYLIBLINK)
distclean: clean distclean: clean
rm -f Makefile *~ .depend rm -f Makefile *~ .depend test test.c
# Put demon in bin # Put demon in bin
# Put other executables in libexec/ # Put other executables in libexec/

View file

@ -71,7 +71,7 @@ clean:
rm -f $(OBJS) $(LIBOBJS) *.core $(APPL) $(MYLIB) $(MYLIBSO) $(MYLIBLINK) rm -f $(OBJS) $(LIBOBJS) *.core $(APPL) $(MYLIB) $(MYLIBSO) $(MYLIBLINK)
distclean: clean distclean: clean
rm -f Makefile *~ .depend rm -f Makefile *~ .depend test test.c
# Put daemon in bin # Put daemon in bin
# Put other executables in libexec/ # Put other executables in libexec/

View file

@ -77,9 +77,11 @@ OBJS = $(BE_OBJ) $(CLI_OBJ) $(NETCONF_OBJ)
clean: clean:
rm -f $(PLUGINS) $(OBJS) $(APPNAME).conf rm -f $(PLUGINS) $(OBJS) $(APPNAME).conf
(cd docker && $(MAKE) $(MFLAGS) $@)
distclean: clean distclean: clean
rm -f Makefile *~ .depend rm -f Makefile *~ .depend
(cd docker && $(MAKE) $(MFLAGS) $@)
install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $(APPNAME).conf install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $(APPNAME).conf
install -d $(DESTDIR)$(clixon_SYSCONFDIR) install -d $(DESTDIR)$(clixon_SYSCONFDIR)
@ -95,17 +97,20 @@ install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(CLI_PLUGIN) $(NETCONF_PLUGIN) $
install -d $(DESTDIR)$(clixon_LIBDIR)/clispec install -d $(DESTDIR)$(clixon_LIBDIR)/clispec
install $(CLISPECS) $(DESTDIR)$(clixon_LIBDIR)/clispec; install $(CLISPECS) $(DESTDIR)$(clixon_LIBDIR)/clispec;
install -d $(DESTDIR)$(clixon_LOCALSTATEDIR) install -d $(DESTDIR)$(clixon_LOCALSTATEDIR)
(cd docker && $(MAKE) $(MFLAGS) $@)
uninstall: uninstall:
rm -rf $(DESTDIR)$(clixon_SYSCONFDIR)/$(APPNAME).conf rm -rf $(DESTDIR)$(clixon_SYSCONFDIR)/$(APPNAME).conf
rm -rf $(DESTDIR)$(clixon_DBSPECDIR) rm -rf $(DESTDIR)$(clixon_DBSPECDIR)
rm -rf $(DESTDIR)$(clixon_LOCALSTATEDIR) rm -rf $(DESTDIR)$(clixon_LOCALSTATEDIR)
rm -rf $(DESTDIR)$(clixon_LIBDIR) rm -rf $(DESTDIR)$(clixon_LIBDIR)
(cd docker && $(MAKE) $(MFLAGS) $@)
install-include: install-include:
depend: depend:
$(CC) $(DEPENDFLAGS) $(INCLUDES) $(CFLAGS) -MM $(SRC) > .depend $(CC) $(DEPENDFLAGS) $(INCLUDES) $(CFLAGS) -MM $(SRC) > .depend
(cd docker && $(MAKE) $(MFLAGS) $@)
#include .depend #include .depend

View file

@ -2,7 +2,5 @@ Run the ietf routing example as docker container.
Use the dockerhub container, or alternatively, build clicon as docker images Use the dockerhub container, or alternatively, build clicon as docker images
by doing make docker in the top builddir. by doing make docker in the top builddir.
data_dir="$(pwd)/data" make docker # Create shared file system
sudo docker run -ti --rm --net host -v "$data_dir":/data olofhagsand/clicon_backend:v1.0 run.sh # Run a backend and a cli
sudo docker run -ti --rm --net host -v "$data_dir":/data olofhagsand/clicon_cli:v1.0

8
example/docker/run.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
# Start daemon and a cli docker containers .
# Note that they have a common file-system at /data
#
sudo docker run -td --net host -v $(pwd)/data:/data olofhagsand/clicon_backend
sudo docker run -ti --rm --net host -v $(pwd)/data:/data olofhagsand/clicon_cli