[dpdk-users] mk/rte.vars.mk testopt, not

Ned Kittlitz nkittlitz at anovadata.com
Fri Jul 8 15:27:29 CEST 2016


Hello,

can somebody please explain what is the purpose of these lines in mk/rte.vars.mk?

    # helper: return y if option is set to y, else return an empty string
    testopt = $(if $(strip $(subst y,,$(1)) $(subst $(1),,y)),,y)

    # helper: return an empty string if option is set, else return y
    not = $(if $(strip $(subst y,,$(1)) $(subst $(1),,y)),,y)

I've grepped over the full 16.04 source and there are no other "testopt" hits.
I also grepped over all Makefile and *.mk files for "not" and nothing looks interesting.

I did some quick searching for testopt and gnu make, in case it was some kind of magical thing, but didn't find anything there, either.

DETAILS:

I'm working with somebody who is trying to integrate 16.04 into our environment.  We already have a complex makefile infrastructure, so we probably cannot just follow the documented procedure of including rte.vars.mk near the top of the makefile and then including rte.extapp.mk later in the makefile.

Our standard app makefiles include multiple .mk helper files from our build infrastructure.

Right now our developer can get his external app to build by defining RTE_SDK and RTE_TARGET variables in his makefile, then including $(RTE_SDK)/mk/rte.vars.mk first.
But if we move the rte.vars.mk include down, it is apparently damaging something that one of our other mk helpers established.  I suppose the "SRCDIR" lines are the most likely culprits, but I wanted to understand the testopt/not too.

Thank you,
Ned



More information about the users mailing list