Why .SECONDARY does not work with patterns (%) while .PRECIOUS does?

Thanks to Alex (see answer) i went further in my search. What i found is that it is recorded in TODO.private of make project for 15 years …. Using git://git.savannah.gnu.org/make.git you can see history of TODO.private content : 6) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY pseudo-targets have different capabilities. For example, .PRECIOUS can take … Read more

How to get current relative directory of your Makefile?

The shell function. You can use shell function: current_dir = $(shell pwd). Or shell in combination with notdir, if you need not absolute path: current_dir = $(notdir $(shell pwd)). Update. Given solution only works when you are running make from the Makefile’s current directory. As @Flimm noted: Note that this returns the current working directory, … Read more