'Can't run makefile, Nothing to be done for `Makefile_JulianaMarquez_S6C2_EDO_CASA.mk'
So I need to write a makefile to compile and execute two scripts that generate some graphs. The two scripts work perfectly when I call them separately from the terminal, but the makefile shows the error "Nothing to be done for `Makefile_JulianaMarquez_S6C2_EDO_CASA.mk'."
My makefile code:
all :: graficas
graficas :: solucionEDO.png errorEuler.png errorRunge.png
solucionEDO.png :: Plots_JulianaMarquez_S6C2_EDO_CASA.py DatosED.dat
python3 Plots_JulianaMarquez_S6C2_EDO_CASA.py
errorEuler.png :: Plots_JulianaMarquez_S6C2_EDO_CASA.py DatosED.dat
python3 Plots_JulianaMarquez_S6C2_EDO_CASA.py
errorRunge.png :: Plots_JulianaMarquez_S6C2_EDO_CASA.py DatosED.dat
python3 Plots_JulianaMarquez_S6C2_EDO_CASA.py
DatosED.dat :: JulianaMarquez_S6C2_EDO_CASA.exe
./JulianaMarquez_S6C2_EDO_CASA.exe
JulianaMarquez_S6C2_EDO_CASA.exe :: JulianaMarquez_S6C2_EDO_CASA.cpp
g++ -lm JulianaMarquez_S6C2_EDO_CASA.cpp -o JulianaMarquez_S6C2_EDO_CASA.exe
clean :
rm -rf *png graficas
Can someone tell me what I'm doing wrong? I'm calling the .mk file as
make Makefile_JulianaMarquez_S6C2_EDO_CASA.mk
Solution 1:[1]
This is wrong:
make Makefile_JulianaMarquez_S6C2_EDO_CASA.mk
The arguments to the make program tell it to build that target. The above command asks make "please build the target Makefile_JulianaMarquez_S6C2_EDO_CASA.mk". Make will oblige, see that that file already exists and that there are no recipes available on how to update it, so it says "nothing to be done". And it's right.
If you want to tell make what makefile to use, use the -f option:
make -f Makefile_JulianaMarquez_S6C2_EDO_CASA.mk
See the GNU make manual, or run man make to see the command line syntax for make.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MadScientist |
