diff --git a/ChangeLog.txt b/ChangeLog.txt index 14bc5086..2923806f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +Build: +- Fix `install` target when using WITH_CJSON=no. Closes #1938. + + 2.0.2 - 2020-12-10 ================== diff --git a/apps/mosquitto_ctrl/Makefile b/apps/mosquitto_ctrl/Makefile index 3a4843bf..d2122abc 100644 --- a/apps/mosquitto_ctrl/Makefile +++ b/apps/mosquitto_ctrl/Makefile @@ -36,7 +36,7 @@ else TARGET:= endif -all : $(TARGET) +all : ${TARGET} mosquitto_ctrl : ${OBJS} ${CROSS_COMPILE}${CC} ${APP_LDFLAGS} $^ -o $@ $(PASSWD_LDADD) $(LOCAL_LDFLAGS) $(LIBMOSQ) -lcjson -ldl @@ -84,8 +84,12 @@ password_mosq.o : ../../src/password_mosq.c ../../src/password_mosq.h ${CROSS_COMPILE}${CC} $(APP_CPPFLAGS) $(APP_CFLAGS) -c $< -o $@ install : all +ifeq ($(WITH_TLS),yes) +ifeq ($(WITH_CJSON),yes) $(INSTALL) -d "${DESTDIR}$(prefix)/bin" $(INSTALL) ${STRIP_OPTS} mosquitto_ctrl "${DESTDIR}${prefix}/bin/mosquitto_ctrl" +endif +endif uninstall : -rm -f "${DESTDIR}${prefix}/bin/mosquitto_ctrl" diff --git a/plugins/dynamic-security/Makefile b/plugins/dynamic-security/Makefile index 203fbc3e..810a17ba 100644 --- a/plugins/dynamic-security/Makefile +++ b/plugins/dynamic-security/Makefile @@ -74,9 +74,13 @@ clean: check: test test: -install: ${PLUGIN_NAME}.so +install: all +ifeq ($(WITH_CJSON),yes) +ifeq ($(WITH_TLS),yes) $(INSTALL) -d "${DESTDIR}$(prefix)/lib" $(INSTALL) ${STRIP_OPTS} ${PLUGIN_NAME}.so "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so" +endif +endif uninstall : -rm -f "${DESTDIR}${prefix}/lib/${PLUGIN_NAME}.so"