From 22b56ab5ceae57435120f5a1721bdc7e41b749b4 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Fri, 11 Sep 2015 10:35:11 +0200 Subject: [PATCH] move JSON_INDENT to config.mk --- Makefile | 6 ++++++ config.h.example | 7 ------- config.mk.in | 3 +++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c3d3d12..334b846 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,12 @@ ifeq ($(HAVE_HTTP),yes) LIBS += -lssl endif +ifeq ($(JSON_INDENT),yes) + CFLAGS += -DJSON_INDENT="\" \"" +else + CFLAGS += -DJSON_INDENT=NULL +endif + CFLAGS += -DSTORAGEDEFAULT=\"$(STORAGEDEFAULT)\" diff --git a/config.h.example b/config.h.example index 53a535a..606d9c4 100644 --- a/config.h.example +++ b/config.h.example @@ -11,10 +11,3 @@ */ #define DEFAULT_HISTORY_HOURS 6 - -/* - * Indented JSON or not? Choose. - */ - -#define JSON_INDENT " " /* indented */ -// #define JSON_INDENT NULL /* not indented */ diff --git a/config.mk.in b/config.mk.in index c04cca6..bb98727 100644 --- a/config.mk.in +++ b/config.mk.in @@ -25,3 +25,6 @@ MOSQUITTO_LIB = -L/usr/lib GHASHPREC = 7 +# Should the JSON emitted by recorder be indented? (i.e. beautified) +# yes or no +JSON_INDENT ?= yes