add 'dox' make target for nftables, which generates docs using doxygen. Also modify the uuid in the installed copy of miniupnpd.conf, not the pristine local copy that is under revision control.
This commit is contained in:
parent
dec239d340
commit
8a56bb50cf
|
@ -30,6 +30,7 @@ INSTALL = install
|
||||||
STRIP ?= strip
|
STRIP ?= strip
|
||||||
PKG_CONFIG ?= pkg-config
|
PKG_CONFIG ?= pkg-config
|
||||||
CP = cp
|
CP = cp
|
||||||
|
DOXYGEN ?= doxygen
|
||||||
|
|
||||||
|
|
||||||
INSTALLPREFIX ?= $(PREFIX)/usr
|
INSTALLPREFIX ?= $(PREFIX)/usr
|
||||||
|
@ -83,13 +84,26 @@ else
|
||||||
$(info please install uuid-dev package / libuuid)
|
$(info please install uuid-dev package / libuuid)
|
||||||
endif # ($(TEST),1)
|
endif # ($(TEST),1)
|
||||||
|
|
||||||
|
# genuuid uses the uuidgen CLI tool which is part of libuuid
|
||||||
|
# from the e2fsprogs
|
||||||
|
# 'cat /proc/sys/kernel/random/uuid' could be also used
|
||||||
|
#
|
||||||
|
ifeq ($(TARGET_OPENWRT),)
|
||||||
|
UUIDEXECDIR=''
|
||||||
|
else
|
||||||
|
UUIDEXECDIR="$(STAGING_DIR_HOST)/bin/"
|
||||||
|
endif
|
||||||
|
UUID=$(shell ($(UUIDEXECDIR)genuuid || $(UUIDEXECDIR)uuidgen || $(UUIDEXECDIR)uuid) 2> /dev/null )
|
||||||
|
|
||||||
|
|
||||||
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
||||||
|
|
||||||
EXECUTABLES = miniupnpd testupnpdescgen testgetifstats \
|
EXECUTABLES = miniupnpd miniupnpdctl \
|
||||||
testupnppermissions miniupnpdctl testgetifaddr \
|
testupnpdescgen testgetifstats \
|
||||||
|
testupnppermissions testgetifaddr \
|
||||||
testgetroute testasyncsendto testportinuse
|
testgetroute testasyncsendto testportinuse
|
||||||
|
|
||||||
.PHONY: all clean install depend genuuid
|
.PHONY: all clean install depend dox
|
||||||
|
|
||||||
all: $(EXECUTABLES)
|
all: $(EXECUTABLES)
|
||||||
|
|
||||||
|
@ -101,8 +115,9 @@ clean:
|
||||||
$(RM) testgetroute.o testasyncsendto.o
|
$(RM) testgetroute.o testasyncsendto.o
|
||||||
$(RM) testportinuse.o
|
$(RM) testportinuse.o
|
||||||
$(RM) miniupnpdctl.o
|
$(RM) miniupnpdctl.o
|
||||||
|
$(RM) -r dox/
|
||||||
|
|
||||||
install: miniupnpd miniupnpd.8 miniupnpd.conf genuuid \
|
install: miniupnpd miniupnpd.8 miniupnpd.conf \
|
||||||
netfilter_nft/scripts/nft_init.sh \
|
netfilter_nft/scripts/nft_init.sh \
|
||||||
netfilter_nft/scripts/nft_removeall.sh \
|
netfilter_nft/scripts/nft_removeall.sh \
|
||||||
netfilter_nft/scripts/nft_flush.sh \
|
netfilter_nft/scripts/nft_flush.sh \
|
||||||
|
@ -117,21 +132,13 @@ install: miniupnpd miniupnpd.8 miniupnpd.conf genuuid \
|
||||||
$(INSTALL) netfilter_nft/scripts/nft_flush.sh $(DESTDIR)$(ETCINSTALLDIR)
|
$(INSTALL) netfilter_nft/scripts/nft_flush.sh $(DESTDIR)$(ETCINSTALLDIR)
|
||||||
$(INSTALL) netfilter_nft/scripts/nft_delete_chain.sh $(DESTDIR)$(ETCINSTALLDIR)
|
$(INSTALL) netfilter_nft/scripts/nft_delete_chain.sh $(DESTDIR)$(ETCINSTALLDIR)
|
||||||
$(INSTALL) --mode=0644 -b miniupnpd.conf $(DESTDIR)$(ETCINSTALLDIR)
|
$(INSTALL) --mode=0644 -b miniupnpd.conf $(DESTDIR)$(ETCINSTALLDIR)
|
||||||
|
sed -i -e "s/^uuid=[-0-9a-f]*/uuid=$(UUID)/" $(DESTDIR)$(ETCINSTALLDIR)/miniupnpd.conf
|
||||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/etc/init.d
|
$(INSTALL) -d $(DESTDIR)$(PREFIX)/etc/init.d
|
||||||
$(INSTALL) linux/miniupnpd.init.d.script $(DESTDIR)$(PREFIX)/etc/init.d/miniupnpd
|
$(INSTALL) linux/miniupnpd.init.d.script $(DESTDIR)$(PREFIX)/etc/init.d/miniupnpd
|
||||||
$(INSTALL) -d $(DESTDIR)$(MANINSTALLDIR)
|
$(INSTALL) -d $(DESTDIR)$(MANINSTALLDIR)
|
||||||
$(INSTALL) --mode=0644 miniupnpd.8 $(DESTDIR)$(MANINSTALLDIR)
|
$(INSTALL) --mode=0644 miniupnpd.8 $(DESTDIR)$(MANINSTALLDIR)
|
||||||
gzip -f $(DESTDIR)$(MANINSTALLDIR)/miniupnpd.8
|
gzip -f $(DESTDIR)$(MANINSTALLDIR)/miniupnpd.8
|
||||||
|
|
||||||
# genuuid is using the uuidgen CLI tool which is part of libuuid
|
|
||||||
# from the e2fsprogs
|
|
||||||
# 'cat /proc/sys/kernel/random/uuid' could be also used
|
|
||||||
genuuid:
|
|
||||||
ifeq ($(TARGET_OPENWRT),)
|
|
||||||
sed -i -e "s/^uuid=[-0-9a-f]*/uuid=`(genuuid||uuidgen||uuid) 2>/dev/null`/" miniupnpd.conf
|
|
||||||
else
|
|
||||||
sed -i -e "s/^uuid=[-0-9a-f]*/uuid=`($(STAGING_DIR_HOST)/bin/genuuid||$(STAGING_DIR_HOST)/bin/uuidgen||$(STAGING_DIR_HOST)/bin/uuid) 2>/dev/null`/" miniupnpd.conf
|
|
||||||
endif
|
|
||||||
|
|
||||||
miniupnpd: $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS)
|
miniupnpd: $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS)
|
||||||
|
|
||||||
|
@ -163,6 +170,9 @@ depend: config.h
|
||||||
testgetroute.c testasyncsendto.c testportinuse.c \
|
testgetroute.c testasyncsendto.c testportinuse.c \
|
||||||
miniupnpdctl.c 2>/dev/null
|
miniupnpdctl.c 2>/dev/null
|
||||||
|
|
||||||
|
dox:
|
||||||
|
doxygen miniupnpd.doxyconf
|
||||||
|
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
miniupnpd.o: config.h macros.h upnpglobalvars.h upnppermissions.h
|
miniupnpd.o: config.h macros.h upnpglobalvars.h upnppermissions.h
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue