daemon/lua/trust_anchors.lua: daemon/lua/trust_anchors.lua.in
@$(call quiet,SED,$<) -e "s|@ETCDIR@|$(ETCDIR)|g" $< > $@
+ LIBZSCANNER_COMMENTS := \
+ $(shell pkg-config libzscanner --atleast-version=2.4.2 && echo true || echo false)
+ daemon/lua/zonefile.lua: daemon/lua/zonefile.lua.in
+ @$(call quiet,SED,$<) -e "s|@LIBZSCANNER_COMMENTS@|$(LIBZSCANNER_COMMENTS)|g" $< > $@
+
daemon/lua/kres-gen.lua: | $(libkres)
@echo "WARNING: regenerating $@"
- daemon/lua/kres-gen.sh > $@
+ @# the sed saves some space(s)
+ daemon/lua/kres-gen.sh | sed 's/ /\t/g' > $@
.DELETE_ON_ERROR: daemon/lua/kres-gen.lua
-.PHONY: daemon daemon-install daemon-clean
+# 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