summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTomas Hlavacek <tmshlvck@gmail.com>2013-02-24 23:47:22 +0100
committerTomas Hlavacek <tmshlvck@gmail.com>2013-03-19 18:03:49 +0100
commit8322ecde124188a9408b54afead4666bb954e5a5 (patch)
treef34cc23ed221714974475ce95ad2abbf7954b16e /tools
parente454916149d4efe66732fdd0388181813cab6ed0 (diff)
Add lightweight client - birdcl
Restructure client/ subdir. Add two different flavors of client. The full featured birdc client code is in client/birdc/. The new light client birtcl is in client/birdcl/. Common sources of both clients are directly in client/. Rework on-line auto-completion in client/command.c to conditionally turn off ncurses-specific code. Add lightweight client without libreadline and ncurses dependencies - birdcl. The birdcl lacks support of history, on-line auto-completion and there are different implementations of "more" functionality and help on '?' press. New client operates in canonical terminal mode (apart from "more" display) and therefore all commands have to be executed by a return key including help commands (called by '?' character in the end of the line). Apart from these limitations the interaction style should be the same as for the full client - birdc. Build of birdcl is always on (independent on --enable-client parameter).
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.in27
-rw-r--r--tools/Rules.in8
2 files changed, 24 insertions, 11 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 728e5797..adf35b64 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -3,29 +3,36 @@
include Rules
-.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
+.PHONY: all daemon birdci birdcl subdir depend clean distclean tags docs userdocs progdocs
-all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
+all: sysdep/paths.h .dep-stamp subdir daemon birdcl @CLIENT@
daemon: $(exedir)/bird
-client: $(exedir)/birdc
+birdc: $(exedir)/birdc
+
+birdcl: $(exedir)/birdcl
bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
$(bird-dep): sysdep/paths.h .dep-stamp subdir
-birdc-dep := client/all.o lib/birdlib.a
+birdc-dep := client/birdc/all.o client/all.o lib/birdlib.a
$(birdc-dep): sysdep/paths.h .dep-stamp subdir
+birdcl-dep := client/birdcl/all.o client/all.o lib/birdlib.a
+
+$(birdcl-dep): sysdep/paths.h .dep-stamp subdir
+
+
depend: sysdep/paths.h .dir-stamp
set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
- set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
+ set -e ; for a in $(static-dirs) $(birdcl-dirs) $(birdc-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
subdir: sysdep/paths.h .dir-stamp .dep-stamp
set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
- set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
+ set -e ; for a in $(static-dirs) $(birdcl-dirs) $(birdc-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
$(exedir)/bird: $(bird-dep)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
@@ -33,8 +40,11 @@ $(exedir)/bird: $(bird-dep)
$(exedir)/birdc: $(birdc-dep)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
+$(exedir)/birdcl: $(birdcl-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
.dir-stamp: sysdep/paths.h
- mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs)
+ mkdir -p $(static-dirs) $(birdcl-dirs) $(birdc-dirs) $(doc-dirs)
touch .dir-stamp
.dep-stamp:
@@ -58,6 +68,7 @@ tags:
install: all
$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@
$(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX@
+ $(INSTALL_PROGRAM) -s $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl@SUFFIX@
if test -n "@CLIENT@" ; then \
$(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX@ ; \
fi
@@ -74,7 +85,7 @@ install-docs:
clean:
find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h
- rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
+ rm -f $(exedir)/bird $(exedir)/birdcl $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
distclean: clean
rm -f config.* configure sysdep/autoconf.h sysdep/paths.h Makefile Rules
diff --git a/tools/Rules.in b/tools/Rules.in
index fc06aeb1..fd10f5de 100644
--- a/tools/Rules.in
+++ b/tools/Rules.in
@@ -11,12 +11,14 @@ static-dirs := nest filter $(addprefix proto/,$(protocols))
static-dir-paths := $(addprefix $(srcdir)/,$(static-dirs))
dynamic-dirs := lib conf
dynamic-dir-paths := $(dynamic-dirs)
-client-dirs := @CLIENT@
-client-dir-paths := $(client-dirs)
+birdc-dirs := client client/@CLIENT@
+birdc-dir-paths := $(birdc-dirs)
+birdcl-dirs := client client/birdcl
+birdcl-dir-paths := $(birdcl-dirs)
doc-dirs := doc
doc-dir-paths := $(doc-dirs)
-all-dirs:=$(static-dirs) $(dynamic-dirs) $(client-dirs) $(doc-dirs)
+all-dirs:=$(static-dirs) $(dynamic-dirs) $(birdc-dirs) $(doc-dirs)
clean-dirs:=$(all-dirs) proto sysdep
CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@