I have a lot of files that with .e extension, and I have a custom program that can process and convert them.
the custom program take input_file_name and output_file_name
./custom [input] output
It needs the [] around the input_file_name.
I used wildcard to get the name of all the .e files
FILES = $(wildcard *.e)
and I made it a phony target
.PHONY convert
convert:
./convert [$(FILES)] $(FILES).u
The issue that I have is that $(FILES) pass the whole list at once. For example, a.e b.e c.e. All the file's name are separated by one space.
a.e b.e c.e
I also tried foreach
$(foreach i, $(FILES), $(EXEC) [$(i)] $(basename .u))
It still feed the whole string to the program.
Please help. How to only use gnu make build in function to do this?