Backed out changeset c6bf16ef15dc (bug 1957023) by developer request a=backout
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -53,6 +53,9 @@ ID
|
|||||||
/mozconfig*
|
/mozconfig*
|
||||||
/.moz-fast-forward
|
/.moz-fast-forward
|
||||||
/.moz-vendoring
|
/.moz-vendoring
|
||||||
|
/old-configure
|
||||||
|
/config.cache
|
||||||
|
/config.log
|
||||||
/.clang_complete
|
/.clang_complete
|
||||||
/machrc
|
/machrc
|
||||||
/.machrc
|
/.machrc
|
||||||
@@ -110,6 +113,10 @@ toolkit/components/translations/bergamot-translator/thirdparty
|
|||||||
/js/src/*-obj/
|
/js/src/*-obj/
|
||||||
/js/src/obj-*/
|
/js/src/obj-*/
|
||||||
|
|
||||||
|
# SpiderMonkey configury
|
||||||
|
js/src/old-configure
|
||||||
|
js/src/autom4te.cache
|
||||||
|
|
||||||
# SpiderMonkey test result logs
|
# SpiderMonkey test result logs
|
||||||
js/src/tests/results-*.html
|
js/src/tests/results-*.html
|
||||||
js/src/tests/results-*.txt
|
js/src/tests/results-*.txt
|
||||||
|
|||||||
@@ -49,6 +49,9 @@
|
|||||||
^mozconfig*
|
^mozconfig*
|
||||||
^\.moz-fast-forward
|
^\.moz-fast-forward
|
||||||
^\.moz-vendoring
|
^\.moz-vendoring
|
||||||
|
^old-configure$
|
||||||
|
^config\.cache$
|
||||||
|
^config\.log$
|
||||||
^\.clang_complete
|
^\.clang_complete
|
||||||
^machrc$
|
^machrc$
|
||||||
^\.machrc$
|
^\.machrc$
|
||||||
@@ -106,6 +109,10 @@ _OPT\.OBJ/
|
|||||||
^js/src/.*-obj/
|
^js/src/.*-obj/
|
||||||
^js/src/obj-.*/
|
^js/src/obj-.*/
|
||||||
|
|
||||||
|
# SpiderMonkey configury
|
||||||
|
^js/src/old-configure$
|
||||||
|
^js/src/autom4te\.cache$
|
||||||
|
|
||||||
# SpiderMonkey test result logs
|
# SpiderMonkey test result logs
|
||||||
^js/src/tests/results-.*\.html$
|
^js/src/tests/results-.*\.html$
|
||||||
^js/src/tests/results-.*\.txt$
|
^js/src/tests/results-.*\.txt$
|
||||||
|
|||||||
14
aclocal.m4
vendored
Normal file
14
aclocal.m4
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
dnl
|
||||||
|
dnl Local autoconf macros used with mozilla
|
||||||
|
dnl The contents of this file are under the Public Domain.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
builtin(include, build/autoconf/hooks.m4)dnl
|
||||||
|
builtin(include, build/autoconf/config.status.m4)dnl
|
||||||
|
builtin(include, build/autoconf/altoptions.m4)dnl
|
||||||
|
|
||||||
|
# Read the user's .mozconfig script. We can't do this in
|
||||||
|
# configure.in: autoconf puts the argument parsing code above anything
|
||||||
|
# expanded from configure.in, and we need to get the configure options
|
||||||
|
# from .mozconfig in place before that argument parsing code.
|
||||||
|
MOZ_READ_MOZCONFIG(.)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
. "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
|
. "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
|
||||||
|
|
||||||
# Add-on signing is not required for DevEdition
|
# Add-on signing is not required for DevEdition
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/aurora
|
ac_add_options --with-branding=browser/branding/aurora
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
ac_add_options --enable-debug-symbols=-gline-tables-only
|
ac_add_options --enable-debug-symbols=-gline-tables-only
|
||||||
|
|
||||||
# Add-on signing is checked but not enforced
|
# Add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
# ASan specific options on Linux
|
# ASan specific options on Linux
|
||||||
ac_add_options --enable-valgrind
|
ac_add_options --enable-valgrind
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
|
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/unofficial
|
ac_add_options --with-branding=browser/branding/unofficial
|
||||||
ac_add_options --enable-update-channel=default
|
ac_add_options --enable-update-channel=default
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
export MOZ_AUTOMATION_CHECK=0
|
MOZ_AUTOMATION_CHECK=0
|
||||||
|
|
||||||
. "$topsrcdir/build/unix/mozconfig.unix"
|
. "$topsrcdir/build/unix/mozconfig.unix"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
. "$topsrcdir/build/mozconfig.common"
|
. "$topsrcdir/build/mozconfig.common"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
|
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
|
||||||
|
|
||||||
# Add-on signing is not required for DevEdition
|
# Add-on signing is not required for DevEdition
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/aurora
|
ac_add_options --with-branding=browser/branding/aurora
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
ac_add_options --enable-debug-symbols=-gline-tables-only
|
ac_add_options --enable-debug-symbols=-gline-tables-only
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
# ASan specific options on Linux
|
# ASan specific options on Linux
|
||||||
ac_add_options --enable-valgrind
|
ac_add_options --enable-valgrind
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
ac_add_options --disable-optimize
|
ac_add_options --disable-optimize
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
# ASan specific options on Linux
|
# ASan specific options on Linux
|
||||||
ac_add_options --enable-valgrind
|
ac_add_options --enable-valgrind
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ac_add_options --enable-debug-symbols=-gline-tables-only
|
ac_add_options --enable-debug-symbols=-gline-tables-only
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
# ASan specific options on Linux
|
# ASan specific options on Linux
|
||||||
ac_add_options --enable-valgrind
|
ac_add_options --enable-valgrind
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
|
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_CHECK=0
|
MOZ_AUTOMATION_CHECK=0
|
||||||
|
|
||||||
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
|
. $topsrcdir/browser/config/mozconfigs/linux64/nightly
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. $topsrcdir/browser/config/mozconfigs/macosx64-aarch64/nightly
|
. $topsrcdir/browser/config/mozconfigs/macosx64-aarch64/nightly
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/unofficial
|
ac_add_options --with-branding=browser/branding/unofficial
|
||||||
ac_add_options --enable-update-channel=default
|
ac_add_options --enable-update-channel=default
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
# Developers often build with these options for a better debugging experience.
|
# Developers often build with these options for a better debugging experience.
|
||||||
. "$topsrcdir/browser/config/mozconfigs/macosx64/debug"
|
. "$topsrcdir/browser/config/mozconfigs/macosx64/debug"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. "$topsrcdir/browser/config/mozconfigs/macosx64-aarch64/common-opt"
|
. "$topsrcdir/browser/config/mozconfigs/macosx64-aarch64/common-opt"
|
||||||
|
|
||||||
# Add-on signing is not required for DevEdition
|
# Add-on signing is not required for DevEdition
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --enable-instruments
|
ac_add_options --enable-instruments
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. $topsrcdir/browser/config/mozconfigs/macosx64/nightly
|
. $topsrcdir/browser/config/mozconfigs/macosx64/nightly
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/unofficial
|
ac_add_options --with-branding=browser/branding/unofficial
|
||||||
ac_add_options --enable-update-channel=default
|
ac_add_options --enable-update-channel=default
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
# Developers often build with these options for a better debugging experience.
|
# Developers often build with these options for a better debugging experience.
|
||||||
. "$topsrcdir/browser/config/mozconfigs/macosx64/debug"
|
. "$topsrcdir/browser/config/mozconfigs/macosx64/debug"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
export MOZ_AUTOMATION_CHECK=0
|
MOZ_AUTOMATION_CHECK=0
|
||||||
|
|
||||||
. $topsrcdir/build/macosx/mozconfig.common
|
. $topsrcdir/build/macosx/mozconfig.common
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
. $topsrcdir/build/macosx/mozconfig.common
|
. $topsrcdir/build/macosx/mozconfig.common
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
|
. "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
|
||||||
|
|
||||||
# Add-on signing is not required for DevEdition
|
# Add-on signing is not required for DevEdition
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --enable-instruments
|
ac_add_options --enable-instruments
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
. $topsrcdir/browser/config/mozconfigs/macosx64/nightly
|
. $topsrcdir/browser/config/mozconfigs/macosx64/nightly
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
. $topsrcdir/build/macosx/mozconfig.common
|
. $topsrcdir/build/macosx/mozconfig.common
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. $topsrcdir/browser/config/mozconfigs/win32/nightly
|
. $topsrcdir/browser/config/mozconfigs/win32/nightly
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/unofficial
|
ac_add_options --with-branding=browser/branding/unofficial
|
||||||
ac_add_options --enable-update-channel=default
|
ac_add_options --enable-update-channel=default
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
. "$topsrcdir/build/mozconfig.win-common"
|
. "$topsrcdir/build/mozconfig.win-common"
|
||||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
. "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
|
. "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
|
||||||
|
|
||||||
# Add-on signing is not required for DevEdition
|
# Add-on signing is not required for DevEdition
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/aurora
|
ac_add_options --with-branding=browser/branding/aurora
|
||||||
|
|
||||||
|
|||||||
@@ -36,15 +36,15 @@ ac_add_options --disable-default-browser-agent # Relies on toast notifications w
|
|||||||
ac_add_options --disable-notification-server # Toast notifications don't build on mingw.
|
ac_add_options --disable-notification-server # Toast notifications don't build on mingw.
|
||||||
|
|
||||||
# Find our toolchain
|
# Find our toolchain
|
||||||
export HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||||
export HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||||
export CC="$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-clang"
|
CC="$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-clang"
|
||||||
export CXX="$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-clang++"
|
CXX="$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-clang++"
|
||||||
export CXXFLAGS="-fms-extensions"
|
CXXFLAGS="-fms-extensions"
|
||||||
export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
||||||
export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
||||||
export CFLAGS="$CFLAGS -include _mingw.h"
|
CFLAGS="$CFLAGS -include _mingw.h"
|
||||||
export CXXFLAGS="$CXXFLAGS -include _mingw.h"
|
CXXFLAGS="$CXXFLAGS -include _mingw.h"
|
||||||
|
|
||||||
# We want to make sure we use binutils and other binaries in the tooltool
|
# We want to make sure we use binutils and other binaries in the tooltool
|
||||||
# package.
|
# package.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
# Developers often build with these options for a better debugging experience.
|
# Developers often build with these options for a better debugging experience.
|
||||||
. "$topsrcdir/browser/config/mozconfigs/win32/debug"
|
. "$topsrcdir/browser/config/mozconfigs/win32/debug"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-opt"
|
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-opt"
|
||||||
|
|
||||||
# Add-on signing is not required for DevEdition
|
# Add-on signing is not required for DevEdition
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/aurora
|
ac_add_options --with-branding=browser/branding/aurora
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
. $topsrcdir/browser/config/mozconfigs/win64/nightly
|
. $topsrcdir/browser/config/mozconfigs/win64/nightly
|
||||||
|
|
||||||
#add-on signing is checked but not enforced
|
#add-on signing is checked but not enforced
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/unofficial
|
ac_add_options --with-branding=browser/branding/unofficial
|
||||||
ac_add_options --enable-update-channel=default
|
ac_add_options --enable-update-channel=default
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
export MOZ_AUTOMATION_CHECK=0
|
MOZ_AUTOMATION_CHECK=0
|
||||||
|
|
||||||
. "$topsrcdir/build/mozconfig.win-common"
|
. "$topsrcdir/build/mozconfig.win-common"
|
||||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
|
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
|
||||||
|
|
||||||
# Add-on signing is not required for DevEdition
|
# Add-on signing is not required for DevEdition
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
ac_add_options --with-branding=browser/branding/aurora
|
ac_add_options --with-branding=browser/branding/aurora
|
||||||
|
|
||||||
|
|||||||
@@ -36,15 +36,15 @@ ac_add_options --disable-default-browser-agent # Relies on toast notifications w
|
|||||||
ac_add_options --disable-notification-server # Toast notifications don't build on mingw.
|
ac_add_options --disable-notification-server # Toast notifications don't build on mingw.
|
||||||
|
|
||||||
# Find our toolchain
|
# Find our toolchain
|
||||||
export HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||||
export HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||||
export CC="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang"
|
CC="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang"
|
||||||
export CXX="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang++"
|
CXX="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang++"
|
||||||
export CXXFLAGS="-fms-extensions"
|
CXXFLAGS="-fms-extensions"
|
||||||
export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
||||||
export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
||||||
export CFLAGS="$CFLAGS -include _mingw.h"
|
CFLAGS="$CFLAGS -include _mingw.h"
|
||||||
export CXXFLAGS="$CXXFLAGS -include _mingw.h"
|
CXXFLAGS="$CXXFLAGS -include _mingw.h"
|
||||||
|
|
||||||
# We want to make sure we use binutils and other binaries in the tooltool
|
# We want to make sure we use binutils and other binaries in the tooltool
|
||||||
# package.
|
# package.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
. $topsrcdir/browser/config/mozconfigs/win64/nightly
|
. $topsrcdir/browser/config/mozconfigs/win64/nightly
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
|
|
||||||
# Developers often build with these options for a better debugging experience.
|
# Developers often build with these options for a better debugging experience.
|
||||||
. "$topsrcdir/browser/config/mozconfigs/win64/debug"
|
. "$topsrcdir/browser/config/mozconfigs/win64/debug"
|
||||||
|
|||||||
2607
build/autoconf/acgeneral.m4
Normal file
2607
build/autoconf/acgeneral.m4
Normal file
File diff suppressed because it is too large
Load Diff
80
build/autoconf/acoldnames.m4
Normal file
80
build/autoconf/acoldnames.m4
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
dnl Map old names of Autoconf macros to new regularized names.
|
||||||
|
dnl This file is part of Autoconf.
|
||||||
|
dnl Copyright (C) 1994 Free Software Foundation, Inc.
|
||||||
|
dnl
|
||||||
|
dnl This program is free software; you can redistribute it and/or modify
|
||||||
|
dnl it under the terms of the GNU General Public License as published by
|
||||||
|
dnl the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
dnl any later version.
|
||||||
|
dnl
|
||||||
|
dnl This program is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
dnl GNU General Public License for more details.
|
||||||
|
dnl
|
||||||
|
dnl You should have received a copy of the GNU General Public License
|
||||||
|
dnl along with this program; if not, write to the Free Software
|
||||||
|
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
dnl 02111-1307, USA.
|
||||||
|
dnl
|
||||||
|
dnl General macros.
|
||||||
|
dnl
|
||||||
|
define(AC_WARN, [indir([AC_MSG_WARN], $@)])dnl
|
||||||
|
define(AC_ERROR, [indir([AC_MSG_ERROR], $@)])dnl
|
||||||
|
AC_DEFUN(AC_PROGRAM_CHECK, [indir([AC_CHECK_PROG], $@)])dnl
|
||||||
|
AC_DEFUN(AC_PROGRAM_PATH, [indir([AC_PATH_PROG], $@)])dnl
|
||||||
|
AC_DEFUN(AC_PROGRAMS_CHECK, [indir([AC_CHECK_PROGS], $@)])dnl
|
||||||
|
AC_DEFUN(AC_PROGRAMS_PATH, [indir([AC_PATH_PROGS], $@)])dnl
|
||||||
|
AC_DEFUN(AC_PREFIX, [indir([AC_PREFIX_PROGRAM], $@)])dnl
|
||||||
|
AC_DEFUN(AC_HEADER_EGREP, [indir([AC_EGREP_HEADER], $@)])dnl
|
||||||
|
AC_DEFUN(AC_PROGRAM_EGREP, [indir([AC_EGREP_CPP], $@)])dnl
|
||||||
|
AC_DEFUN(AC_TEST_PROGRAM, [indir([AC_TRY_RUN], $@)])dnl
|
||||||
|
AC_DEFUN(AC_TEST_CPP, [indir([AC_TRY_CPP], $@)])dnl
|
||||||
|
AC_DEFUN(AC_HEADER_CHECK, [indir([AC_CHECK_HEADER], $@)])dnl
|
||||||
|
AC_DEFUN(AC_FUNC_CHECK, [indir([AC_CHECK_FUNC], $@)])dnl
|
||||||
|
AC_DEFUN(AC_HAVE_FUNCS, [indir([AC_CHECK_FUNCS], $@)])dnl
|
||||||
|
AC_DEFUN(AC_HAVE_HEADERS, [indir([AC_CHECK_HEADERS], $@)])dnl
|
||||||
|
AC_DEFUN(AC_SIZEOF_TYPE, [indir([AC_CHECK_SIZEOF], $@)])dnl
|
||||||
|
dnl
|
||||||
|
dnl Specific macros.
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(AC_GCC_TRADITIONAL, [indir([AC_PROG_GCC_TRADITIONAL])])dnl
|
||||||
|
AC_DEFUN(AC_MINUS_C_MINUS_O, [indir([AC_PROG_CC_C_O])])dnl
|
||||||
|
AC_DEFUN(AC_SET_MAKE, [indir([AC_PROG_MAKE_SET])])dnl
|
||||||
|
AC_DEFUN(AC_YYTEXT_POINTER, [indir([AC_DECL_YYTEXT])])dnl
|
||||||
|
AC_DEFUN(AC_LN_S, [indir([AC_PROG_LN_S])])dnl
|
||||||
|
AC_DEFUN(AC_STDC_HEADERS, [indir([AC_HEADER_STDC])])dnl
|
||||||
|
AC_DEFUN(AC_MAJOR_HEADER, [indir([AC_HEADER_MAJOR])])dnl
|
||||||
|
AC_DEFUN(AC_STAT_MACROS_BROKEN, [indir([AC_HEADER_STAT])])dnl
|
||||||
|
AC_DEFUN(AC_SYS_SIGLIST_DECLARED, [indir([AC_DECL_SYS_SIGLIST])])dnl
|
||||||
|
AC_DEFUN(AC_GETGROUPS_T, [indir([AC_TYPE_GETGROUPS])])dnl
|
||||||
|
AC_DEFUN(AC_UID_T, [indir([AC_TYPE_UID_T])])dnl
|
||||||
|
AC_DEFUN(AC_SIZE_T, [indir([AC_TYPE_SIZE_T])])dnl
|
||||||
|
AC_DEFUN(AC_PID_T, [indir([AC_TYPE_PID_T])])dnl
|
||||||
|
AC_DEFUN(AC_OFF_T, [indir([AC_TYPE_OFF_T])])dnl
|
||||||
|
AC_DEFUN(AC_MODE_T, [indir([AC_TYPE_MODE_T])])dnl
|
||||||
|
AC_DEFUN(AC_RETSIGTYPE, [indir([AC_TYPE_SIGNAL])])dnl
|
||||||
|
AC_DEFUN(AC_MMAP, [indir([AC_FUNC_MMAP])])dnl
|
||||||
|
AC_DEFUN(AC_VPRINTF, [indir([AC_FUNC_VPRINTF])])dnl
|
||||||
|
AC_DEFUN(AC_VFORK, [indir([AC_FUNC_VFORK])])dnl
|
||||||
|
AC_DEFUN(AC_WAIT3, [indir([AC_FUNC_WAIT3])])dnl
|
||||||
|
AC_DEFUN(AC_ALLOCA, [indir([AC_FUNC_ALLOCA])])dnl
|
||||||
|
AC_DEFUN(AC_GETLOADAVG, [indir([AC_FUNC_GETLOADAVG])])dnl
|
||||||
|
AC_DEFUN(AC_UTIME_NULL, [indir([AC_FUNC_UTIME_NULL])])dnl
|
||||||
|
AC_DEFUN(AC_STRCOLL, [indir([AC_FUNC_STRCOLL])])dnl
|
||||||
|
AC_DEFUN(AC_SETVBUF_REVERSED, [indir([AC_FUNC_SETVBUF_REVERSED])])dnl
|
||||||
|
AC_DEFUN(AC_TIME_WITH_SYS_TIME, [indir([AC_HEADER_TIME])])dnl
|
||||||
|
AC_DEFUN(AC_TIMEZONE, [indir([AC_STRUCT_TIMEZONE])])dnl
|
||||||
|
AC_DEFUN(AC_ST_BLOCKS, [indir([AC_STRUCT_ST_BLOCKS])])dnl
|
||||||
|
AC_DEFUN(AC_ST_BLKSIZE, [indir([AC_STRUCT_ST_BLKSIZE])])dnl
|
||||||
|
AC_DEFUN(AC_ST_RDEV, [indir([AC_STRUCT_ST_RDEV])])dnl
|
||||||
|
AC_DEFUN(AC_CROSS_CHECK, [indir([AC_C_CROSS])])dnl
|
||||||
|
AC_DEFUN(AC_CHAR_UNSIGNED, [indir([AC_C_CHAR_UNSIGNED])])dnl
|
||||||
|
AC_DEFUN(AC_LONG_DOUBLE, [indir([AC_C_LONG_DOUBLE])])dnl
|
||||||
|
AC_DEFUN(AC_WORDS_BIGENDIAN, [indir([AC_C_BIGENDIAN])])dnl
|
||||||
|
AC_DEFUN(AC_INLINE, [indir([AC_C_INLINE])])dnl
|
||||||
|
AC_DEFUN(AC_CONST, [indir([AC_C_CONST])])dnl
|
||||||
|
AC_DEFUN(AC_LONG_FILE_NAMES, [indir([AC_SYS_LONG_FILE_NAMES])])dnl
|
||||||
|
AC_DEFUN(AC_RESTARTABLE_SYSCALLS, [indir([AC_SYS_RESTARTABLE_SYSCALLS])])dnl
|
||||||
|
AC_DEFUN(AC_FIND_X, [indir([AC_PATH_X])])dnl
|
||||||
|
AC_DEFUN(AC_FIND_XTRA, [indir([AC_PATH_XTRA])])dnl
|
||||||
2758
build/autoconf/acspecific.m4
Normal file
2758
build/autoconf/acspecific.m4
Normal file
File diff suppressed because it is too large
Load Diff
72
build/autoconf/altoptions.m4
Normal file
72
build/autoconf/altoptions.m4
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
dnl This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
dnl altoptions.m4 - An alternative way of specifying command-line options.
|
||||||
|
dnl These macros are needed to support a menu-based configurator.
|
||||||
|
dnl This file also includes the macro, AM_READ_MYCONFIG, for reading
|
||||||
|
dnl the 'myconfig.m4' file.
|
||||||
|
|
||||||
|
dnl Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
||||||
|
|
||||||
|
|
||||||
|
dnl MOZ_ARG_ENABLE_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE]])
|
||||||
|
dnl MOZ_ARG_DISABLE_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE]])
|
||||||
|
dnl MOZ_ARG_ENABLE_STRING( NAME, HELP, IF-SET [, ELSE])
|
||||||
|
dnl MOZ_ARG_WITH_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE])
|
||||||
|
dnl MOZ_ARG_WITH_STRING( NAME, HELP, IF-SET [, ELSE])
|
||||||
|
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
|
||||||
|
|
||||||
|
define([MOZ_DIVERSION_ARGS], 12)
|
||||||
|
|
||||||
|
AC_DEFUN([MOZ_ARG],[dnl
|
||||||
|
AC_DIVERT_PUSH(MOZ_DIVERSION_ARGS)dnl
|
||||||
|
'$1',
|
||||||
|
AC_DIVERT_POP()dnl
|
||||||
|
])
|
||||||
|
AC_DEFUN([MOZ_AC_ARG_ENABLE],[MOZ_ARG([--enable-]translit([$1],[_],[-]))AC_ARG_ENABLE([$1], [$2], [$3], [$4])])
|
||||||
|
AC_DEFUN([MOZ_AC_ARG_WITH],[MOZ_ARG([--with-]translit([$1],[_],[-]))AC_ARG_WITH([$1], [$2], [$3], [$4])])
|
||||||
|
|
||||||
|
dnl MOZ_TWO_STRING_TEST(NAME, VAL, STR1, IF-STR1, STR2, IF-STR2 [, ELSE])
|
||||||
|
AC_DEFUN([MOZ_TWO_STRING_TEST],
|
||||||
|
[if test "[$2]" = "[$3]"; then
|
||||||
|
ifelse([$4], , :, [$4])
|
||||||
|
elif test "[$2]" = "[$5]"; then
|
||||||
|
ifelse([$6], , :, [$6])
|
||||||
|
else
|
||||||
|
ifelse([$7], ,
|
||||||
|
[AC_MSG_ERROR([Option, [$1], does not take an argument ([$2]).])],
|
||||||
|
[$7])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
dnl MOZ_ARG_ENABLE_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE]])
|
||||||
|
AC_DEFUN([MOZ_ARG_ENABLE_BOOL],
|
||||||
|
[MOZ_AC_ARG_ENABLE([$1], [$2],
|
||||||
|
[MOZ_TWO_STRING_TEST([$1], [$enableval], yes, [$3], no, [$4])],
|
||||||
|
[$5])])
|
||||||
|
|
||||||
|
dnl MOZ_ARG_DISABLE_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE]])
|
||||||
|
AC_DEFUN([MOZ_ARG_DISABLE_BOOL],
|
||||||
|
[MOZ_AC_ARG_ENABLE([$1], [$2],
|
||||||
|
[MOZ_TWO_STRING_TEST([$1], [$enableval], no, [$3], yes, [$4])],
|
||||||
|
[$5])])
|
||||||
|
|
||||||
|
dnl MOZ_ARG_ENABLE_STRING(NAME, HELP, IF-SET [, ELSE])
|
||||||
|
AC_DEFUN([MOZ_ARG_ENABLE_STRING],
|
||||||
|
[MOZ_AC_ARG_ENABLE([$1], [$2], [$3], [$4])])
|
||||||
|
|
||||||
|
dnl MOZ_ARG_WITH_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE])
|
||||||
|
AC_DEFUN([MOZ_ARG_WITH_BOOL],
|
||||||
|
[MOZ_AC_ARG_WITH([$1], [$2],
|
||||||
|
[MOZ_TWO_STRING_TEST([$1], [$withval], yes, [$3], no, [$4])],
|
||||||
|
[$5])])
|
||||||
|
|
||||||
|
dnl MOZ_ARG_WITH_STRING(NAME, HELP, IF-SET [, ELSE])
|
||||||
|
AC_DEFUN([MOZ_ARG_WITH_STRING],
|
||||||
|
[MOZ_AC_ARG_WITH([$1], [$2], [$3], [$4])])
|
||||||
|
|
||||||
|
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
|
||||||
|
AC_DEFUN([MOZ_READ_MOZCONFIG],
|
||||||
|
[AC_REQUIRE([AC_INIT_BINSH])dnl
|
||||||
|
. $OLD_CONFIGURE_VARS
|
||||||
|
])
|
||||||
28
build/autoconf/autoconf.m4
Normal file
28
build/autoconf/autoconf.m4
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
dnl Driver that loads the Autoconf macro files.
|
||||||
|
dnl Requires GNU m4.
|
||||||
|
dnl This file is part of Autoconf.
|
||||||
|
dnl Copyright (C) 1994 Free Software Foundation, Inc.
|
||||||
|
dnl
|
||||||
|
dnl This program is free software; you can redistribute it and/or modify
|
||||||
|
dnl it under the terms of the GNU General Public License as published by
|
||||||
|
dnl the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
dnl any later version.
|
||||||
|
dnl
|
||||||
|
dnl This program is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
dnl GNU General Public License for more details.
|
||||||
|
dnl
|
||||||
|
dnl You should have received a copy of the GNU General Public License
|
||||||
|
dnl along with this program; if not, write to the Free Software
|
||||||
|
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
dnl 02111-1307, USA.
|
||||||
|
dnl
|
||||||
|
dnl Written by David MacKenzie.
|
||||||
|
dnl
|
||||||
|
include(acgeneral.m4)dnl
|
||||||
|
builtin(include, acspecific.m4)dnl
|
||||||
|
builtin(include, acoldnames.m4)dnl
|
||||||
|
dnl Do not sinclude acsite.m4 here, because it may not be installed
|
||||||
|
dnl yet when Autoconf is frozen.
|
||||||
|
dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
|
||||||
158
build/autoconf/autoconf.sh
Normal file
158
build/autoconf/autoconf.sh
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
#! @SHELL@
|
||||||
|
# autoconf -- create `configure' using m4 macros
|
||||||
|
# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
|
# If given no args, create `configure' from template file `configure.in'.
|
||||||
|
# With one arg, create a configure script on standard output from
|
||||||
|
# the given template file.
|
||||||
|
|
||||||
|
usage="\
|
||||||
|
Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
|
||||||
|
[-l dir] [--localdir=dir] [--version] [template-file]"
|
||||||
|
|
||||||
|
# NLS nuisances.
|
||||||
|
# Only set these to C if already set. These must not be set unconditionally
|
||||||
|
# because not all systems understand e.g. LANG=C (notably SCO).
|
||||||
|
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
|
||||||
|
# Non-C LC_CTYPE values break the ctype check.
|
||||||
|
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
|
||||||
|
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
|
||||||
|
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
|
||||||
|
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
|
||||||
|
|
||||||
|
: ${AC_MACRODIR=@datadir@}
|
||||||
|
: ${M4=@M4@}
|
||||||
|
: ${AWK=@AWK@}
|
||||||
|
case "${M4}" in
|
||||||
|
/*) # Handle the case that m4 has moved since we were configured.
|
||||||
|
# It may have been found originally in a build directory.
|
||||||
|
test -f "${M4}" || M4=m4 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
: ${TMPDIR=/tmp}
|
||||||
|
tmpout=${TMPDIR}/acout.$$
|
||||||
|
localdir=
|
||||||
|
show_version=no
|
||||||
|
|
||||||
|
while test $# -gt 0 ; do
|
||||||
|
case "${1}" in
|
||||||
|
-h | --help | --h* )
|
||||||
|
echo "${usage}" 1>&2; exit 0 ;;
|
||||||
|
--localdir=* | --l*=* )
|
||||||
|
localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
|
||||||
|
shift ;;
|
||||||
|
-l | --localdir | --l*)
|
||||||
|
shift
|
||||||
|
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||||
|
localdir="${1}"
|
||||||
|
shift ;;
|
||||||
|
--macrodir=* | --m*=* )
|
||||||
|
AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
|
||||||
|
shift ;;
|
||||||
|
-m | --macrodir | --m* )
|
||||||
|
shift
|
||||||
|
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||||
|
AC_MACRODIR="${1}"
|
||||||
|
shift ;;
|
||||||
|
--version | --v* )
|
||||||
|
show_version=yes; shift ;;
|
||||||
|
-- ) # Stop option processing
|
||||||
|
shift; break ;;
|
||||||
|
- ) # Use stdin as input.
|
||||||
|
break ;;
|
||||||
|
-* )
|
||||||
|
echo "${usage}" 1>&2; exit 1 ;;
|
||||||
|
* )
|
||||||
|
break ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $show_version = yes; then
|
||||||
|
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
|
||||||
|
$AC_MACRODIR/acgeneral.m4`
|
||||||
|
echo "Autoconf version $version"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $# in
|
||||||
|
0) infile=configure.in ;;
|
||||||
|
1) infile="$1" ;;
|
||||||
|
*) echo "$usage" >&2; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
|
||||||
|
|
||||||
|
tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
|
||||||
|
if test z$infile = z-; then
|
||||||
|
infile=$tmpin
|
||||||
|
cat > $infile
|
||||||
|
elif test ! -r "$infile"; then
|
||||||
|
echo "autoconf: ${infile}: No such file or directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$localdir"; then
|
||||||
|
use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
|
||||||
|
else
|
||||||
|
use_localdir=
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use the frozen version of Autoconf if available.
|
||||||
|
r= f=
|
||||||
|
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
|
||||||
|
case `$M4 --help < /dev/null 2>&1` in
|
||||||
|
*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
|
||||||
|
*traditional*) ;;
|
||||||
|
*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
|
||||||
|
{ rm -f $tmpin $tmpout; exit 2; }
|
||||||
|
|
||||||
|
# You could add your own prefixes to pattern if you wanted to check for
|
||||||
|
# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do
|
||||||
|
# alternation.
|
||||||
|
pattern="AC_"
|
||||||
|
|
||||||
|
status=0
|
||||||
|
if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
|
||||||
|
echo "autoconf: Undefined macros:" >&2
|
||||||
|
sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
||||||
|
while read macro; do
|
||||||
|
grep -n "^[^#]*$macro" $infile /dev/null
|
||||||
|
test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
|
||||||
|
done | sort -u >&2
|
||||||
|
status=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo "This case should not be reached."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Put the real line numbers into the output to make config.log more helpful.
|
||||||
|
$AWK '
|
||||||
|
/__oline__/ { printf "%d:", NR + 1 }
|
||||||
|
{ print }
|
||||||
|
' $tmpout | sed '
|
||||||
|
/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
|
||||||
|
'
|
||||||
|
|
||||||
|
rm -f $tmpout
|
||||||
|
|
||||||
|
exit $status
|
||||||
162
build/autoconf/config.status.m4
Normal file
162
build/autoconf/config.status.m4
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
dnl This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
dnl For use in AC_SUBST replacement
|
||||||
|
define([MOZ_DIVERSION_SUBST], 11)
|
||||||
|
|
||||||
|
dnl Replace AC_SUBST to store values in a format suitable for python.
|
||||||
|
dnl The necessary comma after the tuple can't be put here because it
|
||||||
|
dnl can mess around with things like:
|
||||||
|
dnl AC_SOMETHING(foo,AC_SUBST(),bar)
|
||||||
|
define([AC_SUBST],
|
||||||
|
[ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_SET on the same variable ($1)])],
|
||||||
|
[ifdef([AC_SUBST_LIST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_LIST on the same variable ($1)])],
|
||||||
|
[ifdef([AC_SUBST_$1], ,
|
||||||
|
[define([AC_SUBST_$1], )dnl
|
||||||
|
AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl
|
||||||
|
(''' $1 ''', r''' [$]$1 ''')
|
||||||
|
AC_DIVERT_POP()dnl
|
||||||
|
])])])])])
|
||||||
|
|
||||||
|
dnl Like AC_SUBST, but makes the value available as a set in python,
|
||||||
|
dnl with values got from the value of the environment variable, split on
|
||||||
|
dnl whitespaces.
|
||||||
|
define([AC_SUBST_SET],
|
||||||
|
[ifdef([AC_SUBST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_SET on the same variable ($1)])],
|
||||||
|
[ifdef([AC_SUBST_LIST_$1], [m4_fatal([Cannot use AC_SUBST_LIST and AC_SUBST_SET on the same variable ($1)])],
|
||||||
|
[ifdef([AC_SUBST_SET_$1], ,
|
||||||
|
[define([AC_SUBST_SET_$1], )dnl
|
||||||
|
AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl
|
||||||
|
(''' $1 ''', unique_list(split(r''' [$]$1 ''')))
|
||||||
|
AC_DIVERT_POP()dnl
|
||||||
|
])])])])])
|
||||||
|
|
||||||
|
dnl Like AC_SUBST, but makes the value available as a list in python,
|
||||||
|
dnl with values got from the value of the environment variable, split on
|
||||||
|
dnl whitespaces.
|
||||||
|
define([AC_SUBST_LIST],
|
||||||
|
[ifdef([AC_SUBST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_LIST on the same variable ($1)])],
|
||||||
|
[ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST_SET and AC_SUBST_LIST on the same variable ($1)])],
|
||||||
|
[ifdef([AC_SUBST_LIST_$1], ,
|
||||||
|
[define([AC_SUBST_LIST_$1], )dnl
|
||||||
|
AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl
|
||||||
|
(''' $1 ''', list(split(r''' [$]$1 ''')))
|
||||||
|
AC_DIVERT_POP()dnl
|
||||||
|
])])])])])
|
||||||
|
|
||||||
|
dnl Ignore AC_SUBSTs for variables we don't have use for but that autoconf
|
||||||
|
dnl itself exports.
|
||||||
|
define([AC_SUBST_CFLAGS], )
|
||||||
|
define([AC_SUBST_CPPFLAGS], )
|
||||||
|
define([AC_SUBST_CXXFLAGS], )
|
||||||
|
define([AC_SUBST_FFLAGS], )
|
||||||
|
define([AC_SUBST_DEFS], )
|
||||||
|
define([AC_SUBST_LDFLAGS], )
|
||||||
|
define([AC_SUBST_LIBS], )
|
||||||
|
define([AC_SUBST_exec_prefix], )
|
||||||
|
define([AC_SUBST_prefix], )
|
||||||
|
define([AC_SUBST_datadir], )
|
||||||
|
define([AC_SUBST_libdir], )
|
||||||
|
define([AC_SUBST_includedir], )
|
||||||
|
|
||||||
|
dnl Wrap AC_DEFINE to store values in a format suitable for python.
|
||||||
|
dnl autoconf's AC_DEFINE still needs to be used to fill confdefs.h,
|
||||||
|
dnl which is #included during some compile checks.
|
||||||
|
dnl The necessary comma after the tuple can't be put here because it
|
||||||
|
dnl can mess around with things like:
|
||||||
|
dnl AC_SOMETHING(foo,AC_DEFINE(),bar)
|
||||||
|
define([_MOZ_AC_DEFINE], defn([AC_DEFINE]))
|
||||||
|
define([AC_DEFINE],
|
||||||
|
[cat >> confdefs.pytmp <<\EOF
|
||||||
|
(''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 '))
|
||||||
|
EOF
|
||||||
|
ifelse($#, 2, _MOZ_AC_DEFINE([$1], [$2]), $#, 3, _MOZ_AC_DEFINE([$1], [$2], [$3]),_MOZ_AC_DEFINE([$1]))dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Wrap AC_DEFINE_UNQUOTED to store values in a format suitable for
|
||||||
|
dnl python.
|
||||||
|
define([_MOZ_AC_DEFINE_UNQUOTED], defn([AC_DEFINE_UNQUOTED]))
|
||||||
|
define([AC_DEFINE_UNQUOTED],
|
||||||
|
[cat >> confdefs.pytmp <<EOF
|
||||||
|
(''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 '))
|
||||||
|
EOF
|
||||||
|
ifelse($#, 2, _MOZ_AC_DEFINE_UNQUOTED($1, $2), $#, 3, _MOZ_AC_DEFINE_UNQUOTED($1, $2, $3),_MOZ_AC_DEFINE_UNQUOTED($1))dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Replace AC_OUTPUT to create and call a python config.status
|
||||||
|
define([MOZ_CREATE_CONFIG_STATUS],
|
||||||
|
[dnl Used in all Makefile.in files
|
||||||
|
top_srcdir=$srcdir
|
||||||
|
AC_SUBST(top_srcdir)
|
||||||
|
|
||||||
|
dnl Picked from autoconf 2.13
|
||||||
|
trap '' 1 2 15
|
||||||
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
|
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
||||||
|
: ${CONFIG_STATUS=./config.data}
|
||||||
|
|
||||||
|
dnl We're going to need [ ] for python syntax.
|
||||||
|
changequote(<<<, >>>)dnl
|
||||||
|
echo creating $CONFIG_STATUS
|
||||||
|
|
||||||
|
cat > $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
|
dnl All defines and substs are stored with an additional space at the beginning
|
||||||
|
dnl and at the end of the string, to avoid any problem with values starting or
|
||||||
|
dnl ending with quotes.
|
||||||
|
defines = [
|
||||||
|
EOF
|
||||||
|
|
||||||
|
dnl confdefs.pytmp contains AC_DEFINEs, in the expected format, but
|
||||||
|
dnl lacks the final comma (see above).
|
||||||
|
if test -e confdefs.pytmp; then
|
||||||
|
sed 's/$/,/' confdefs.pytmp >> $CONFIG_STATUS
|
||||||
|
rm confdefs.pytmp
|
||||||
|
fi
|
||||||
|
rm -f confdefs.h
|
||||||
|
|
||||||
|
cat >> $CONFIG_STATUS <<\EOF
|
||||||
|
]
|
||||||
|
|
||||||
|
substs = [
|
||||||
|
EOF
|
||||||
|
|
||||||
|
dnl The MOZ_DIVERSION_SUBST output diversion contains AC_SUBSTs, in the
|
||||||
|
dnl expected format, but lacks the final comma (see above).
|
||||||
|
sed 's/$/,/' >> $CONFIG_STATUS <<EOF
|
||||||
|
undivert(MOZ_DIVERSION_SUBST)dnl
|
||||||
|
EOF
|
||||||
|
|
||||||
|
dnl Add in the output from the subconfigure script
|
||||||
|
for ac_subst_arg in $_subconfigure_ac_subst_args; do
|
||||||
|
variable='$'$ac_subst_arg
|
||||||
|
echo " (''' $ac_subst_arg ''', r''' `eval echo $variable` ''')," >> $CONFIG_STATUS
|
||||||
|
done
|
||||||
|
|
||||||
|
cat >> $CONFIG_STATUS <<\EOF
|
||||||
|
]
|
||||||
|
|
||||||
|
flags = [
|
||||||
|
undivert(MOZ_DIVERSION_ARGS)dnl
|
||||||
|
]
|
||||||
|
EOF
|
||||||
|
|
||||||
|
changequote([, ])
|
||||||
|
])
|
||||||
|
|
||||||
|
define([m4_fatal],[
|
||||||
|
errprint([$1
|
||||||
|
])
|
||||||
|
m4exit(1)
|
||||||
|
])
|
||||||
|
|
||||||
|
define([AC_OUTPUT], [ifelse($#_$1, 1_, [MOZ_CREATE_CONFIG_STATUS()
|
||||||
|
MOZ_RUN_CONFIG_STATUS()],
|
||||||
|
[m4_fatal([Use CONFIGURE_SUBST_FILES in moz.build files to create substituted files.])]
|
||||||
|
)])
|
||||||
|
|
||||||
|
define([AC_CONFIG_HEADER],
|
||||||
|
[m4_fatal([Use CONFIGURE_DEFINE_FILES in moz.build files to produce header files.])
|
||||||
|
])
|
||||||
31
build/autoconf/hooks.m4
Normal file
31
build/autoconf/hooks.m4
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
dnl This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
dnl Wrap AC_INIT_PREPARE to add the above trap.
|
||||||
|
define([_MOZ_AC_INIT_PREPARE], defn([AC_INIT_PREPARE]))
|
||||||
|
define([AC_INIT_PREPARE],
|
||||||
|
[_MOZ_AC_INIT_PREPARE($1)
|
||||||
|
|
||||||
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||||
|
# Let make expand exec_prefix.
|
||||||
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Print error messages in config.log as well as stderr
|
||||||
|
define([AC_MSG_ERROR],
|
||||||
|
[{ echo "configure: error: $1" 1>&2; echo "configure: error: $1" 1>&5; exit 1; }])
|
||||||
|
|
||||||
|
dnl Divert AC_TRY_COMPILER to make ac_cv_prog_*_works actually cached.
|
||||||
|
dnl This will allow to just skip the test when python configure has set
|
||||||
|
dnl the value for us. But since ac_cv_prog_*_cross is calculated at the same
|
||||||
|
dnl time, and has a different meaning as in python configure, we only want to
|
||||||
|
dnl use its value to display whether a cross-compile is happening. We forbid
|
||||||
|
dnl configure tests that would rely on ac_cv_prog_*_cross autoconf meaning
|
||||||
|
dnl (being able to execute the product of compilation), which are already bad
|
||||||
|
dnl for cross compiles anyways, so it's a win to get rid of them.
|
||||||
|
define([_MOZ_AC_TRY_COMPILER], defn([AC_TRY_COMPILER]))
|
||||||
|
define([AC_TRY_COMPILER], [AC_CACHE_VAL($2, _MOZ_AC_TRY_COMPILER($1, $2, $3))])
|
||||||
|
|
||||||
|
define([AC_TRY_RUN], [m4_fatal([AC_TRY_RUN is forbidden])])
|
||||||
|
define([AC_CHECK_FILE], [m4_fatal([AC_CHECK_FILE is forbidden])])
|
||||||
@@ -65,12 +65,11 @@ set_config("DIST", build_environment.dist)
|
|||||||
option(env="MOZ_AUTOMATION", help="Enable options for automated builds")
|
option(env="MOZ_AUTOMATION", help="Enable options for automated builds")
|
||||||
set_config("MOZ_AUTOMATION", depends_if("MOZ_AUTOMATION")(lambda x: True))
|
set_config("MOZ_AUTOMATION", depends_if("MOZ_AUTOMATION")(lambda x: True))
|
||||||
|
|
||||||
|
|
||||||
|
option(env="OLD_CONFIGURE", nargs=1, help="Path to the old configure script")
|
||||||
|
|
||||||
option(env="MOZCONFIG", nargs=1, help="Mozconfig location")
|
option(env="MOZCONFIG", nargs=1, help="Mozconfig location")
|
||||||
|
|
||||||
option(env="MOZ_AUTOMATION_MOZCONFIG", help="Indicates mozconfig from automated builds")
|
|
||||||
set_config(
|
|
||||||
"MOZ_AUTOMATION_MOZCONFIG", depends_if("MOZ_AUTOMATION_MOZCONFIG")(lambda x: True)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Read user mozconfig
|
# Read user mozconfig
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
@@ -79,11 +78,34 @@ set_config(
|
|||||||
# be called when --help is passed, and the mozconfig wouldn't be read.
|
# be called when --help is passed, and the mozconfig wouldn't be read.
|
||||||
|
|
||||||
|
|
||||||
@depends("MOZCONFIG", build_environment, "--help")
|
@depends("MOZCONFIG", "OLD_CONFIGURE", build_environment, "--help")
|
||||||
@imports(_from="mozbuild.mozconfig", _import="MozconfigLoader")
|
@imports(_from="mozbuild.mozconfig", _import="MozconfigLoader")
|
||||||
@imports(_from="mozboot.mozconfig", _import="find_mozconfig")
|
@imports(_from="mozboot.mozconfig", _import="find_mozconfig")
|
||||||
@imports("os")
|
@imports("os")
|
||||||
def mozconfig(mozconfig, build_env, help):
|
def mozconfig(mozconfig, old_configure, build_env, help):
|
||||||
|
# Don't read the mozconfig for the js configure (yay backwards
|
||||||
|
# compatibility)
|
||||||
|
# While the long term goal is that js and top-level use the same configure
|
||||||
|
# and the same overall setup, including the possibility to use mozconfigs,
|
||||||
|
# figuring out what we want to do wrt mozconfig vs. command line and
|
||||||
|
# environment variable is not a clear-cut case, and it's more important to
|
||||||
|
# fix the immediate problem mozconfig causes to js developers by
|
||||||
|
# "temporarily" returning to the previous behavior of not loading the
|
||||||
|
# mozconfig for the js configure.
|
||||||
|
# Separately to the immediate problem for js developers, there is also the
|
||||||
|
# need to not load a mozconfig when running js configure as a subconfigure.
|
||||||
|
# Unfortunately, there is no direct way to tell whether the running
|
||||||
|
# configure is the js configure. The indirect way is to look at the
|
||||||
|
# OLD_CONFIGURE path, which points to js/src/old-configure.
|
||||||
|
# I expect we'll have figured things out for mozconfigs well before
|
||||||
|
# old-configure dies.
|
||||||
|
if (
|
||||||
|
old_configure
|
||||||
|
and os.path.dirname(os.path.abspath(old_configure[0])).endswith("/js/src")
|
||||||
|
or (mozconfig and mozconfig[0] == os.devnull)
|
||||||
|
):
|
||||||
|
return {"path": None}
|
||||||
|
|
||||||
topsrcdir = build_env.topsrcdir
|
topsrcdir = build_env.topsrcdir
|
||||||
loader = MozconfigLoader(topsrcdir)
|
loader = MozconfigLoader(topsrcdir)
|
||||||
mozconfig = mozconfig[0] if mozconfig else None
|
mozconfig = mozconfig[0] if mozconfig else None
|
||||||
@@ -133,7 +155,6 @@ def help_shell(help, shell):
|
|||||||
|
|
||||||
|
|
||||||
shell = help_shell | shell
|
shell = help_shell | shell
|
||||||
set_config("SHELL", shell)
|
|
||||||
|
|
||||||
|
|
||||||
# Python 3
|
# Python 3
|
||||||
@@ -214,6 +235,10 @@ def mozconfig_options(mozconfig, early_options, automation, help):
|
|||||||
for key, (_, value) in mozconfig["env"]["modified"].items():
|
for key, (_, value) in mozconfig["env"]["modified"].items():
|
||||||
add(key, value)
|
add(key, value)
|
||||||
os.environ[key] = value
|
os.environ[key] = value
|
||||||
|
for key, value in mozconfig["vars"]["added"].items():
|
||||||
|
add(key, value)
|
||||||
|
for key, (_, value) in mozconfig["vars"]["modified"].items():
|
||||||
|
add(key, value)
|
||||||
|
|
||||||
|
|
||||||
@depends(build_environment, "--help")
|
@depends(build_environment, "--help")
|
||||||
@@ -1301,17 +1326,6 @@ set_config("prefix", depends("--prefix")(lambda prefix: prefix[0]))
|
|||||||
# Unlike autoconf, we don't offer these as a customisation point.
|
# Unlike autoconf, we don't offer these as a customisation point.
|
||||||
set_config("exec_prefix", depends("--prefix")(lambda prefix: prefix[0]))
|
set_config("exec_prefix", depends("--prefix")(lambda prefix: prefix[0]))
|
||||||
set_config("datadir", depends("--prefix")(lambda prefix: f"{prefix[0]}/share"))
|
set_config("datadir", depends("--prefix")(lambda prefix: f"{prefix[0]}/share"))
|
||||||
set_config("bindir", depends("--prefix")(lambda prefix: f"{prefix[0]}/bin"))
|
|
||||||
set_config("sbindir", depends("--prefix")(lambda prefix: f"{prefix[0]}/sbin"))
|
|
||||||
set_config("infodir", depends("--prefix")(lambda prefix: f"{prefix[0]}/info"))
|
|
||||||
set_config("libexec", depends("--prefix")(lambda prefix: f"{prefix[0]}/libexec"))
|
|
||||||
set_config("localstatedir", depends("--prefix")(lambda prefix: f"{prefix[0]}/var"))
|
|
||||||
set_config("sharedstatedir", depends("--prefix")(lambda prefix: f"{prefix[0]}/com"))
|
|
||||||
set_config("sysconfdir", depends("--prefix")(lambda prefix: f"{prefix[0]}/etc"))
|
|
||||||
set_config("mandir", depends("--prefix")(lambda prefix: f"{prefix[0]}/man"))
|
|
||||||
set_config("oldincludedir", depends("--prefix")(lambda prefix: f"{prefix[0]}/include"))
|
|
||||||
set_config("top_srcdir", build_environment.topsrcdir)
|
|
||||||
set_config("program_transform_name", "s,x,x,")
|
|
||||||
|
|
||||||
option(
|
option(
|
||||||
"--includedir",
|
"--includedir",
|
||||||
|
|||||||
395
build/moz.configure/old.configure
Normal file
395
build/moz.configure/old.configure
Normal file
@@ -0,0 +1,395 @@
|
|||||||
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||||
|
# vim: set filetype=python:
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
|
||||||
|
m4 = check_prog(
|
||||||
|
"M4",
|
||||||
|
(
|
||||||
|
"gm4",
|
||||||
|
"m4",
|
||||||
|
),
|
||||||
|
paths=prefer_mozillabuild_path,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@depends(mozconfig)
|
||||||
|
def prepare_mozconfig(mozconfig):
|
||||||
|
if mozconfig["path"]:
|
||||||
|
items = {}
|
||||||
|
for key, value in mozconfig["vars"]["added"].items():
|
||||||
|
items[key] = (value, "added")
|
||||||
|
for key, (old, value) in mozconfig["vars"]["modified"].items():
|
||||||
|
items[key] = (value, "modified")
|
||||||
|
for t in ("env", "vars"):
|
||||||
|
for key in mozconfig[t]["removed"].keys():
|
||||||
|
items[key] = (None, "removed " + t)
|
||||||
|
return items
|
||||||
|
|
||||||
|
|
||||||
|
@depends("OLD_CONFIGURE", build_project)
|
||||||
|
def old_configure(old_configure, build_project):
|
||||||
|
if not old_configure:
|
||||||
|
die("The OLD_CONFIGURE environment variable must be set")
|
||||||
|
|
||||||
|
# os.path.abspath in the sandbox will ensure forward slashes on Windows,
|
||||||
|
# which is actually necessary because this path actually ends up literally
|
||||||
|
# as $0, and backslashes there breaks autoconf's detection of the source
|
||||||
|
# directory.
|
||||||
|
old_configure = os.path.abspath(old_configure[0])
|
||||||
|
if build_project == "js":
|
||||||
|
old_configure_dir = os.path.dirname(old_configure)
|
||||||
|
if not old_configure_dir.endswith("/js/src"):
|
||||||
|
old_configure = os.path.join(
|
||||||
|
old_configure_dir, "js", "src", os.path.basename(old_configure)
|
||||||
|
)
|
||||||
|
return old_configure
|
||||||
|
|
||||||
|
|
||||||
|
@depends(prepare_mozconfig)
|
||||||
|
@imports(_from="__builtin__", _import="open")
|
||||||
|
@imports(_from="__builtin__", _import="print")
|
||||||
|
@imports(_from="mozbuild.shellutil", _import="quote")
|
||||||
|
def prepare_configure(mozconfig):
|
||||||
|
assignments = {}
|
||||||
|
|
||||||
|
with open("old-configure.vars", "w") as out:
|
||||||
|
log.debug("Injecting the following to old-configure:")
|
||||||
|
|
||||||
|
def inject(command):
|
||||||
|
print(command, file=out) # noqa Python 2vs3
|
||||||
|
log.debug("| %s", command)
|
||||||
|
|
||||||
|
if mozconfig:
|
||||||
|
inject("# start of mozconfig values")
|
||||||
|
for key, (value, action) in sorted(mozconfig.items()):
|
||||||
|
if action.startswith("removed "):
|
||||||
|
inject("unset %s # from %s" % (key, action[len("removed ") :]))
|
||||||
|
else:
|
||||||
|
inject("%s=%s # %s" % (key, quote(value), action))
|
||||||
|
assignments[key] = value
|
||||||
|
|
||||||
|
inject("# end of mozconfig values")
|
||||||
|
|
||||||
|
return namespace(assignments=assignments)
|
||||||
|
|
||||||
|
|
||||||
|
@template
|
||||||
|
def old_configure_options(*options):
|
||||||
|
for opt in options:
|
||||||
|
option(opt, nargs="*", help="Help missing for old configure options")
|
||||||
|
|
||||||
|
@dependable
|
||||||
|
def all_options():
|
||||||
|
return list(options)
|
||||||
|
|
||||||
|
return depends(all_options, *options)
|
||||||
|
|
||||||
|
|
||||||
|
@old_configure_options(
|
||||||
|
"--cache-file",
|
||||||
|
"--x-includes",
|
||||||
|
"--x-libraries",
|
||||||
|
)
|
||||||
|
def prepare_configure_options(all_options, *options):
|
||||||
|
# old-configure only supports the options listed in @old_configure_options
|
||||||
|
# so we don't need to pass it every single option we've been passed. Only
|
||||||
|
# the ones that are not supported by python configure need to.
|
||||||
|
options = [
|
||||||
|
value.format(name)
|
||||||
|
for name, value in zip(all_options, options)
|
||||||
|
if value.origin != "default"
|
||||||
|
]
|
||||||
|
|
||||||
|
return namespace(options=options, all_options=all_options)
|
||||||
|
|
||||||
|
|
||||||
|
@template
|
||||||
|
def old_configure_for(old_configure_path, extra_env=None):
|
||||||
|
if extra_env is None:
|
||||||
|
extra_env = dependable(None)
|
||||||
|
|
||||||
|
@depends(
|
||||||
|
prepare_configure,
|
||||||
|
prepare_configure_options,
|
||||||
|
"--prefix",
|
||||||
|
"--includedir",
|
||||||
|
"--libdir",
|
||||||
|
prefer_mozillabuild_path,
|
||||||
|
altered_path,
|
||||||
|
extra_env,
|
||||||
|
build_environment,
|
||||||
|
old_configure_path,
|
||||||
|
awk,
|
||||||
|
m4,
|
||||||
|
shell,
|
||||||
|
"--cache-file",
|
||||||
|
)
|
||||||
|
@imports(_from="__builtin__", _import="compile")
|
||||||
|
@imports(_from="__builtin__", _import="open")
|
||||||
|
@imports(_from="__builtin__", _import="OSError")
|
||||||
|
@imports("glob")
|
||||||
|
@imports("itertools")
|
||||||
|
@imports("logging")
|
||||||
|
@imports("os")
|
||||||
|
@imports("re")
|
||||||
|
@imports("subprocess")
|
||||||
|
@imports("sys")
|
||||||
|
@imports(_from="mozbuild.shellutil", _import="quote")
|
||||||
|
@imports(_from="mozbuild.shellutil", _import="split")
|
||||||
|
@imports(_from="tempfile", _import="NamedTemporaryFile")
|
||||||
|
@imports(_from="subprocess", _import="CalledProcessError")
|
||||||
|
@imports(_from="__builtin__", _import="exec")
|
||||||
|
def old_configure(
|
||||||
|
prepare_configure,
|
||||||
|
prepare_configure_options,
|
||||||
|
prefix,
|
||||||
|
includedir,
|
||||||
|
libdir,
|
||||||
|
prefer_mozillabuild_path,
|
||||||
|
altered_path,
|
||||||
|
extra_env,
|
||||||
|
build_env,
|
||||||
|
old_configure,
|
||||||
|
awk,
|
||||||
|
m4,
|
||||||
|
shell,
|
||||||
|
cache_file_option,
|
||||||
|
):
|
||||||
|
if altered_path:
|
||||||
|
path = altered_path
|
||||||
|
else:
|
||||||
|
path = os.pathsep.join(prefer_mozillabuild_path)
|
||||||
|
|
||||||
|
cxx = prepare_configure.assignments.get("CXX")
|
||||||
|
cc = prepare_configure.assignments.get("CC")
|
||||||
|
|
||||||
|
if cc and cxx:
|
||||||
|
if cache_file_option:
|
||||||
|
config_cache = cache_file_option[0]
|
||||||
|
else:
|
||||||
|
config_cache = "config.cache"
|
||||||
|
|
||||||
|
if os.path.exists(config_cache):
|
||||||
|
remove = False
|
||||||
|
with open(config_cache, "r") as cfg_cache:
|
||||||
|
cxx_pattern = re.compile(
|
||||||
|
r"^ac_cv_prog_CXX=\${ac_cv_prog_CXX='(.*)'}$"
|
||||||
|
)
|
||||||
|
cc_pattern = re.compile(r"^ac_cv_prog_CC=\${ac_cv_prog_CC='(.*)'}$")
|
||||||
|
for line in cfg_cache:
|
||||||
|
m = cc_pattern.match(line)
|
||||||
|
if m and m.group(1) != cc:
|
||||||
|
remove = True
|
||||||
|
break
|
||||||
|
m = cxx_pattern.match(line)
|
||||||
|
if m and m.group(1) != cxx:
|
||||||
|
remove = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if remove:
|
||||||
|
log.info("invalidating config.cache")
|
||||||
|
os.remove(config_cache)
|
||||||
|
|
||||||
|
refresh = True
|
||||||
|
if os.path.exists(old_configure):
|
||||||
|
mtime = os.path.getmtime(old_configure)
|
||||||
|
aclocal = os.path.join(build_env.topsrcdir, "build", "autoconf", "*.m4")
|
||||||
|
for input in itertools.chain(
|
||||||
|
(
|
||||||
|
old_configure + ".in",
|
||||||
|
os.path.join(os.path.dirname(old_configure), "aclocal.m4"),
|
||||||
|
),
|
||||||
|
glob.iglob(aclocal),
|
||||||
|
):
|
||||||
|
if os.path.getmtime(input) > mtime:
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
refresh = False
|
||||||
|
|
||||||
|
if refresh:
|
||||||
|
autoconf = os.path.join(
|
||||||
|
build_env.topsrcdir, "build", "autoconf", "autoconf.sh"
|
||||||
|
)
|
||||||
|
log.info("Refreshing %s with %s", old_configure, autoconf)
|
||||||
|
env = dict(os.environ)
|
||||||
|
env["M4"] = m4
|
||||||
|
env["AWK"] = awk
|
||||||
|
env["AC_MACRODIR"] = os.path.join(build_env.topsrcdir, "build", "autoconf")
|
||||||
|
env["PATH"] = path
|
||||||
|
|
||||||
|
try:
|
||||||
|
script = subprocess.check_output(
|
||||||
|
[
|
||||||
|
shell,
|
||||||
|
autoconf,
|
||||||
|
"--localdir=%s" % os.path.dirname(old_configure),
|
||||||
|
old_configure + ".in",
|
||||||
|
],
|
||||||
|
# Fix the working directory, so that when m4 is called, that
|
||||||
|
# includes of relative paths are deterministically resolved
|
||||||
|
# relative to the directory containing old-configure.
|
||||||
|
cwd=os.path.dirname(old_configure),
|
||||||
|
env=env,
|
||||||
|
)
|
||||||
|
except CalledProcessError as exc:
|
||||||
|
die("autoconf exited with return code {}".format(exc.returncode))
|
||||||
|
|
||||||
|
if not script:
|
||||||
|
die(
|
||||||
|
"Generated old-configure is empty! Check that your autoconf 2.13 program works!"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Make old-configure append to config.log, where we put our own log.
|
||||||
|
# This could be done with a m4 macro, but it's way easier this way
|
||||||
|
script = script.replace(b">./config.log", b">>${CONFIG_LOG=./config.log}")
|
||||||
|
|
||||||
|
with NamedTemporaryFile(
|
||||||
|
mode="wb",
|
||||||
|
prefix=os.path.basename(old_configure),
|
||||||
|
dir=os.path.dirname(old_configure),
|
||||||
|
delete=False,
|
||||||
|
) as fh:
|
||||||
|
fh.write(script)
|
||||||
|
|
||||||
|
try:
|
||||||
|
os.rename(fh.name, old_configure)
|
||||||
|
except OSError:
|
||||||
|
try:
|
||||||
|
# Likely the file already existed (on Windows). Retry after removing it.
|
||||||
|
os.remove(old_configure)
|
||||||
|
os.rename(fh.name, old_configure)
|
||||||
|
except OSError as e:
|
||||||
|
die("Failed re-creating old-configure: %s" % e.message)
|
||||||
|
|
||||||
|
old_configure_options = {
|
||||||
|
"prefix": prefix[0],
|
||||||
|
"includedir": includedir[0],
|
||||||
|
"libdir": libdir[0],
|
||||||
|
}
|
||||||
|
cmd = (
|
||||||
|
[shell, old_configure]
|
||||||
|
+ prepare_configure_options.options
|
||||||
|
+ [f"--{k}={v}" for k, v in old_configure_options.items()]
|
||||||
|
)
|
||||||
|
|
||||||
|
env = dict(os.environ)
|
||||||
|
|
||||||
|
# For debugging purpose, in case it's not what we'd expect.
|
||||||
|
log.debug("Running %s", quote(*cmd))
|
||||||
|
|
||||||
|
# Our logging goes to config.log, the same file old.configure uses.
|
||||||
|
# We can't share the handle on the file, so close it.
|
||||||
|
logger = logging.getLogger("moz.configure")
|
||||||
|
config_log = None
|
||||||
|
for handler in logger.handlers:
|
||||||
|
if isinstance(handler, logging.FileHandler):
|
||||||
|
config_log = handler
|
||||||
|
config_log.close()
|
||||||
|
logger.removeHandler(config_log)
|
||||||
|
env["CONFIG_LOG"] = config_log.baseFilename
|
||||||
|
log_size = os.path.getsize(config_log.baseFilename)
|
||||||
|
break
|
||||||
|
|
||||||
|
env["PATH"] = path
|
||||||
|
|
||||||
|
if extra_env:
|
||||||
|
env.update(extra_env)
|
||||||
|
|
||||||
|
env["OLD_CONFIGURE_VARS"] = os.path.join(
|
||||||
|
build_env.topobjdir, "old-configure.vars"
|
||||||
|
)
|
||||||
|
proc = subprocess.Popen(
|
||||||
|
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env
|
||||||
|
)
|
||||||
|
while True:
|
||||||
|
line = proc.stdout.readline()
|
||||||
|
if not line:
|
||||||
|
break
|
||||||
|
log.info(line.rstrip())
|
||||||
|
|
||||||
|
ret = proc.wait()
|
||||||
|
if ret:
|
||||||
|
with log.queue_debug():
|
||||||
|
if config_log:
|
||||||
|
with open(config_log.baseFilename, "r") as fh:
|
||||||
|
fh.seek(log_size)
|
||||||
|
for line in fh:
|
||||||
|
log.debug(line.rstrip())
|
||||||
|
log.error("old-configure failed")
|
||||||
|
sys.exit(ret)
|
||||||
|
|
||||||
|
if config_log:
|
||||||
|
# Create a new handler in append mode
|
||||||
|
handler = logging.FileHandler(config_log.baseFilename, mode="a", delay=True)
|
||||||
|
handler.setFormatter(config_log.formatter)
|
||||||
|
logger.addHandler(handler)
|
||||||
|
|
||||||
|
raw_config = {
|
||||||
|
"split": split,
|
||||||
|
"unique_list": unique_list,
|
||||||
|
}
|
||||||
|
with open("config.data", "r") as fh:
|
||||||
|
code = compile(fh.read(), "config.data", "exec")
|
||||||
|
exec(code, raw_config)
|
||||||
|
|
||||||
|
# Ensure all the flags known to old-configure appear in the
|
||||||
|
# @old_configure_options above.
|
||||||
|
all_options = set(prepare_configure_options.all_options)
|
||||||
|
for flag in raw_config["flags"]:
|
||||||
|
if flag not in all_options:
|
||||||
|
die(
|
||||||
|
"Missing option in `@old_configure_options` in %s: %s",
|
||||||
|
__file__,
|
||||||
|
flag,
|
||||||
|
)
|
||||||
|
|
||||||
|
# If the code execution above fails, we want to keep the file around for
|
||||||
|
# debugging.
|
||||||
|
os.remove("config.data")
|
||||||
|
|
||||||
|
return namespace(
|
||||||
|
**{
|
||||||
|
c: [
|
||||||
|
(k[1:-1], v[1:-1] if isinstance(v, str) else v)
|
||||||
|
for k, v in raw_config[c]
|
||||||
|
# Eventually we'll want to filter out all lowercase keys. (bug 1869127)
|
||||||
|
# For now, we only filter out the most problematic one that
|
||||||
|
# we know is unused.
|
||||||
|
if k != " target_cpu "
|
||||||
|
]
|
||||||
|
for c in ("substs", "defines")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
return old_configure
|
||||||
|
|
||||||
|
|
||||||
|
old_configure = old_configure_for(old_configure)
|
||||||
|
set_config("OLD_CONFIGURE_SUBSTS", old_configure.substs)
|
||||||
|
set_config("OLD_CONFIGURE_DEFINES", old_configure.defines)
|
||||||
|
|
||||||
|
|
||||||
|
# Assuming no other option is declared after this function, handle the
|
||||||
|
# env options that were injected by mozconfig_options by creating dummy
|
||||||
|
# Option instances and having the sandbox's CommandLineHelper handle
|
||||||
|
# them. We only do so for options that haven't been declared so far,
|
||||||
|
# which should be a proxy for the options that old-configure handles
|
||||||
|
# and that we don't know anything about.
|
||||||
|
@depends("--help")
|
||||||
|
@imports("__sandbox__")
|
||||||
|
@imports(_from="mozbuild.configure.options", _import="Option")
|
||||||
|
def remaining_mozconfig_options(_):
|
||||||
|
helper = __sandbox__._helper
|
||||||
|
for arg in list(helper):
|
||||||
|
if helper._origins[arg] != "mozconfig":
|
||||||
|
continue
|
||||||
|
name = arg.split("=", 1)[0]
|
||||||
|
if name.isupper() and name not in __sandbox__._options:
|
||||||
|
option = Option(env=name, nargs="*", help=name)
|
||||||
|
helper.handle(option)
|
||||||
|
|
||||||
|
|
||||||
|
# Please do not add anything after remaining_mozconfig_options()
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Common options for artifact builds to set automation steps.
|
# Common options for artifact builds to set automation steps.
|
||||||
# This gets included before mozconfig.automation.
|
# This gets included before mozconfig.automation.
|
||||||
|
|
||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
||||||
MOZ_AUTOMATION_ARTIFACT_BUILDS=1
|
MOZ_AUTOMATION_ARTIFACT_BUILDS=1
|
||||||
|
|||||||
44
configure.py
44
configure.py
@@ -73,6 +73,9 @@ def main(argv):
|
|||||||
|
|
||||||
config = {}
|
config = {}
|
||||||
|
|
||||||
|
if "OLD_CONFIGURE" not in os.environ:
|
||||||
|
os.environ["OLD_CONFIGURE"] = os.path.join(base_dir, "old-configure")
|
||||||
|
|
||||||
sandbox = ConfigureSandbox(config, os.environ, argv)
|
sandbox = ConfigureSandbox(config, os.environ, argv)
|
||||||
|
|
||||||
if not sandbox._help:
|
if not sandbox._help:
|
||||||
@@ -141,21 +144,28 @@ def main(argv):
|
|||||||
|
|
||||||
buildstatus("START_configure config.status")
|
buildstatus("START_configure config.status")
|
||||||
logging.getLogger("moz.configure").info("Creating config.status")
|
logging.getLogger("moz.configure").info("Creating config.status")
|
||||||
|
|
||||||
|
old_js_configure_substs = config.pop("OLD_JS_CONFIGURE_SUBSTS", None)
|
||||||
|
old_js_configure_defines = config.pop("OLD_JS_CONFIGURE_DEFINES", None)
|
||||||
try:
|
try:
|
||||||
js_config = config.copy()
|
if old_js_configure_substs or old_js_configure_defines:
|
||||||
pwd = os.getcwd()
|
js_config = config.copy()
|
||||||
try:
|
pwd = os.getcwd()
|
||||||
os.makedirs("js/src", exist_ok=True)
|
try:
|
||||||
os.chdir("js/src")
|
os.makedirs("js/src", exist_ok=True)
|
||||||
# The build system frontend expects $objdir/js/src/config.status
|
os.chdir("js/src")
|
||||||
# to have $objdir/js/src as topobjdir.
|
js_config["OLD_CONFIGURE_SUBSTS"] = old_js_configure_substs
|
||||||
# We want forward slashes on all platforms.
|
js_config["OLD_CONFIGURE_DEFINES"] = old_js_configure_defines
|
||||||
js_config["TOPOBJDIR"] += "/js/src"
|
# The build system frontend expects $objdir/js/src/config.status
|
||||||
ret = config_status(js_config, execute=False)
|
# to have $objdir/js/src as topobjdir.
|
||||||
if ret:
|
# We want forward slashes on all platforms.
|
||||||
return ret
|
js_config["TOPOBJDIR"] += "/js/src"
|
||||||
finally:
|
ret = config_status(js_config, execute=False)
|
||||||
os.chdir(pwd)
|
if ret:
|
||||||
|
return ret
|
||||||
|
finally:
|
||||||
|
os.chdir(pwd)
|
||||||
|
|
||||||
return config_status(config)
|
return config_status(config)
|
||||||
finally:
|
finally:
|
||||||
buildstatus("END_configure config.status")
|
buildstatus("END_configure config.status")
|
||||||
@@ -207,11 +217,17 @@ def config_status(config, execute=True):
|
|||||||
"TOPSRCDIR",
|
"TOPSRCDIR",
|
||||||
"TOPOBJDIR",
|
"TOPOBJDIR",
|
||||||
"CONFIG_STATUS_DEPS",
|
"CONFIG_STATUS_DEPS",
|
||||||
|
"OLD_CONFIGURE_SUBSTS",
|
||||||
|
"OLD_CONFIGURE_DEFINES",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
for k, v in config["OLD_CONFIGURE_SUBSTS"]:
|
||||||
|
sanitized_config["substs"][k] = sanitize_config(v)
|
||||||
sanitized_config["defines"] = {
|
sanitized_config["defines"] = {
|
||||||
k: sanitize_config(v) for k, v in config["DEFINES"].items()
|
k: sanitize_config(v) for k, v in config["DEFINES"].items()
|
||||||
}
|
}
|
||||||
|
for k, v in config["OLD_CONFIGURE_DEFINES"]:
|
||||||
|
sanitized_config["defines"][k] = sanitize_config(v)
|
||||||
sanitized_config["topsrcdir"] = config["TOPSRCDIR"]
|
sanitized_config["topsrcdir"] = config["TOPSRCDIR"]
|
||||||
sanitized_config["topobjdir"] = config["TOPOBJDIR"]
|
sanitized_config["topobjdir"] = config["TOPOBJDIR"]
|
||||||
sanitized_config["mozconfig"] = config.get("MOZCONFIG")
|
sanitized_config["mozconfig"] = config.get("MOZCONFIG")
|
||||||
|
|||||||
23
js/src/aclocal.m4
vendored
Normal file
23
js/src/aclocal.m4
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
dnl
|
||||||
|
dnl Local autoconf macros used with mozilla
|
||||||
|
dnl The contents of this file are under the Public Domain.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
builtin(include, ../../build/autoconf/hooks.m4)dnl
|
||||||
|
builtin(include, ../../build/autoconf/config.status.m4)dnl
|
||||||
|
builtin(include, ../../build/autoconf/altoptions.m4)dnl
|
||||||
|
|
||||||
|
define([__MOZ_AC_INIT_PREPARE], defn([AC_INIT_PREPARE]))
|
||||||
|
define([AC_INIT_PREPARE],
|
||||||
|
[if test -z "$srcdir"; then
|
||||||
|
srcdir=`dirname "[$]0"`
|
||||||
|
fi
|
||||||
|
srcdir="$srcdir/../.."
|
||||||
|
__MOZ_AC_INIT_PREPARE($1)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl This won't actually read the mozconfig, but data that configure.py
|
||||||
|
dnl will have placed for us to read. Configure.py takes care of not reading
|
||||||
|
dnl the mozconfig where appropriate but can still give us some variables
|
||||||
|
dnl to read.
|
||||||
|
MOZ_READ_MOZCONFIG(.)
|
||||||
1
js/src/configure
vendored
1
js/src/configure
vendored
@@ -6,6 +6,7 @@
|
|||||||
SRCDIR=$(dirname $0)
|
SRCDIR=$(dirname $0)
|
||||||
TOPSRCDIR="$SRCDIR"/../..
|
TOPSRCDIR="$SRCDIR"/../..
|
||||||
PYTHON3="${PYTHON3:-python3}"
|
PYTHON3="${PYTHON3:-python3}"
|
||||||
|
export OLD_CONFIGURE="$SRCDIR"/old-configure
|
||||||
|
|
||||||
set -- "$@" --enable-project=js
|
set -- "$@" --enable-project=js
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ ac_add_options --disable-replace-malloc
|
|||||||
# -Wignored-attributes is very verbose due to attributes being
|
# -Wignored-attributes is very verbose due to attributes being
|
||||||
# ignored on template parameters.
|
# ignored on template parameters.
|
||||||
ANALYSIS_EXTRA_CFLAGS="-Wno-attributes -Wno-ignored-attributes"
|
ANALYSIS_EXTRA_CFLAGS="-Wno-attributes -Wno-ignored-attributes"
|
||||||
export CFLAGS="$CFLAGS $ANALYSIS_EXTRA_CFLAGS"
|
CFLAGS="$CFLAGS $ANALYSIS_EXTRA_CFLAGS"
|
||||||
export CPPFLAGS="$CPPFLAGS $ANALYSIS_EXTRA_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $ANALYSIS_EXTRA_CFLAGS"
|
||||||
export CXXFLAGS="$CXXFLAGS $ANALYSIS_EXTRA_CFLAGS"
|
CXXFLAGS="$CXXFLAGS $ANALYSIS_EXTRA_CFLAGS"
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ print("")
|
|||||||
rsync_filter_list = """
|
rsync_filter_list = """
|
||||||
# Top-level config and build files
|
# Top-level config and build files
|
||||||
|
|
||||||
|
+ /aclocal.m4
|
||||||
+ /client.mk
|
+ /client.mk
|
||||||
+ /configure.py
|
+ /configure.py
|
||||||
+ /LICENSE
|
+ /LICENSE
|
||||||
@@ -382,6 +383,33 @@ def copy_cargo_toml():
|
|||||||
f.write(content)
|
f.write(content)
|
||||||
|
|
||||||
|
|
||||||
|
def generate_configure():
|
||||||
|
"""Generate configure files to avoid build dependency on autoconf-2.13"""
|
||||||
|
|
||||||
|
src_old_configure_in_file = topsrc_dir / "js" / "src" / "old-configure.in"
|
||||||
|
dest_old_configure_file = target_dir / "js" / "src" / "old-configure"
|
||||||
|
|
||||||
|
js_src_dir = topsrc_dir / "js" / "src"
|
||||||
|
|
||||||
|
env = os.environ.copy()
|
||||||
|
env["M4"] = m4
|
||||||
|
env["AWK"] = awk
|
||||||
|
env["AC_MACRODIR"] = topsrc_dir / "build" / "autoconf"
|
||||||
|
|
||||||
|
with dest_old_configure_file.open("w") as f:
|
||||||
|
subprocess.run(
|
||||||
|
[
|
||||||
|
"sh",
|
||||||
|
str(topsrc_dir / "build" / "autoconf" / "autoconf.sh"),
|
||||||
|
f"--localdir={js_src_dir}",
|
||||||
|
str(src_old_configure_in_file),
|
||||||
|
],
|
||||||
|
stdout=f,
|
||||||
|
check=True,
|
||||||
|
env=env,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def copy_file(filename, content):
|
def copy_file(filename, content):
|
||||||
"""Copy an existing file from the staging area, or create a new file
|
"""Copy an existing file from the staging area, or create a new file
|
||||||
with the given contents if it does not exist."""
|
with the given contents if it does not exist."""
|
||||||
@@ -424,6 +452,7 @@ def stage():
|
|||||||
create_target_dir()
|
create_target_dir()
|
||||||
sync_files()
|
sync_files()
|
||||||
copy_cargo_toml()
|
copy_cargo_toml()
|
||||||
|
generate_configure()
|
||||||
copy_file("INSTALL", INSTALL_CONTENT)
|
copy_file("INSTALL", INSTALL_CONTENT)
|
||||||
copy_file("README", README_CONTENT)
|
copy_file("README", README_CONTENT)
|
||||||
copy_file("mozconfig", MOZCONFIG_DEBUG_CONTENT)
|
copy_file("mozconfig", MOZCONFIG_DEBUG_CONTENT)
|
||||||
|
|||||||
23
js/src/old-configure.in
Normal file
23
js/src/old-configure.in
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||||
|
dnl vi: set tabstop=4 shiftwidth=4 expandtab syntax=m4:
|
||||||
|
dnl This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
dnl ========================================================
|
||||||
|
AC_PREREQ(2.13)
|
||||||
|
AC_INIT(js/src/jsapi.h)
|
||||||
|
AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
|
||||||
|
|
||||||
|
dnl ========================================================
|
||||||
|
dnl =
|
||||||
|
dnl = Maintainer debug option (no --enable equivalent)
|
||||||
|
dnl =
|
||||||
|
dnl ========================================================
|
||||||
|
|
||||||
|
dnl Spit out some output
|
||||||
|
dnl ========================================================
|
||||||
|
MOZ_CREATE_CONFIG_STATUS()
|
||||||
|
|
||||||
|
rm -fr confdefs* $ac_clean_files
|
||||||
89
js/sub.configure
Normal file
89
js/sub.configure
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||||
|
# vim: set filetype=python:
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
|
||||||
|
@depends(build_environment)
|
||||||
|
@imports("logging")
|
||||||
|
@imports(_from="__builtin__", _import="object")
|
||||||
|
@imports(_from="mozbuild.configure.util", _import="ConfigureOutputHandler")
|
||||||
|
def old_js_configure(build_env):
|
||||||
|
class PrefixOutput(object):
|
||||||
|
def __init__(self, prefix, fh):
|
||||||
|
self._fh = fh
|
||||||
|
self._begin_line = True
|
||||||
|
self._prefix = prefix
|
||||||
|
|
||||||
|
def write(self, content):
|
||||||
|
if self._begin_line:
|
||||||
|
self._fh.write(self._prefix)
|
||||||
|
self._fh.write(("\n" + self._prefix).join(content.splitlines()))
|
||||||
|
self._begin_line = content.endswith("\n")
|
||||||
|
if self._begin_line:
|
||||||
|
self._fh.write("\n")
|
||||||
|
|
||||||
|
def flush(self):
|
||||||
|
self._fh.flush()
|
||||||
|
|
||||||
|
logger = logging.getLogger("moz.configure")
|
||||||
|
formatter = logging.Formatter("js/src> %(levelname)s: %(message)s")
|
||||||
|
for handler in logger.handlers:
|
||||||
|
handler.setFormatter(formatter)
|
||||||
|
if isinstance(handler, ConfigureOutputHandler):
|
||||||
|
handler._stdout = PrefixOutput("js/src> ", handler._stdout)
|
||||||
|
return os.path.join(build_env.topsrcdir, "js", "src", "old-configure")
|
||||||
|
|
||||||
|
|
||||||
|
@depends(old_configure.substs, mozconfig)
|
||||||
|
def old_js_configure_env(substs, mozconfig):
|
||||||
|
substs = dict(substs)
|
||||||
|
# Here, we mimic what we used to do from old-configure, which makes this
|
||||||
|
# all awkward.
|
||||||
|
|
||||||
|
# Variables that were explicitly exported from old-configure, and those
|
||||||
|
# explicitly set in the environment when invoking old-configure, were
|
||||||
|
# automatically inherited from subconfigure. We assume the relevant ones
|
||||||
|
# have a corresponding AC_SUBST in old-configure, making them available
|
||||||
|
# in `substs`.
|
||||||
|
extra_env = {}
|
||||||
|
|
||||||
|
for var in (
|
||||||
|
"MOZ_DEV_EDITION",
|
||||||
|
"STLPORT_LIBS",
|
||||||
|
):
|
||||||
|
if var in substs:
|
||||||
|
value = substs[var]
|
||||||
|
elif (
|
||||||
|
mozconfig
|
||||||
|
and var in mozconfig
|
||||||
|
and not mozconfig[var][1].startswith("removed")
|
||||||
|
):
|
||||||
|
value = mozconfig[var][0]
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
if isinstance(value, list):
|
||||||
|
value = " ".join(value)
|
||||||
|
extra_env[var] = value
|
||||||
|
|
||||||
|
return extra_env
|
||||||
|
|
||||||
|
|
||||||
|
old_js_configure = old_configure_for(old_js_configure, extra_env=old_js_configure_env)
|
||||||
|
set_config("OLD_JS_CONFIGURE_SUBSTS", old_js_configure.substs)
|
||||||
|
set_config("OLD_JS_CONFIGURE_DEFINES", old_js_configure.defines)
|
||||||
|
|
||||||
|
|
||||||
|
@dependable
|
||||||
|
@imports("logging")
|
||||||
|
@imports(_from="mozbuild.configure.util", _import="ConfigureOutputHandler")
|
||||||
|
def post_old_js_configure():
|
||||||
|
# Restore unprefixed logging.
|
||||||
|
formatter = logging.Formatter("%(levelname)s: %(message)s")
|
||||||
|
logger = logging.getLogger("moz.configure")
|
||||||
|
for handler in logger.handlers:
|
||||||
|
handler.setFormatter(formatter)
|
||||||
|
if isinstance(handler, ConfigureOutputHandler):
|
||||||
|
handler._stdout.flush()
|
||||||
|
handler._stdout = handler._stdout._fh
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Many things aren't appropriate for a frontend-only build.
|
# Many things aren't appropriate for a frontend-only build.
|
||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
MOZ_AUTOMATION_PACKAGE=0
|
MOZ_AUTOMATION_PACKAGE=0
|
||||||
MOZ_AUTOMATION_UPLOAD=0
|
MOZ_AUTOMATION_UPLOAD=0
|
||||||
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Many things aren't appropriate for a frontend-only build.
|
# Many things aren't appropriate for a frontend-only build.
|
||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
MOZ_AUTOMATION_PACKAGE=0
|
MOZ_AUTOMATION_PACKAGE=0
|
||||||
MOZ_AUTOMATION_UPLOAD=0
|
MOZ_AUTOMATION_UPLOAD=0
|
||||||
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Many things aren't appropriate for a frontend-only build.
|
# Many things aren't appropriate for a frontend-only build.
|
||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
MOZ_AUTOMATION_PACKAGE=0
|
MOZ_AUTOMATION_PACKAGE=0
|
||||||
MOZ_AUTOMATION_UPLOAD=0
|
MOZ_AUTOMATION_UPLOAD=0
|
||||||
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
# This file is included at the bottom of all native android mozconfigs
|
# This file is included at the bottom of all native android mozconfigs
|
||||||
#
|
#
|
||||||
# Disable enforcing that add-ons are signed by the trusted root
|
# Disable enforcing that add-ons are signed by the trusted root
|
||||||
unset MOZ_REQUIRE_SIGNING
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
. "$topsrcdir/build/mozconfig.common.override"
|
. "$topsrcdir/build/mozconfig.common.override"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
export MOZ_AUTOMATION_CHECK=0
|
MOZ_AUTOMATION_CHECK=0
|
||||||
|
|
||||||
. $topsrcdir/mobile/ios/config/mozconfigs/ios/opt
|
. $topsrcdir/mobile/ios/config/mozconfigs/ios/opt
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ with Files("LICENSE"):
|
|||||||
with Files("mots.yaml"):
|
with Files("mots.yaml"):
|
||||||
BUG_COMPONENT = ("Conduit", "mots")
|
BUG_COMPONENT = ("Conduit", "mots")
|
||||||
|
|
||||||
|
with Files("aclocal.m4"):
|
||||||
|
BUG_COMPONENT = ("Firefox Build System", "General")
|
||||||
|
|
||||||
with Files("Cargo.*"):
|
with Files("Cargo.*"):
|
||||||
BUG_COMPONENT = ("Firefox Build System", "General")
|
BUG_COMPONENT = ("Firefox Build System", "General")
|
||||||
|
|
||||||
|
|||||||
@@ -944,6 +944,12 @@ with only_when(cross_compiling):
|
|||||||
|
|
||||||
# Please do not add configure checks from here on.
|
# Please do not add configure checks from here on.
|
||||||
|
|
||||||
|
# Fallthrough to autoconf-based configure
|
||||||
|
include("build/moz.configure/old.configure")
|
||||||
|
|
||||||
|
# JS Subconfigure.
|
||||||
|
include("js/sub.configure", when=compile_environment & toolkit)
|
||||||
|
|
||||||
|
|
||||||
@depends(build_environment, configure_cache)
|
@depends(build_environment, configure_cache)
|
||||||
@imports(_import="json")
|
@imports(_import="json")
|
||||||
@@ -988,6 +994,10 @@ def config_status_deps(build_env, build_project):
|
|||||||
os.path.join(topsrcdir, "python", "sites", "common.txt"),
|
os.path.join(topsrcdir, "python", "sites", "common.txt"),
|
||||||
os.path.join(topsrcdir, "python", "sites", "mach.txt"),
|
os.path.join(topsrcdir, "python", "sites", "mach.txt"),
|
||||||
os.path.join(topsrcdir, "python", "mach", "mach", "site.py"),
|
os.path.join(topsrcdir, "python", "mach", "mach", "site.py"),
|
||||||
|
os.path.join(topsrcdir, "aclocal.m4"),
|
||||||
|
os.path.join(topsrcdir, "old-configure.in"),
|
||||||
|
os.path.join(topsrcdir, "js", "src", "aclocal.m4"),
|
||||||
|
os.path.join(topsrcdir, "js", "src", "old-configure.in"),
|
||||||
]
|
]
|
||||||
+ glob.glob(os.path.join(topsrcdir, "build", "autoconf", "*.m4"))
|
+ glob.glob(os.path.join(topsrcdir, "build", "autoconf", "*.m4"))
|
||||||
)
|
)
|
||||||
|
|||||||
18
old-configure.in
Normal file
18
old-configure.in
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||||
|
dnl vi: set tabstop=4 shiftwidth=4 expandtab syntax=m4:
|
||||||
|
dnl This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
dnl ========================================================
|
||||||
|
AC_PREREQ(2.13)
|
||||||
|
AC_INIT(config/config.mk)
|
||||||
|
AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
|
||||||
|
|
||||||
|
dnl Spit out some output
|
||||||
|
dnl ========================================================
|
||||||
|
|
||||||
|
MOZ_CREATE_CONFIG_STATUS()
|
||||||
|
|
||||||
|
rm -fr confdefs* $ac_clean_files
|
||||||
@@ -61,9 +61,6 @@ def find_mozconfig(topsrcdir: Union[str, Path], env=os.environ):
|
|||||||
|
|
||||||
env_path = env.get("MOZCONFIG", None) or None
|
env_path = env.get("MOZCONFIG", None) or None
|
||||||
|
|
||||||
if env_path == os.devnull:
|
|
||||||
env_path = None
|
|
||||||
|
|
||||||
if env_path is not None:
|
if env_path is not None:
|
||||||
env_path = Path(env_path)
|
env_path = Path(env_path)
|
||||||
|
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ class BaseConfigureTest(unittest.TestCase):
|
|||||||
try:
|
try:
|
||||||
environ = dict(
|
environ = dict(
|
||||||
environ,
|
environ,
|
||||||
|
OLD_CONFIGURE=os.path.join(topsrcdir, "old-configure"),
|
||||||
MOZCONFIG=mozconfig_path,
|
MOZCONFIG=mozconfig_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class Lint(unittest.TestCase):
|
|||||||
def lint(self, project):
|
def lint(self, project):
|
||||||
sandbox = LintSandbox(
|
sandbox = LintSandbox(
|
||||||
{
|
{
|
||||||
|
"OLD_CONFIGURE": os.path.join(topsrcdir, "old-configure"),
|
||||||
"MOZCONFIG": os.path.join(
|
"MOZCONFIG": os.path.join(
|
||||||
os.path.dirname(test_path), "data", "empty_mozconfig"
|
os.path.dirname(test_path), "data", "empty_mozconfig"
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -116,9 +116,9 @@ def all_configure_options():
|
|||||||
# __sandbox__._options contains items for both option.name and
|
# __sandbox__._options contains items for both option.name and
|
||||||
# option.env. But it's also an OrderedDict, meaning both are
|
# option.env. But it's also an OrderedDict, meaning both are
|
||||||
# consecutive.
|
# consecutive.
|
||||||
# Also ignore MOZCONFIG because they're not
|
# Also ignore OLD_CONFIGURE and MOZCONFIG because they're not
|
||||||
# interesting.
|
# interesting.
|
||||||
if option == previous or option.env in ("MOZCONFIG",):
|
if option == previous or option.env in ("OLD_CONFIGURE", "MOZCONFIG"):
|
||||||
continue
|
continue
|
||||||
previous = option
|
previous = option
|
||||||
value = __sandbox__._value_for(option)
|
value = __sandbox__._value_for(option)
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
# This file is included by all "tools/rusttests" mozconfigs
|
# This file is included by all "tools/rusttests" mozconfigs
|
||||||
|
|
||||||
export MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
MOZ_AUTOMATION_BUILD_SYMBOLS=0
|
||||||
MOZ_AUTOMATION_PACKAGE=0
|
MOZ_AUTOMATION_PACKAGE=0
|
||||||
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
|
||||||
MOZ_AUTOMATION_UPLOAD=0
|
MOZ_AUTOMATION_UPLOAD=0
|
||||||
export MOZ_AUTOMATION_CHECK=0
|
MOZ_AUTOMATION_CHECK=0
|
||||||
ac_add_options --enable-project=tools/rusttests
|
ac_add_options --enable-project=tools/rusttests
|
||||||
. "$topsrcdir/build/mozconfig.common"
|
. "$topsrcdir/build/mozconfig.common"
|
||||||
. "$topsrcdir/build/mozconfig.common.override"
|
. "$topsrcdir/build/mozconfig.common.override"
|
||||||
|
|||||||
@@ -1,5 +1,2 @@
|
|||||||
. "$topsrcdir/build/unix/mozconfig.linux"
|
. "$topsrcdir/build/unix/mozconfig.linux"
|
||||||
. "$topsrcdir/tools/rusttests/config/mozconfigs/common"
|
. "$topsrcdir/tools/rusttests/config/mozconfigs/common"
|
||||||
|
|
||||||
# Not active for that configuration
|
|
||||||
unset MOZ_NO_PIE_COMPAT
|
|
||||||
|
|||||||
Reference in New Issue
Block a user