@@ -41,6 +41,7 @@ LLVM_EXT_OBJ = $(LLVM_EXT_DIR)/llvm_ext.o
41
41
LIB_CRYSTAL_SOURCES = $(shell find src/ext -name '* .c')
42
42
LIB_CRYSTAL_OBJS = $(subst .c,.o,$(LIB_CRYSTAL_SOURCES ) )
43
43
LIB_CRYSTAL_TARGET = src/ext/libcrystal.a
44
+ DEPS = $(LLVM_EXT_OBJ ) $(LIB_CRYSTAL_TARGET )
44
45
CFLAGS += -fPIC $(if $(debug ) ,-g -O0)
45
46
CXXFLAGS += $(if $(debug ) ,-g -O0)
46
47
@@ -71,15 +72,15 @@ help: ## Show this help
71
72
awk ' BEGIN {FS = "## "}; /^## [a-zA-Z_-]/ {printf " \033[36m%s\033[0m\n", $$2}; /^## / {printf " %s\n", $$2}'
72
73
73
74
.PHONY : spec
74
- spec : all_spec # # Run all specs
75
+ spec : $( O ) / all_spec # # Run all specs
75
76
$(O ) /all_spec $(VERBOSE )
76
77
77
78
.PHONY : std_spec
78
- std_spec : all_std_spec # # Run standard library specs
79
+ std_spec : $( O ) /std_spec # # Run standard library specs
79
80
$(O ) /std_spec $(VERBOSE )
80
81
81
82
.PHONY : compiler_spec
82
- compiler_spec : all_compiler_spec # # Run compiler specs
83
+ compiler_spec : $( O ) /compiler_spec # # Run compiler specs
83
84
$(O ) /compiler_spec $(VERBOSE )
84
85
85
86
.PHONY : doc
@@ -89,29 +90,19 @@ doc: ## Generate standard library documentation
89
90
.PHONY : crystal
90
91
crystal : $(O ) /crystal # # Build the compiler
91
92
92
- .PHONY : all_spec all_std_spec all_compiler_spec
93
- all_spec : $(O ) /all_spec
94
- all_std_spec : $(O ) /std_spec
95
- all_compiler_spec : $(O ) /compiler_spec
96
-
97
- .PHONY : llvm_ext libcrystal deps
98
- llvm_ext : $(LLVM_EXT_OBJ )
99
- libcrystal : $(LIB_CRYSTAL_TARGET )
100
- deps : llvm_ext libcrystal
101
-
102
- $(O ) /all_spec : deps $(SOURCES ) $(SPEC_SOURCES )
93
+ $(O ) /all_spec : $(DEPS ) $(SOURCES ) $(SPEC_SOURCES )
103
94
@mkdir -p $(O )
104
95
$(BUILD_PATH ) ./bin/crystal build $(FLAGS ) -o $@ spec/all_spec.cr
105
96
106
- $(O ) /std_spec : deps $(SOURCES ) $(SPEC_SOURCES )
97
+ $(O ) /std_spec : $( DEPS ) $(SOURCES ) $(SPEC_SOURCES )
107
98
@mkdir -p $(O )
108
99
$(BUILD_PATH ) ./bin/crystal build $(FLAGS ) -o $@ spec/std_spec.cr
109
100
110
- $(O ) /compiler_spec : deps $(SOURCES ) $(SPEC_SOURCES )
101
+ $(O ) /compiler_spec : $( DEPS ) $(SOURCES ) $(SPEC_SOURCES )
111
102
@mkdir -p $(O )
112
103
$(BUILD_PATH ) ./bin/crystal build $(FLAGS ) -o $@ spec/compiler_spec.cr
113
104
114
- $(O ) /crystal : deps $(SOURCES )
105
+ $(O ) /crystal : $( DEPS ) $(SOURCES )
115
106
@mkdir -p $(O )
116
107
$(BUILD_PATH ) $(EXPORTS ) ./bin/crystal build $(FLAGS ) -o $@ src/compiler/crystal.cr -D without_openssl -D without_zlib
117
108
0 commit comments