Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add the clean-env and updated the clean command.
  • Loading branch information
ezio-melotti committed May 6, 2022
commit c931962174b8e3c0a547bc0aadee006468c37c58
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ help:
@echo " venv to create a venv with necessary tools"
@echo " html to make standalone HTML files"
@echo " htmlview to open the index page built by the html target in your browser"
@echo " clean to remove the venv and build files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
Expand All @@ -39,9 +40,12 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " check to run a check for frequent markup errors"

clean:
clean: clean-venv
-rm -rf $(BUILDDIR)/*

clean-venv:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include clean-venv in the help?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't included in CPython, and I think that's because:

  1. if you try to recreate the venv, it already tells you to use make clean-venv
  2. if you run make clean it also cleans the venv

Because of these reasons and for consistency with CPython, I decided to leave it out.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, sounds good.

rm -rf $(VENVDIR)

venv:
@if [ -d $(VENVDIR) ] ; then \
echo "venv already exists."; \
Expand Down