From: Petr Špaček Date: Fri, 1 Dec 2017 13:00:36 +0000 (+0100) Subject: client: move sources into separate directory X-Git-Tag: v1.5.1~10^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ee4c7764ac86cccea91df4fcf7f6bf12d4ee67f;p=thirdparty%2Fknot-resolver.git client: move sources into separate directory Let's not mix daemon and client files as client might grow to multiple files in future. This will also help with upcomming changes to packaging scripts. --- diff --git a/.gitignore b/.gitignore index b499e0894..f9fb1f27c 100644 --- a/.gitignore +++ b/.gitignore @@ -43,9 +43,9 @@ _obj /aclocal.m4 /ltmain.sh /ylwrap +/client/kresc /doc/doxyxml /doc/html -/daemon/kresc /daemon/kresd /daemon/lua/*.inc /daemon/lua/kres.lua diff --git a/Makefile b/Makefile index 3a177936a..1d3cc8a9c 100644 --- a/Makefile +++ b/Makefile @@ -187,6 +187,7 @@ $(DESTDIR)$(ETCDIR): # Sub-targets include contrib/contrib.mk include lib/lib.mk +include client/client.mk include daemon/daemon.mk include modules/modules.mk include tests/tests.mk diff --git a/client/client.mk b/client/client.mk new file mode 100644 index 000000000..07508aa30 --- /dev/null +++ b/client/client.mk @@ -0,0 +1,14 @@ +# Experimental client requires libedit + +ifeq ($(HAS_libedit), yes) +kresc_SOURCES := client/kresc.c +kresc_CFLAGS += -fPIE $(libedit_CFLAGS) +kresc_LIBS += $(contrib_TARGET) $(libedit_LIBS) +kresc_DEPEND := $(libkres) $(contrib) +$(eval $(call make_sbin,kresc,client,yes)) +client: $(kresc) +client-install: kresc-install +client-clean: kresc-clean + +.PHONY: client client-install client-clean +endif diff --git a/daemon/kresc.c b/client/kresc.c similarity index 100% rename from daemon/kresc.c rename to client/kresc.c diff --git a/daemon/daemon.mk b/daemon/daemon.mk index 09717d22b..d1cef6c22 100644 --- a/daemon/daemon.mk +++ b/daemon/daemon.mk @@ -77,16 +77,4 @@ daemon/lua/kres-gen.lua: | $(libkres) daemon/lua/kres-gen.sh | sed 's/ /\t/g' > $@ .DELETE_ON_ERROR: daemon/lua/kres-gen.lua -# Client -ifeq ($(HAS_libedit), yes) -kresc_SOURCES := daemon/kresc.c -kresc_CFLAGS += -fPIE $(libedit_CFLAGS) -kresc_LIBS += $(contrib_TARGET) $(libedit_LIBS) -kresc_DEPEND := $(libkres) $(contrib) -$(eval $(call make_sbin,kresc,daemon,yes)) -client: $(kresc) -client-install: kresc-install -client-clean: kresc-clean -endif - -.PHONY: daemon daemon-install daemon-clean client client-install client-clean +.PHONY: daemon daemon-install daemon-clean