I've a makefile that is suppose to repeat an execution of a c code (BootstrapCL.c) one time for each file.csv in the directory. For each execution it should give in input to the c code (as argv) 2 string: the name, with and without extention, of the input csv file used in the current execution. This is the makefile content:
SRCS := $(wildcard *.csv)
BINS := $(SRCS:%.csv=%)
all: ${BINS}
%: BootstrapCL.c
gcc -Wall BootstrapCL.c -lm -o BootstrapCL
./BootstrapCL $@.csv $@
The problem is that, after the execution of all the group of csv file (iI'd like to execute only the target inside ${BINS} list) , it also run a last execution with "all" target. Of course I don't have any all.csv file in my folder; I think I'm using $@ in the wrong way but I don't understand why and how to fix the issue, any idea?