So I have this makefile and I want the target all just to invoke the target expertest, but apparently the way I'm doing it is wrong because i'm getting the error "make: exprtest: Command not found make: * [all] Error 127 " this is the makefile:
all:
exprtest
exprtest: exptrtest.o driver.o parser.tab.o scanner.o
g++ -Wall -g -o exprtest exptrtest.o driver.o parser.tab.o scanner.o
driver.o: driver.cpp scanner.hpp driver.hpp
g++ -Wall -g -c driver.cpp
parser.tab.o: parser.tab.hpp parser.tab.cpp
bison parser.ypp
g++ -Wall -g -c parser.tab.cpp
scanner.o: scanner.cpp scanner.hpp
flex -t scanner.ll > scanner.cpp
g++ -Wall -g -c scanner.cpp
clean:
rm parser.tab.hpp parser.tab.cpp scanner.cpp
And you can always have make
call a new instance of make
.
For example:
all:
$(MAKE) exprtest
exprtest:
do exprtest stuff
Typing make all
will indirectly do make exprtest
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With