2014-05-07 22:27:00 +00:00
|
|
|
include config.mk
|
|
|
|
|
|
|
|
DIRS=lib client src
|
|
|
|
DOCDIRS=man
|
|
|
|
DISTDIRS=man
|
|
|
|
|
2017-04-21 20:51:00 +00:00
|
|
|
.PHONY : all mosquitto api docs binary clean reallyclean test install uninstall dist sign copy
|
2014-05-07 22:27:00 +00:00
|
|
|
|
2014-07-03 20:27:54 +00:00
|
|
|
all : $(MAKE_ALL)
|
2014-05-07 22:27:00 +00:00
|
|
|
|
2017-04-21 20:51:00 +00:00
|
|
|
api :
|
|
|
|
mkdir -p api p
|
|
|
|
naturaldocs -o HTML api -i lib -p p
|
|
|
|
rm -rf p
|
|
|
|
|
2014-05-07 22:27:00 +00:00
|
|
|
docs :
|
|
|
|
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d}; done
|
|
|
|
|
|
|
|
binary : mosquitto
|
|
|
|
|
|
|
|
mosquitto :
|
2015-01-25 11:52:10 +00:00
|
|
|
ifeq ($(UNAME),Darwin)
|
|
|
|
$(error Please compile using CMake on Mac OS X)
|
|
|
|
endif
|
|
|
|
|
2014-05-07 22:27:00 +00:00
|
|
|
set -e; for d in ${DIRS}; do $(MAKE) -C $${d}; done
|
|
|
|
|
|
|
|
clean :
|
|
|
|
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} clean; done
|
|
|
|
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} clean; done
|
|
|
|
$(MAKE) -C test clean
|
|
|
|
|
|
|
|
reallyclean :
|
|
|
|
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} reallyclean; done
|
|
|
|
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} reallyclean; done
|
|
|
|
$(MAKE) -C test reallyclean
|
|
|
|
-rm -f *.orig
|
|
|
|
|
2018-04-15 22:25:04 +00:00
|
|
|
ptest : mosquitto
|
|
|
|
$(MAKE) -C test ptest
|
|
|
|
|
2014-05-07 22:27:00 +00:00
|
|
|
test : mosquitto
|
|
|
|
$(MAKE) -C test test
|
|
|
|
|
|
|
|
install : mosquitto
|
|
|
|
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} install; done
|
2016-06-06 15:11:42 +00:00
|
|
|
ifeq ($(WITH_DOCS),yes)
|
2014-05-07 22:27:00 +00:00
|
|
|
set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} install; done
|
2016-06-06 15:11:42 +00:00
|
|
|
endif
|
2017-10-17 12:01:33 +00:00
|
|
|
$(INSTALL) -d "${DESTDIR}/etc/mosquitto"
|
|
|
|
$(INSTALL) -m 644 mosquitto.conf "${DESTDIR}/etc/mosquitto/mosquitto.conf.example"
|
|
|
|
$(INSTALL) -m 644 aclfile.example "${DESTDIR}/etc/mosquitto/aclfile.example"
|
|
|
|
$(INSTALL) -m 644 pwfile.example "${DESTDIR}/etc/mosquitto/pwfile.example"
|
|
|
|
$(INSTALL) -m 644 pskfile.example "${DESTDIR}/etc/mosquitto/pskfile.example"
|
2014-05-07 22:27:00 +00:00
|
|
|
|
|
|
|
uninstall :
|
|
|
|
set -e; for d in ${DIRS}; do $(MAKE) -C $${d} uninstall; done
|
2018-04-16 21:24:26 +00:00
|
|
|
rm -f "${DESTDIR}/etc/mosquitto/mosquitto.conf.example"
|
2017-10-17 12:01:33 +00:00
|
|
|
rm -f "${DESTDIR}/etc/mosquitto/aclfile.example"
|
|
|
|
rm -f "${DESTDIR}/etc/mosquitto/pwfile.example"
|
|
|
|
rm -f "${DESTDIR}/etc/mosquitto/pskfile.example"
|
2014-05-07 22:27:00 +00:00
|
|
|
|
|
|
|
dist : reallyclean
|
|
|
|
set -e; for d in ${DISTDIRS}; do $(MAKE) -C $${d} dist; done
|
|
|
|
|
|
|
|
mkdir -p dist/mosquitto-${VERSION}
|
2018-05-02 22:56:11 +00:00
|
|
|
cp -r client examples installer lib logo man misc security service src test about.html aclfile.example ChangeLog.txt CMakeLists.txt compiling.txt config.h config.mk CONTRIBUTING.md edl-v10 epl-v10 libmosquitto.pc.in libmosquittopp.pc.in LICENSE.txt Makefile mosquitto.conf notice.html pskfile.example pwfile.example readme.md readme-windows.txt dist/mosquitto-${VERSION}/
|
2014-05-07 22:27:00 +00:00
|
|
|
cd dist; tar -zcf mosquitto-${VERSION}.tar.gz mosquitto-${VERSION}/
|
|
|
|
set -e; for m in man/*.xml; \
|
|
|
|
do \
|
|
|
|
hfile=$$(echo $${m} | sed -e 's#man/\(.*\)\.xml#\1#' | sed -e 's/\./-/g'); \
|
|
|
|
$(XSLTPROC) $(DB_HTML_XSL) $${m} > dist/$${hfile}.html; \
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
sign : dist
|
|
|
|
cd dist; gpg --detach-sign -a mosquitto-${VERSION}.tar.gz
|
|
|
|
|
|
|
|
copy : sign
|
|
|
|
cd dist; scp mosquitto-${VERSION}.tar.gz mosquitto-${VERSION}.tar.gz.asc mosquitto:site/mosquitto.org/files/source/
|
|
|
|
cd dist; scp *.html mosquitto:site/mosquitto.org/man/
|
|
|
|
scp ChangeLog.txt mosquitto:site/mosquitto.org/
|
|
|
|
|
2018-10-06 20:56:48 +00:00
|
|
|
coverage :
|
|
|
|
lcov --capture --directory . --output-file coverage.info
|
|
|
|
genhtml coverage.info --output-directory out
|