1+ .PHONY : all
12all : hello
23
3- hello : main.o factorial.o hello.o
4- g++ main.o factorial.o hello.o -o hello
4+ .PHONY : hello
5+ hello : main.o factorial.o \
6+ hello.o $(first) $($(filter second,second)) \
7+ # This is a long \
8+ comment inside prerequisites.
9+ g++ main.o factorial.o hello.o -o hello
10+
11+ # There are a building steps \
12+ below. And the tab is at the beginning of this line.
513
614main.o : main.cpp
7- g++ -c main.cpp
15+ g++ -c main.cpp
816
917factorial.o : factorial.cpp
10- g++ -c factorial.cpp
18+ g++ -c factorial.cpp $( fake_variable )
1119
12- hello.o : hello.cpp
13- g++ -c hello.cpp
20+ hello.o : hello.cpp \
21+ $(Colorizing with tabs at the beginning of the second line of prerequisites )
22+ g++ -c hello.cpp -o $@
1423
24+ .PHONY : clean
1525clean :
16- rm *o hello
26+ rm * o hello
1727
1828define defined
19- $(info Checkng existance of $(1 ) )
20- $(if ifeq " $(flavor $(1 ) ) " "undefined" ,0,1)
29+ $(info Checking existance of $(1 ) $(flavor $( 1 ) ) )
30+ $(if $( filter undefined, $(flavor $(1 ) ) ) ,0,1)
2131endef
2232
23- ifeq ($(call defined,TOP_DIR) ,0)
24- TOP_DIR must be set before including paths.mk
33+ ifeq ($(strip $( call defined,TOP_DIR) ) ,0)
34+ $(info TOP_DIR must be set before including paths.mk)
2535endif
2636
27- include $(TOP_DIR ) 3rdparty.mk
37+ - include $(TOP_DIR ) 3rdparty.mk
2838
29- ifeq ($(call defined,CODIT_DIR) ,0)
30- CODIT_DIR must be set in $(TOP_DIR)3rdparty.mk
39+ ifeq ($(strip $( call defined,CODIT_DIR) ) ,0)
40+ $(info CODIT_DIR must be set in $(TOP_DIR)3rdparty.mk)
3141endif
0 commit comments