Skip to content

Commit

Permalink
mk: removing extraneous .ml files after extracting
Browse files Browse the repository at this point in the history
Helps when renaming modules.
  • Loading branch information
mtzguido committed Jan 9, 2025
1 parent c72e8b7 commit 3e1a783
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mk/fstar-12.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,10 @@ depend: $(CACHE_DIR)/.depend$(TAG)
include $(CACHE_DIR)/.depend$(TAG)

all-ml: $(ALL_ML_FILES)
@# Remove extraneous .ml files, which can linger after
@# module renamings. The realpath is necessary to prevent
@# discrepancies between absolute and relative paths, double
@# slashes, etc.
rm -vf $(filter-out $(realpath $(ALL_ML_FILES)), $(realpath $(wildcard $(OUTPUT_DIR)/*.ml)))

all-checked: $(ALL_CHECKED_FILES)
7 changes: 7 additions & 0 deletions mk/lib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,11 @@ all-checked: $(ALL_CHECKED_FILES)
# These targets imply verification of every file too, regardless
# of extraction.
all-ml: all-checked $(ALL_ML_FILES)
@# Remove extraneous .ml files, which can linger after
@# module renamings. The realpath is necessary to prevent
@# discrepancies between absolute and relative paths, double
@# slashes, etc.
rm -vf $(filter-out $(realpath $(ALL_ML_FILES)), $(realpath $(wildcard $(OUTPUT_DIR)/*.ml)))

all-fs: all-checked $(ALL_FS_FILES)
rm -vf $(filter-out $(realpath $(ALL_FS_FILES)), $(realpath $(wildcard $(OUTPUT_DIR)/*.fs)))
5 changes: 5 additions & 0 deletions mk/plugins.mk
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,8 @@ depend: $(CACHE_DIR)/.depend$(TAG)
include $(CACHE_DIR)/.depend$(TAG)

all-ml: $(ALL_ML_FILES)
@# Remove extraneous .ml files, which can linger after
@# module renamings. The realpath is necessary to prevent
@# discrepancies between absolute and relative paths, double
@# slashes, etc.
rm -vf $(filter-out $(realpath $(ALL_ML_FILES)), $(realpath $(wildcard $(OUTPUT_DIR)/*.ml)))

0 comments on commit 3e1a783

Please sign in to comment.