List goals/targets in GNU make that contain variables in their definition
问题 I have a fairly large makefile that creates a number of targets on the fly by computing names from variables. (eg foo$(VAR) : $(PREREQS)). Is there any way that gnu make can be convinced to spit out a list of targets after it has expanded these variables? I'd like to be able to get the targets for an aribitrary makefile. I'm trying to write a completion function for my shell. 回答1: Can you parse the output from make -pn (i.e. make --print-data-base --dry-run )? It prints out all the variables,