summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2020-04-20 21:51:13 -0700
committerThomas Groman <tgroman@nuegia.net>2020-04-20 21:51:13 -0700
commit0aa54a6b9135406fffcf52f43f69f8fbb5cdb19f (patch)
tree8e92855ca319d80b5a226e3343b97c2b4473a846 /configure
parentc51a3327b19aadbbc4467263c715d585aef3ca79 (diff)
downloadwebbrowser-0aa54a6b9135406fffcf52f43f69f8fbb5cdb19f.tar
webbrowser-0aa54a6b9135406fffcf52f43f69f8fbb5cdb19f.tar.gz
webbrowser-0aa54a6b9135406fffcf52f43f69f8fbb5cdb19f.tar.lz
webbrowser-0aa54a6b9135406fffcf52f43f69f8fbb5cdb19f.tar.xz
webbrowser-0aa54a6b9135406fffcf52f43f69f8fbb5cdb19f.zip
make webbrowser build with comm configuration and remove more Windows cruft
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 0000000..50ff644
--- /dev/null
+++ b/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+SRCDIR=$(dirname $0)
+TOPSRCDIR="$SRCDIR"
+MOZILLA_SRCDIR="${SRCDIR}/platform"
+export OLD_CONFIGURE="${MOZILLA_SRCDIR}"/old-configure
+
+# Ensure the comm-* values are used.
+export MOZ_SOURCE_CHANGESET=$(hg -R "$TOPSRCDIR" parent --template="{node}" 2>/dev/null)
+export MOZ_SOURCE_REPO=$(hg -R "$TOPSRCDIR" showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/https:/")
+
+# If MOZCONFIG isn't set, use the .mozconfig from the current directory. This
+# overrides the lookup in mozilla-central's configure, which looks in the wrong
+# directory for this file.
+if test -z "$MOZCONFIG" -a -f "$SRCDIR"/.mozconfig; then
+ export MOZCONFIG="$SRCDIR"/.mozconfig
+elif test -z "$MOZCONFIG" -a -f "$SRCDIR"/mozconfig; then
+ export MOZCONFIG="$SRCDIR"/mozconfig
+fi
+
+# Execute the mozilla configure script in the current directory, adding the
+# parameter we need to run comm-central. Since the configure script is really
+# just a wrapper around invoking a python variant, execute the underlying python
+# directly. We use a copy of the underlying configure script to get paths
+# correct.
+set -- "$@" --with-external-source-dir="$TOPSRCDIR"
+which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"