Consider 2 makefile target triggers:
make print # Print everything
make print filter=topic-a # Print only topic-a
Now, inside Makefile target, the filter functionality is realised via some command's flag, like this:
print:
some_command --arg --anotherarg \
--filter <filter>
In some cases, the command doesn't handle an empty --filter very well, so the question is..
Question
How to add/remove --filter <filter conditionally inside Makefile target based on whether the param has been passed to the make itself (make print filter=topic-a)?