src: add support for host build check, for Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-11-17 12:59:39 +01:00
parent ff69fcfa69
commit 005eb58958
10 changed files with 101 additions and 1 deletions
+5 -1
View File
@@ -11,6 +11,9 @@ bmake = $(MAKE) -C buildroot O=$(O) $1
all: $(config) buildroot/Makefile all: $(config) buildroot/Makefile
@+$(call bmake,$@) @+$(call bmake,$@)
check dep:
@make -C src $@
$(config): $(config):
@+$(call bmake,list-defconfigs) @+$(call bmake,list-defconfigs)
@echo "\e[7mERROR: No configuration selected.\e[0m" @echo "\e[7mERROR: No configuration selected.\e[0m"
@@ -25,4 +28,5 @@ $(config):
buildroot/Makefile: buildroot/Makefile:
@git submodule update --init @git submodule update --init
.PHONY: all .PHONY: all check
+4
View File
@@ -0,0 +1,4 @@
/staging/
/GPATH
/GRTAGS
/GTAGS
+19
View File
@@ -0,0 +1,19 @@
# Host build of critical components, for Coverity Scan mostly
APPS = confd statd factory
all:
@echo "*** all not supported, only check possible ***"
false
dep: libsrx
(cd $< && make -f check.mk $@)
check: $(APPS)
rm -rf staging
$(APPS): libsrx
(cd $@ && make -f check.mk)
.PHONY: libsrx
libsrx:
(cd $@ && make -f check.mk)
+8
View File
@@ -0,0 +1,8 @@
# Used by ../Makefile for 'make check' and Coverity Scan
export PKG_CONFIG_PATH = $(CURDIR)/../staging/lib/pkgconfig
all:
./autogen.sh
./configure
make all
make distclean
+1
View File
@@ -0,0 +1 @@
factory
+5
View File
@@ -0,0 +1,5 @@
# Used by ../Makefile for 'make check' and Coverity Scan
all:
make all
make clean
+34
View File
@@ -0,0 +1,34 @@
*~
*.o
*.la
*.lo
*.so
.deps
.libs
/aclocal.m4
/autom4te.cache/
/aux
/clixon.xml
/compile
/config.h
/config.h.in
/config.guess
/config.log
/config.status
/config.sub
/configure
/depcomp
/install-sh
/libtool
/ltmain.sh
/m4
/missing
/stamp-h1
GPATH
GRTAGS
GTAGS
Makefile
Makefile.in
src/libsrx.pc
+14
View File
@@ -0,0 +1,14 @@
# Used by ../Makefile for 'make check' and Coverity Scan
all:
./configure
make all
make distclean
# Normal build, for apps to link to during check
dep:
./autogen.sh
./configure --prefix=$(CURDIR)/../staging
make all
make install
make distclean
+3
View File
@@ -0,0 +1,3 @@
*~
*.o
statd
+8
View File
@@ -0,0 +1,8 @@
# Used by ../Makefile for 'make check' and Coverity Scan
export CPPFLAGS = -I$(CURDIR)/../staging/include
export LDLIBS = -L$(CURDIR)/../staging/lib -L/usr/lib/x86_64-linux-gnu
all:
make all
make clean