Skip to content

Commit

Permalink
Merge pull request #3535 from mtzguido/clean
Browse files Browse the repository at this point in the history
Makefile: fix clean rule
  • Loading branch information
mtzguido authored Oct 7, 2024
2 parents f71dc10 + 29f634a commit 4962891
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
4 changes: 0 additions & 4 deletions .docker/build/build_funs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ function fstar_default_build () {
return 1
fi

# Clean temporary build files, not needed and saves
# several hundred MB
make clean-buildfiles || true

export_home FSTAR "$(pwd)"

wait # for fetches above
Expand Down
14 changes: 1 addition & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,9 @@ package: all
# Removes everything created by `make all`. MUST NOT be used when
# bootstrapping.
.PHONY: clean
clean: clean-intermediate clean-buildfiles
clean: clean-intermediate
$(call msg, "CLEAN")
$(Q)cd $(DUNE_SNAPSHOT) && { dune uninstall --prefix=$(FSTAR_CURDIR) || true ; }

# Clean temporary dune build files, while retaining all checked files
# and installed files. Used to save space after building, particularly
# after CI. Note we have to keep fstar.install or otherwise `dune
# uninstall` cannot work.
.PHONY: clean-buildfiles
clean-buildfiles:
$(call msg, "CLEAN BUILDFILES")
$(Q)cp -f $(DUNE_SNAPSHOT)/_build/default/fstar.install ._fstar.install
$(Q)cd $(DUNE_SNAPSHOT) && { dune clean || true ; }
$(Q)mkdir -p $(DUNE_SNAPSHOT)/_build/default/
$(Q)cp -f ._fstar.install $(DUNE_SNAPSHOT)/_build/default/fstar.install

# Removes all .checked files and other intermediate files
# Does not remove the object files from the dune snapshot.
Expand Down
8 changes: 4 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ clean: clean-ocaml
# --------------------------------------------------------------------

clean_boot:
rm -rf .cache.boot
rm -f ._depend
rm -f .depend
$(Q)rm -rf .cache.boot
$(Q)rm -f ._depend
$(Q)rm -f .depend

# --------------------------------------------------------------------------------
# Now we have some make targets wrap calls to other makefiles,
Expand All @@ -31,7 +31,7 @@ ocaml:
$(Q)+$(MAKE) -f Makefile.boot all-ml

clean-ocaml: clean_boot
+$(MAKE) -C ocaml-output clean
+$(Q)$(MAKE) -C ocaml-output clean

# --------------------------------------------------------------------
# Testing
Expand Down

0 comments on commit 4962891

Please sign in to comment.