configure 1.2 KB

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. SRCDIR=$(dirname $0)
  3. TOPSRCDIR="$SRCDIR"
  4. MOZILLA_SRCDIR="${SRCDIR}/platform"
  5. export OLD_CONFIGURE="${MOZILLA_SRCDIR}"/old-configure
  6. # Ensure the comm-* values are used.
  7. export MOZ_SOURCE_CHANGESET=$(hg -R "$TOPSRCDIR" parent --template="{node}" 2>/dev/null)
  8. export MOZ_SOURCE_REPO=$(hg -R "$TOPSRCDIR" showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/https:/")
  9. # If MOZCONFIG isn't set, use the .mozconfig from the current directory. This
  10. # overrides the lookup in mozilla-central's configure, which looks in the wrong
  11. # directory for this file.
  12. if test -z "$MOZCONFIG" -a -f "$SRCDIR"/.mozconfig; then
  13. export MOZCONFIG="$SRCDIR"/.mozconfig
  14. elif test -z "$MOZCONFIG" -a -f "$SRCDIR"/mozconfig; then
  15. export MOZCONFIG="$SRCDIR"/mozconfig
  16. fi
  17. # Execute the mozilla configure script in the current directory, adding the
  18. # parameter we need to run comm-central. Since the configure script is really
  19. # just a wrapper around invoking a python variant, execute the underlying python
  20. # directly. We use a copy of the underlying configure script to get paths
  21. # correct.
  22. set -- "$@" --with-external-source-dir="$TOPSRCDIR"
  23. which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"