Re: [PATCH v2] build: put object files into build/ folder

Johannes Berg <[email protected]> Fri, 19 Jun 2020 13:26:52 +0200
Newsgroups gmane.linux.drivers.hostap
Message-ID <[email protected]>
On Fri, 2020-06-19 at 13:22 +0200, Johannes Berg wrote:
> 
> -lcov-html: wpa_supplicant.gcda
> -	lcov -c -d .. > lcov.info
> +.PHONY: lcov-html
> +lcov-html: $(call BUILDOBJ,wpa_supplicant.gcda)
> +	lcov -c -d $(BUILDDIR) > lcov.info

IMHO this is a bit odd ... using $(BUILDDIR) (and .. previously) here
will cause it to combine the results for hostapd and wpa_s, even if
you're only in a single of the binaries.

It would now be possible (due to the split build dirs) to actually do
this correctly and get separate reports for the two by using
$(BUILDDIR)/$(PROJ) here instead. Previously, I guess that wasn't really
possible due to the common src/**/*.o files being in-place with the
sources.

But I don't know if it should be changed, so I kept it. Using --codecov
with the testing scripts seems to also still work OK, but it's doing
something else entirely (though it could probably be cleaned up.)


I *did* take care here even that compiling with and without coverage,
which is fundamentally incompatible, will use different directories
underneath build/ (-cov appended or not, respectively), so ...

Anyway, that's nothing I care about much. I really wanted only the bits
where I can build wpa_s and hostapd without doing "make clean" :)

johannes