summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2017-11-08 12:24:29 +0100
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2017-11-08 12:24:29 +0100
commitee5cd9205248dc002160e8454a6273e100dc57df (patch)
tree3da88a4a0d10b9f6ae28c3ea10b2086f3ee8f9cc
parent0a05ab50c5a6c3aedfc263d8d1288fed33a6214b (diff)
downloadnss-hg-ee5cd9205248dc002160e8454a6273e100dc57df.tar.gz
Bug 1415505 - add clean only target to build.sh, r=ttaubert
Reviewers: ttaubert Reviewed By: ttaubert Differential Revision: https://phabricator.services.mozilla.com/D104
-rwxr-xr-xbuild.sh8
-rw-r--r--help.txt3
2 files changed, 9 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 4960238ac..2db8256d8 100755
--- a/build.sh
+++ b/build.sh
@@ -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 ;;
@@ -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
diff --git a/help.txt b/help.txt
index 15d0fe8ca..03ed36e6c 100644
--- a/help.txt
+++ b/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]
@@ -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