Hi!I needed to use MAKEOVERRIDES for updating a pkgconf (.pc) file. I want it to have the correct directory variables as used when building/installing the library, so if the user specifies 'includedir=/foo/bar' in the command line, the .pc file should be updated with that info.
The rule I had to use is: $(_LIB_pc): $(_LIB_pc_u) Makefile | $$(@D)/ $(info SED $@) sed 's/Version:.*/Version: $(DISTVERSION)/' <$< >$@ sed -i 's,prefix=.*,prefix=$(prefix),' $@ ifneq ($(filter includedir=%,$(MAKEOVERRIDES)),) sed -i 's,includedir=.*,includedir=$(includedir),' $@ endifAs you can see, I need to check if it was overridden in the command line (otherwise, the default 'includedir=${prefix}/include' in the .pc file is fine). And then I do override it.
I had to search some related things in stackoverflow to find this. I think you should document this (and a few others) in 'Other Special Variables' <https://www.gnu.org/software/make/manual/html_node/Special-Variables.html>.
Cheers, Alex -- <http://www.alejandro-colomar.es/>
OpenPGP_signature
Description: OpenPGP digital signature