@@ -134,6 +134,10 @@ clean-unix:
134134 @find . -type d -name " junit" -exec rm -rf {} +
135135 @find python -name " *.so" -delete
136136 @find python -name " *.pyd" -delete
137+ @# Clean all target directories in crates (in case they were built independently)
138+ @find crates -type d -name " target" -exec rm -rf {} +
139+ @find python -type d -name " target" -exec rm -rf {} +
140+ @# Clean the root workspace target directory
137141 @cargo clean
138142
139143.PHONY : clean-windows-ps
@@ -149,6 +153,9 @@ clean-windows-ps:
149153 @powershell -Command " Get-ChildItem -Path . -Recurse -Directory -Filter '.hypothesis' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
150154 @powershell -Command " Get-ChildItem -Path . -Recurse -Directory -Filter 'junit' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
151155 @powershell -Command " Get-ChildItem -Path python -Recurse -File -Include '*.so','*.pyd' | Remove-Item -Force -ErrorAction SilentlyContinue"
156+ @# Clean all target directories in crates
157+ @powershell -Command " Get-ChildItem -Path crates -Recurse -Directory -Filter 'target' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
158+ @powershell -Command " Get-ChildItem -Path python -Recurse -Directory -Filter 'target' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue"
152159 @cargo clean
153160
154161.PHONY : clean-windows-cmd
@@ -164,6 +171,9 @@ clean-windows-cmd:
164171 -@for /f " delims=" %%d in (' dir /s /b /ad .hypothesis 2^>nul' ) do @rd /s /q " %%d" 2> nul
165172 -@for /f " delims=" %%d in (' dir /s /b /ad junit 2^>nul' ) do @rd /s /q " %%d" 2> nul
166173 -@for /f " delims=" %%f in (' dir /s /b python\*.so python\*.pyd 2^>nul' ) do @del " %%f" 2> nul
174+ -@REM Clean all target directories in crates
175+ -@for /f " delims=" %%d in (' dir /s /b /ad crates\target 2^>nul' ) do @rd /s /q " %%d" 2> nul
176+ -@for /f " delims=" %%d in (' dir /s /b /ad python\target 2^>nul' ) do @rd /s /q " %%d" 2> nul
167177 -@cargo clean
168178
169179.PHONY : pip-install-uv
0 commit comments