Skip to content

Commit

Permalink
Bug 1787977 - Include configure in the tree. r=firefox-build-system-r…
Browse files Browse the repository at this point in the history
…eviewers,nalexander

Historically, we had configure.in in the tree, and generated configure
with autoconf via client.mk at build time, and we'd run that configure.
As a side effect, configure would be shipped in source tarballs, as with
traditional autoconf-driven software.

Bug 1671424 changed that, and made `mach build`/`mach configure` invoke
configure.py directly, without needing configure. As a side effect,
configure stopped being generated in source directories. An unexpected
side effect was that configure stopped being shipped in source tarballs.

Anyways, it has been long enough now that adding a configure file in the
tree shouldn't cause too many problems with people updating their trees
where a configure file might exist from those older builds.

Differential Revision: https://phabricator.services.mozilla.com/D155923
  • Loading branch information
glandium committed Aug 30, 2022
1 parent 7dc1380 commit 4045d85
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 51 deletions.
10 changes: 10 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# 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/.

SRCDIR=$(dirname $0)
TOPSRCDIR="$SRCDIR"
PYTHON3="${PYTHON3:-python3}"

exec "$PYTHON3" "$TOPSRCDIR/configure.py" "$@"
19 changes: 0 additions & 19 deletions configure.in

This file was deleted.

13 changes: 13 additions & 0 deletions js/src/configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
# 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/.

SRCDIR=$(dirname $0)
TOPSRCDIR="$SRCDIR"/../..
PYTHON3="${PYTHON3:-python3}"
export OLD_CONFIGURE="$SRCDIR"/old-configure

set -- "$@" --enable-project=js

exec "$PYTHON3" "$TOPSRCDIR/configure.py" "$@"
22 changes: 0 additions & 22 deletions js/src/configure.in

This file was deleted.

8 changes: 0 additions & 8 deletions js/src/make-source-package.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,17 +375,9 @@ class State(enum.Enum):
def generate_configure():
"""Generate configure files to avoid build dependency on autoconf-2.13"""

src_configure_in_file = topsrc_dir / "js" / "src" / "configure.in"
src_old_configure_in_file = topsrc_dir / "js" / "src" / "old-configure.in"
dest_configure_file = target_dir / "js" / "src" / "configure"
dest_old_configure_file = target_dir / "js" / "src" / "old-configure"

shutil.copy2(
str(src_configure_in_file), str(dest_configure_file), follow_symlinks=False
)
st = dest_configure_file.stat()
dest_configure_file.chmod(st.st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)

js_src_dir = topsrc_dir / "js" / "src"

env = os.environ.copy()
Expand Down
4 changes: 2 additions & 2 deletions moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,8 @@ def config_status_deps(build_env, build_project):
+ extra_deps
+ [
os.path.join(topsrcdir, "CLOBBER"),
os.path.join(topsrcdir, "configure.in"),
os.path.join(topsrcdir, "js", "src", "configure.in"),
os.path.join(topsrcdir, "configure"),
os.path.join(topsrcdir, "js", "src", "configure"),
os.path.join(topsrcdir, "nsprpub", "configure"),
os.path.join(topsrcdir, "config", "milestone.txt"),
os.path.join(topsrcdir, "browser", "config", "version.txt"),
Expand Down

0 comments on commit 4045d85

Please sign in to comment.