Patchwork Build everything on request

login
register
about
Submitter Patrick Georgi
Date 2014-08-09 17:03:37
Message ID <53E65469.7050009@georgi-clan.de>
Download mbox | patch
Permalink /patch/4231/
State Accepted
Headers show

Comments

Patrick Georgi - 2014-08-09 17:03:37
Hi,

attached patch adds a BUILD_EVERYTHING flag to Makefile
that sets all CONFIG_* flags to "yes" if they were "no".

This provides a comfortable way to ensure maximum code exposure
to tools like coverity[0] or clang's scan-build.

BUILD_EVERYTHING will likely fail on non-Linux/x86 systems,
but it seems that's a hard dependency to compile everything at
this time, so well...

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>


Regards,
Patrick

[0] https://scan.coverity.com/projects/1020
Stefan Tauner - 2014-08-09 23:19:26
On Sat, 09 Aug 2014 19:03:37 +0200
Patrick Georgi <patrick@georgi-clan.de> wrote:

> BUILD_EVERYTHING will likely fail on non-Linux/x86 systems,
> but it seems that's a hard dependency to compile everything at
> this time, so well...

I guess you fell for one of carldani's traps... in a positive way
though: it works fine and impossible configs dont get set to yes
eventually (no idea how it really works :)
I have successfully tested it with mingw: e.g. dediprog and print wiki
were enabled.
Stefan Tauner - 2015-01-19 20:02:57
On Sat, 09 Aug 2014 19:03:37 +0200
Patrick Georgi <patrick@georgi-clan.de> wrote:

> Hi,
> 
> attached patch adds a BUILD_EVERYTHING flag to Makefile
> that sets all CONFIG_* flags to "yes" if they were "no".
> 
> This provides a comfortable way to ensure maximum code exposure
> to tools like coverity[0] or clang's scan-build.
> 
> BUILD_EVERYTHING will likely fail on non-Linux/x86 systems,
> but it seems that's a hard dependency to compile everything at
> this time, so well...
> 
> Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>

Thank you Patrick! As I wrote already, it works even better than you
thought.
I have slightly changed it to use CONFIG_EVERYTHING instead of your
naming and committed it in r1869 as
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

BTW... how do I make this available in coverity? I don't see a setting
to configure any build parameters.

Patch

Index: Makefile
===================================================================
--- Makefile	(Revision 1841)
+++ Makefile	(Arbeitskopie)
@@ -455,6 +455,14 @@ 
 # Disable wiki printing by default. It is only useful if you have wiki access.
 CONFIG_PRINT_WIKI ?= no
 
+# Enable all features
+# Will fail on non-Linux/x86
+ifeq ($(BUILD_EVERYTHING), yes)
+$(foreach var,$(filter CONFIG_%,$(.VARIABLES)),\
+	$(if $(filter no,$($(var))),\
+		$(eval $(var)=yes)))
+endif
+
 # Bitbanging SPI infrastructure, default off unless needed.
 ifeq ($(CONFIG_RAYER_SPI), yes)
 override CONFIG_BITBANG_SPI = yes