Skip to content

Commit

Permalink
Fix install target when using WITH_CJSON=no.
Browse files Browse the repository at this point in the history
Closes #1938. Thanks to apple3306 and JulianCaruso.
  • Loading branch information
ralight committed Dec 11, 2020
1 parent cc47eab commit f7dc138
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.txt
@@ -1,3 +1,7 @@
Build:
- Fix `install` target when using WITH_CJSON=no. Closes #1938.


2.0.2 - 2020-12-10
==================

Expand Down
6 changes: 5 additions & 1 deletion apps/mosquitto_ctrl/Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion plugins/dynamic-security/Makefile
Expand Up @@ -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"

0 comments on commit f7dc138

Please sign in to comment.