I have a simple Makefile that just contains this target. It looks like this:
SHELL:=/bin/bash clean: rm !(*.tex|Makefile|*.pdf)
When I run this command in bash, it works fine, i.e. does not give errors and deletes the necessary files. However, when I run make clean , it gives the following errors:
$ make clean rm !(*.tex|Makefile|*.pdf) /bin/bash: -c: line 0: syntax error near unexpected token `(' /bin/bash: -c: line 0: `rm !(*.tex|Makefile|*.pdf)' make: *** [clean] Error 1
Has anyone understood what I'm doing wrong? Thanks.
nvcleemp
source share