3 # Some of our makefiles depend on GNU make, so we set some sane defaults if MAKE
6 "FreeBSD" |
"OpenBSD" )
14 # Check the preserve-libs CL option
19 --preserve-libs ) preserve_libs
=true
;;
23 # (We don't attempt to clean up every last file here - output in
24 # binaries/system/ will still be there, etc. This is mostly just
25 # to quickly fix problems in the bundled dependencies.)
28 # Now in build/workspaces/ (where we assume this script resides)
30 if [ "$preserve_libs" != "true" ]; then
31 echo "Cleaning bundled third-party dependencies..."
33 (cd ..
/..
/libraries
/source
/fcollada
/src
&& rm -rf .
/output
)
34 (cd ..
/..
/libraries
/source
/fcollada
&& rm -f .already-built
)
35 (cd ..
/..
/libraries
/source
/nvtt
/src
&& rm -rf .
/build
)
36 (cd ..
/..
/libraries
/source
/nvtt
&& rm -f .already-built
)
37 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -f .already-built
)
38 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/lib
/*.a
&& rm -rf .
/lib
/*.so
)
39 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/include-unix-debug
)
40 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/include-unix-release
)
41 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs-68.12
.1)
44 # Still delete the directory of previous SpiderMonkey versions to
45 # avoid wasting disk space if people clean workspaces after updating.
46 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs-62.9
.1)
47 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs-52.9
.1pre1
)
48 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs-45.0
.2)
49 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs-38.0
.0)
50 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs-38.0
.0)
51 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs31
)
52 (cd ..
/..
/libraries
/source
/spidermonkey
&& rm -rf .
/mozjs24
)
54 # Delete former premake5 gmake.* directories
55 (cd ..
/premake
/premake
5/build
&& rm -rf .
/gmake.bsd
)
56 (cd ..
/premake
/premake
5/build
&& rm -rf .
/gmake.macosx
)
57 (cd ..
/premake
/premake
5/build
&& rm -rf .
/gmake.unix
)
59 # Cleanup current premake directories
60 (cd ..
/premake
/premake
5/build
/gmake2.bsd
&& ${MAKE} clean
)
61 (cd ..
/premake
/premake
5/build
/gmake2.macosx
&& ${MAKE} clean
)
62 (cd ..
/premake
/premake
5/build
/gmake2.unix
&& ${MAKE} clean
)
64 echo "Removing generated stub and test files..."
66 find ..
/..
/source -name "stub_*.cpp" -type f
-exec rm {} \
;
67 find ..
/..
/source -name "test_*.cpp" -type f
-not -name "test_setup.cpp" -exec rm {} \
;
69 echo "Cleaning build output..."
71 # Remove workspaces/gcc if present
73 # Remove workspaces/codeblocks if present
75 # Remove workspaces/xcode3 if present
77 # Remove workspaces/xcode4 if present
81 echo "Done. Try running update-workspaces.sh again now."