Commit 34acd91e authored by Yushin Washio's avatar Yushin Washio
Browse files

Makefile: test requires the program to be built first; executable name changed...

Makefile: test requires the program to be built first; executable name changed from main.o to hello-ci
parent 62c87c82
EXECUTABLE_NAME=hello-ci
.PHONY: test
all: main.o
all: $(EXECUTABLE_NAME)
hello-ci: main.out
mv $< $@
%.o: %.cpp
%.out: %.cpp
$(CXX) -o $@ $<
clean:
-$(RM) *.o
test:
if [ "`./main.o`" = "Not Hello, World!" ] ; \
test: $(EXECUTABLE_NAME)
if [ "`./$(EXECUTABLE_NAME)`" = "Not Hello, World!" ] ; \
then echo test succeeded ; true; \
else echo test failed ; false; \
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment