On Tue, Nov 20, 2018 at 01:17:28PM +0200, Eric Blake wrote: > Adding a new qapi module had some rather tedious repetition to > wire it into Makefile, Makefile.objs, and .gitignore (for example, > see commit bf42508f and its followup b61acdec). For make, add some > indirection by taking advantage of GNU Make string processing to > expand a list of module names into all the required artifacts, so > that future additions of a new module need only touch the list of > module names. And for gitignore, use globs to cover all generated > file names. > > The list has to live in Makefile.objs, due to the way that > our unnest-vars macro slirps in that file without remembering > any definition of $(QAPI_MODULES) from Makefile. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> > Reviewed-by: Markus Armbruster <arm...@redhat.com> > --- > v3: also tweak .gitignore [Dan] > v2: also condense Makefile.objs, prefer $(FOO:%=a%b) over > $(patsubst %,a%b,$(FOO)) > ---
Used it to integrate a new QMP message for pvrdma device and it indeed makes effort minimal. So: Tested-by: Yuval Shaia <yuval.sh...@oracle.com> Thanks, Yuval > Makefile | 192 ++++++-------------------------------------------- > Makefile.objs | 75 ++------------------ > .gitignore | 72 ++----------------- > 3 files changed, 34 insertions(+), 305 deletions(-) >