]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
client: move sources into separate directory
authorPetr Špaček <petr.spacek@nic.cz>
Fri, 1 Dec 2017 13:00:36 +0000 (14:00 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Fri, 1 Dec 2017 13:04:17 +0000 (14:04 +0100)
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.

.gitignore
Makefile
client/client.mk [new file with mode: 0644]
client/kresc.c [moved from daemon/kresc.c with 100% similarity]
daemon/daemon.mk

index b499e0894c35c95d989660ac54f6b1eddbeaadb3..f9fb1f27c705a33f569ae7ee3e2547a60c55abc5 100644 (file)
@@ -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
index 3a177936af90c7ec4794ef2de7c58902a4347c63..1d3cc8a9cd4c2d96e8bff3a7d3587342ca37ff82 100644 (file)
--- 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 (file)
index 0000000..07508aa
--- /dev/null
@@ -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
similarity index 100%
rename from daemon/kresc.c
rename to client/kresc.c
index 09717d22b7301c64007bc41ce7b74cffe80169af..d1cef6c22847b3ac457de96064069c748ce6aa65 100644 (file)
@@ -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