Skip to content

Commit cc16950

Browse files
makenowjustMartin Verzilli
authored and
Martin Verzilli
committedJun 2, 2017
Makefile: add 'clean_crystal' target (#4268)
It is useful in compiler development cycle. $ vim src/... # edit compiler sources (but incomplete) $ make crystal # oops! maked incompilable compiler... $ make crystal # failed because compiler does not work At such time I don't want to use `make clean` because it removes `libcrystal` and `llvmext` also. I don't want to build C++ files again, so I added `clean-crystal` target in Makefile. It removes the files built by `crystal` command. Now, we can use `make clean_crystal crystal` to recompile `crystal` after removing compiler itself.
1 parent 2c8fead commit cc16950

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

Diff for: ‎Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,11 @@ $(LIB_CRYSTAL_TARGET): $(LIB_CRYSTAL_OBJS)
123123
$(AR) -rcs $@ $^
124124

125125
.PHONY: clean
126-
clean: ## Clean up built directories and files
127-
rm -rf $(O)
128-
rm -rf ./doc
126+
clean: clean_crystal ## Clean up built directories and files
129127
rm -rf $(LLVM_EXT_OBJ)
130128
rm -rf $(LIB_CRYSTAL_OBJS) $(LIB_CRYSTAL_TARGET)
129+
130+
.PHONY: clean_crystal
131+
clean_crystal: ## Clean up crystal built files
132+
rm -rf $(O)
133+
rm -rf ./doc

0 commit comments

Comments
 (0)
Please sign in to comment.