In my assignment, the professor asks to remove all
generated files with a "clean" target. The problem with that
is that the user can specify the names of the files he wants
to generate. The user can generate multiple files. So I've set up
the following:
That gives me a syntax error. Any suggestions.Code:my_files = main.c funcs.c funcs.h Makefile README dir = `ls` clean: @for file in $(dir); do\ @for my_file in $(my_files); do\ if [ $$file != $$my_file ]; then\ rm $$file;\ fi;\ done;\ done;