minipnpd: move check target to check.mk

This commit is contained in:
Thomas Bernard 2020-05-07 01:02:48 +02:00
parent 2b4d9f5ee5
commit 388d93d678
3 changed files with 19 additions and 15 deletions

View File

@ -158,21 +158,7 @@ else
endif endif
mv $@.tmp $@ mv $@.tmp $@
check: validateupnppermissions validategetifaddr validatessdppktgen \ include $(SRCDIR)/check.mk
validateversion
validateversion: miniupnpd $(SRCDIR)/VERSION
./miniupnpd --version
[ "`./miniupnpd --version | head -1 | cut -d' ' -f-2`" = "miniupnpd `cat $(SRCDIR)/VERSION`" ]
touch $@
validate%: $(SRCDIR)/test%.sh test%
$(SHELL) $<
touch $@
validatessdppktgen: testssdppktgen
./$<
touch $@
miniupnpd: $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) miniupnpd: $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS)

View File

@ -130,6 +130,7 @@ install: miniupnpd $(SRCDIR)/miniupnpd.8 $(SRCDIR)/miniupnpd.conf \
$(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
include $(SRCDIR)/check.mk
miniupnpd: $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) miniupnpd: $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS)

17
miniupnpd/check.mk Normal file
View File

@ -0,0 +1,17 @@
# (c) 2020 Thomas BERNARD
check: validateupnppermissions validategetifaddr validatessdppktgen \
validateversion
validateversion: miniupnpd $(SRCDIR)/VERSION
./miniupnpd --version
[ "`./miniupnpd --version | head -1 | cut -d' ' -f-2`" = "miniupnpd `cat $(SRCDIR)/VERSION`" ]
touch $@
validate%: $(SRCDIR)/test%.sh test%
$(SHELL) $<
touch $@
validatessdppktgen: testssdppktgen
./$<
touch $@