Sample Header Ad - 728x90

Why doesn't `rm -f *.{log,pdf,bbl,blg,aux}` work in a Makefile? How to repair?

0 votes
0 answers
31 views
In someone's Makefile, I saw
clean:
	rm -f *.{log,pdf,bbl,blg,aux}
Upon running make clean, all the files were still there as before; nothing was removed. So what's the analogon of a shell's rm -f *.{log,pdf,bbl,blg,aux} in GNU Makefile? Do we really have to spell out $(RM) *.log *.pdf *.bbl *.blg *.aux in full? EDIT: I've been made aware that adding SHELL := /bin/bash to the top would do. Isn't there a more shell-independent way of removing all files with given extensions in the clean recipe of a Makefile?
Asked by AlMa1r (1 rep)
Mar 8, 2025, 08:31 PM
Last activity: Mar 8, 2025, 09:37 PM