patsubst strange behavior when substituting the empty string
Renaud Pacalet <[email protected]> Thu, 29 May 2025 09:43:32 +0200 (CEST)
| Newsgroups | gmane.comp.gnu.make.general |
|---|---|
| Message-ID | <[email protected]> |
I recently observed a strange `patsubst` behavior when substituting the empty string: ``` $ cat Makefile .PHONY: all all:; $(info $(patsubst %.,,1.2)) $ make 1.2 make: Nothing to be done for 'all'. ``` I was expecting: ``` $ make 2 make: Nothing to be done for 'all'. ``` I read the manual twice but I cannot explain this behavior. What did I miss? -- Renaud Pacalet Télécom Paris Campus SophiaTech 450 Route des Chappes, CS 50193 06904 Biot Sophia Antipolis cedex, FRANCE Tel : +33 (0) 4 9300 8402 Web : http://www.telecom-paris.fr/