Skip to content

Commit

Permalink
Bug 1415505 - add clean only target to build.sh, r=ttaubert
Browse files Browse the repository at this point in the history
Reviewers: ttaubert

Reviewed By: ttaubert

Differential Revision: https://phabricator.services.mozilla.com/D104

--HG--
extra : rebase_source : d1ab536b33366ae465549f1dfb56a3a0920da90d
  • Loading branch information
franziskuskiefer committed Nov 8, 2017
1 parent 5e5900b commit 8ed15e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion build.sh
Expand Up @@ -68,6 +68,7 @@ fi
while [ $# -gt 0 ]; do
case $1 in
-c) clean=1 ;;
-cc) clean_only=1 ;;
--gyp|-g) rebuild_gyp=1 ;;
--nspr) nspr_clean; rebuild_nspr=1 ;;
-j) ninja_params+=(-j "$2"); shift ;;
Expand Down Expand Up @@ -124,10 +125,15 @@ dist_dir=$(mkdir -p "$dist_dir"; cd "$dist_dir"; pwd -P)
gyp_params+=(-Dnss_dist_dir="$dist_dir")

# -c = clean first
if [ "$clean" = 1 ]; then
if [ "$clean" = 1 -o "$clean_only" = 1 ]; then
nspr_clean
rm -rf "$cwd"/out
rm -rf "$dist_dir"
# -cc = only clean, don't build
if [ "$clean_only" = 1 ]; then
echo "Cleaned"
exit 0
fi
fi

# This saves a canonical representation of arguments that we are passing to gyp
Expand Down
3 changes: 2 additions & 1 deletion help.txt
@@ -1,4 +1,4 @@
Usage: build.sh [-hcv] [-j <n>] [--nspr] [--gyp|-g] [--opt|-o] [-m32]
Usage: build.sh [-hcv] [-cc] [-j <n>] [--nspr] [--gyp|-g] [--opt|-o] [-m32]
[--test] [--pprof] [--scan-build[=output]] [--ct-verif]
[--asan] [--ubsan] [--msan] [--sancov[=edge|bb|func|...]]
[--disable-tests] [--fuzz[=tls|oss]] [--system-sqlite]
Expand All @@ -14,6 +14,7 @@ NSS build tool options:

-h display this help and exit
-c clean before build
-cc clean without building
-v verbose build
-j <n> run at most <n> concurrent jobs
--nspr force a rebuild of NSPR
Expand Down

0 comments on commit 8ed15e3

Please sign in to comment.