diff --git a/.gitignore b/.gitignore index 8441d718c..ebdbc04eb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.md.lua *.md.lean *.olean +*.clean *.d a.out build diff --git a/library/Makefile.common b/library/Makefile.common index a22227218..1ece757e0 100644 --- a/library/Makefile.common +++ b/library/Makefile.common @@ -8,7 +8,7 @@ all: $(OLEAN_FILES) $(DEP_FILES) %.olean: %.lean @rm -f $@ - $(LEAN) $(LEAN_OPTIONS) $< -o $@ + $(LEAN) $(LEAN_OPTIONS) $< -o $@ -c $(@:.olean=.clean) %.d: %.lean @echo Making dependency file \'$@\' ... @@ -25,4 +25,5 @@ all: $(OLEAN_FILES) $(DEP_FILES) clean: find . -type f -name "*.olean" -delete + find . -type f -name "*.clean" -delete find . -type f -name "*.d" -delete diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6e51dc113..b4cb8f44b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -330,5 +330,5 @@ endif() add_custom_target(clean-olean WORKING_DIRECTORY ${LEAN_SOURCE_DIR}/../library - COMMAND find . -type f -name '*.olean' -delete && find . -type f -name '*.d' -delete + COMMAND find . -type f -name '*.olean' -delete && find . -type f -name '*.d' -delete && find . -type f -name '*.clean' -delete )