From 1b39754b6c2b5c767aba3d1f9e85ae6c956a84cc Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Sat, 20 Feb 2021 12:47:48 +0100
Subject: [PATCH] [Makefile] fix smoke-test/static-analysis target

This adds yet another target "smoke-test-suite", which just runs all
tests in the 'smoke' test suite. The static-analysis target was
changed to include *all* static analysis thingies we have, even 'doc'
as Doxygen does also do some checks that the documentation is
"correct".

The smoke-test target is also kept, as it allows developers to simply
run all smoke tests. Furthermore, this adds some missing PHONY
declarations in the Makefile.

The gitlab-ci now runs the smoke-test-suite and static-analysis
targets in two different jobs. Previously the smoke-test would also
run the static-analysis target, which was not intended.
---
 .gitlab-ci.yml | 4 ++--
 Makefile       | 9 +++++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9cbd9bf7..c3fed23b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,9 +32,9 @@ stages:
   - smoke-test
   - test
 
-smoke-test:
+smoke-test-suite:
   stage: smoke-test
-  script: make smoke-test
+  script: make smoke-test-suite
 
 static-analysis-with-emper-io:
   stage: smoke-test
diff --git a/Makefile b/Makefile
index efbfa488..e8d9aa05 100644
--- a/Makefile
+++ b/Makefile
@@ -41,12 +41,17 @@ else
 $(warning old mesion version $(MESON_VERSION) detected, meson >= 0.52 required for clang-tidy)
 endif
 
-static-analysis: all
+.PHONY: static-analysis
+static-analysis: all check-format check-license doc
 	$(NINJA) -C build $(STATIC_ANALYSIS_NINJA_TARGETS)
 
-smoke-test: all check-format check-license doc static-analysis
+.PHONY: smoke-test-suite
+smoke-test-suite: all
 	cd build && meson test --suite smoke
 
+.PHONY: smoke-test
+smoke-test: smoke-test-suite static-analysis
+
 TEST_NINJA_TARGETS += test
 
 doc: all
-- 
GitLab