From 2f981267c7f1e0a66d4f77f7653f0acdf1218674 Mon Sep 17 00:00:00 2001 From: Alex Kontos Date: Fri, 29 Jul 2022 14:05:58 +0100 Subject: [PATCH] style: format mozconfig's with ShellCheck (cherry picked from commit 3e3d5e5afbd23caf9b8fa5bbb35b5504cb3b24ed) --- .mozconfig | 13 +++++++------ .mozconfig-aarch64-apple-darwin | 24 +++++++++++++----------- .mozconfig-x86_64-apple-darwin | 25 ++++++++++++++----------- .mozconfig-x86_64-pc-linux-gnu | 14 ++++++++------ .mozconfig-x86_64-pc-windows-msvc | 28 +++++++++++++++------------- 5 files changed, 57 insertions(+), 47 deletions(-) diff --git a/.mozconfig b/.mozconfig index 9672afd59920..253db873f85f 100644 --- a/.mozconfig +++ b/.mozconfig @@ -5,8 +5,8 @@ case $(uname -s) in Darwin) # Any macOS specific settings # For release builds we should use -march=core2 -mtune=haswell - export CC=$HOME/.mozbuild/clang/bin/clang - export CXX=$HOME/.mozbuild/clang/bin/clang++ + export CC="$HOME"/.mozbuild/clang/bin/clang + export CXX="$HOME"/.mozbuild/clang/bin/clang++ ;; MINGW*) # Any Windows specific settings @@ -19,14 +19,14 @@ case $(uname -s) in case $(uname -m) in x86_64) if test -d "$HOME/.mozbuild/clang/bin"; then - export CC=$HOME/.mozbuild/clang/bin/clang - export CXX=$HOME/.mozbuild/clang/bin/clang++ + export CC="$HOME"/.mozbuild/clang/bin/clang + export CXX="$HOME"/.mozbuild/clang/bin/clang++ else export CC=clang export CXX=clang++ fi if test -f "$HOME/.mozbuild/nasm/nasm"; then - export NASM=$HOME/.mozbuild/nasm/nasm + export NASM="$HOME"/.mozbuild/nasm/nasm fi ac_add_options --target=x86_64-pc-linux-gnu ;; @@ -67,4 +67,5 @@ elif test -f "$HOME/.mozbuild/sccache/sccache"; then fi mk_add_options AUTOCLOBBER=1 -MOZ_REQUIRE_SIGNING= +mk_add_options MOZ_OBJDIR=./obj-"$(uname -s)"-"$(uname -m)" +export MOZ_REQUIRE_SIGNING= diff --git a/.mozconfig-aarch64-apple-darwin b/.mozconfig-aarch64-apple-darwin index 10861822461f..b1d2904d27ba 100644 --- a/.mozconfig-aarch64-apple-darwin +++ b/.mozconfig-aarch64-apple-darwin @@ -1,19 +1,20 @@ +#!/bin/sh # Targetting ARM64 builds. Expected to be run on Linux. TOOLS=$HOME/macos-cross -CROSS_SYSROOT=${TOOLS}/MacOSX12.3.sdk -export CC=$HOME/.mozbuild/clang/bin/clang -export CXX=$HOME/.mozbuild/clang/bin/clang++ -export DMG_TOOL=${TOOLS}/dmg/dmg -export DSYMUTIL=$HOME/.mozbuild/clang/bin/dsymutil -export HFS_TOOL=${TOOLS}/dmg/hfsplus +CROSS_SYSROOT=$TOOLS/MacOSX12.3.sdk +export CC="$HOME"/.mozbuild/clang/bin/clang +export CXX="$HOME"/.mozbuild/clang/bin/clang++ +export DMG_TOOL="$TOOLS"/dmg/dmg +export DSYMUTIL="$HOME"/.mozbuild/clang/bin/dsymutil +export HFS_TOOL="$TOOLS"/dmg/hfsplus export HOST_CFLAGS="-g" export HOST_CXXFLAGS="-g" export HOST_LDFLAGS="-g" -export MACOS_SDK_DIR=$CROSS_SYSROOT -export MKFSHFS=${TOOLS}/hfsplus-tools/newfs_hfs +export MACOS_SDK_DIR="$CROSS_SYSROOT" +export MKFSHFS="$TOOLS"/hfsplus-tools/newfs_hfs mk_add_options "export LD_LIBRARY_PATH=$HOME/.mozbuild/clang/lib" -mk_add_options "export PATH=${TOOLS}/cctools/bin:$HOME/.mozbuild/clang/bin:$PATH" +mk_add_options "export PATH=$TOOLS/cctools/bin:$HOME/.mozbuild/clang/bin:$PATH" unset MOZ_STDCXX_COMPAT if test "$WFX_RELEASE"; then @@ -40,7 +41,7 @@ ac_add_options --enable-bootstrap if test -x "$(command -v sccache)"; then ac_add_options --with-ccache=sccache elif test -f "$HOME/.mozbuild/sccache/sccache"; then - ac_add_options --with-ccache=$HOME/.mozbuild/sccache/sccache + ac_add_options --with-ccache="$HOME"/.mozbuild/sccache/sccache fi ac_add_options --enable-install-strip ac_add_options --enable-strip @@ -53,7 +54,8 @@ ac_add_options --with-app-name=waterfox ac_add_options --with-branding=waterfox/browser/branding ac_add_options --with-distribution-id=net.waterfox if test -f "$PWD/browser/locales/l10n"; then - ac_add_options --with-l10n-base=$PWD/browser/locales/l10n + ac_add_options --with-l10n-base="$PWD"/browser/locales/l10n fi mk_add_options AUTOCLOBBER=1 +export MOZ_REQUIRE_SIGNING= diff --git a/.mozconfig-x86_64-apple-darwin b/.mozconfig-x86_64-apple-darwin index 6dd3971af104..1a111286f193 100644 --- a/.mozconfig-x86_64-apple-darwin +++ b/.mozconfig-x86_64-apple-darwin @@ -1,19 +1,21 @@ +#!/bin/sh + # Targetting ARM64 builds. Expected to be run on Linux. TOOLS=$HOME/macos-cross -CROSS_SYSROOT=${TOOLS}/MacOSX12.3.sdk -export CC=$HOME/.mozbuild/clang/bin/clang -export CXX=$HOME/.mozbuild/clang/bin/clang++ -export DMG_TOOL=${TOOLS}/dmg/dmg -export DSYMUTIL=$HOME/.mozbuild/clang/bin/dsymutil -export HFS_TOOL=${TOOLS}/dmg/hfsplus +CROSS_SYSROOT=$TOOLS/MacOSX12.3.sdk +export CC="$HOME"/.mozbuild/clang/bin/clang +export CXX="$HOME"/.mozbuild/clang/bin/clang++ +export DMG_TOOL="$TOOLS"/dmg/dmg +export DSYMUTIL="$HOME"/.mozbuild/clang/bin/dsymutil +export HFS_TOOL="$TOOLS"/dmg/hfsplus export HOST_CFLAGS="-g" export HOST_CXXFLAGS="-g" export HOST_LDFLAGS="-g" -export MACOS_SDK_DIR=$CROSS_SYSROOT -export MKFSHFS=${TOOLS}/hfsplus-tools/newfs_hfs +export MACOS_SDK_DIR="$CROSS_SYSROOT" +export MKFSHFS="$TOOLS"/hfsplus-tools/newfs_hfs mk_add_options "export LD_LIBRARY_PATH=$HOME/.mozbuild/clang/lib" -mk_add_options "export PATH=${TOOLS}/cctools/bin:$HOME/.mozbuild/clang/bin:$PATH" +mk_add_options "export PATH=$TOOLS/cctools/bin:$HOME/.mozbuild/clang/bin:$PATH" unset MOZ_STDCXX_COMPAT if test "$WFX_RELEASE"; then @@ -40,7 +42,7 @@ ac_add_options --enable-bootstrap if test -x "$(command -v sccache)"; then ac_add_options --with-ccache=sccache elif test -f "$HOME/.mozbuild/sccache/sccache"; then - ac_add_options --with-ccache=$HOME/.mozbuild/sccache/sccache + ac_add_options --with-ccache="$HOME"/.mozbuild/sccache/sccache fi ac_add_options --enable-install-strip ac_add_options --enable-strip @@ -53,7 +55,8 @@ ac_add_options --with-app-name=waterfox ac_add_options --with-branding=waterfox/browser/branding ac_add_options --with-distribution-id=net.waterfox if test -f "$PWD/browser/locales/l10n"; then - ac_add_options --with-l10n-base=$PWD/browser/locales/l10n + ac_add_options --with-l10n-base="$PWD"/browser/locales/l10n fi mk_add_options AUTOCLOBBER=1 +export MOZ_REQUIRE_SIGNING= diff --git a/.mozconfig-x86_64-pc-linux-gnu b/.mozconfig-x86_64-pc-linux-gnu index ff52cf470496..db65d971419e 100644 --- a/.mozconfig-x86_64-pc-linux-gnu +++ b/.mozconfig-x86_64-pc-linux-gnu @@ -1,12 +1,14 @@ +#!/bin/sh + if test -d "$HOME/.mozbuild/clang/bin"; then - export CC=$HOME/.mozbuild/clang/bin/clang - export CXX=$HOME/.mozbuild/clang/bin/clang++ + export CC="$HOME"/.mozbuild/clang/bin/clang + export CXX="$HOME"/.mozbuild/clang/bin/clang++ else export CC=clang export CXX=clang++ fi if test -f "$HOME/.mozbuild/nasm/nasm"; then - export NASM=$HOME/.mozbuild/nasm/nasm + export NASM="$HOME"/.mozbuild/nasm/nasm fi if test "$WFX_RELEASE"; then @@ -32,7 +34,7 @@ ac_add_options --enable-bootstrap if test -x "$(command -v sccache)"; then ac_add_options --with-ccache=sccache elif test -f "$HOME/.mozbuild/sccache/sccache"; then - ac_add_options --with-ccache=$HOME/.mozbuild/sccache/sccache + ac_add_options --with-ccache="$HOME"/.mozbuild/sccache/sccache fi ac_add_options --enable-install-strip ac_add_options --enable-pulseaudio @@ -46,7 +48,7 @@ ac_add_options --with-app-name=waterfox ac_add_options --with-branding=waterfox/browser/branding ac_add_options --with-distribution-id=net.waterfox if test -f "$PWD/browser/locales/l10n"; then - ac_add_options --with-l10n-base=$PWD/browser/locales/l10n + ac_add_options --with-l10n-base="$PWD"/browser/locales/l10n fi if test -f "$PWD/mozilla-api"; then ac_add_options --with-mozilla-api-keyfile="$PWD"/mozilla-api @@ -54,4 +56,4 @@ fi export MOZ_INCLUDE_SOURCE_INFO=1 mk_add_options AUTOCLOBBER=1 -MOZ_REQUIRE_SIGNING= +export MOZ_REQUIRE_SIGNING= diff --git a/.mozconfig-x86_64-pc-windows-msvc b/.mozconfig-x86_64-pc-windows-msvc index a1c94f9f0704..b21c719db890 100644 --- a/.mozconfig-x86_64-pc-windows-msvc +++ b/.mozconfig-x86_64-pc-windows-msvc @@ -1,26 +1,28 @@ -CROSS_BUILD=1 +#!/bin/sh + +export CROSS_BUILD=1 MSVC="14.32.31326" WSDK="10.0.22000.0" TOOLS=$HOME/win-cross -EXTRA_PATH="$HOME/.mozbuild/clang/bin:${TOOLS}/visual-c/tools/msvc/${MSVC}/bin/hostx64/x64:" -export WINDOWSSDKDIR="${TOOLS}/win-sdk" +EXTRA_PATH="$HOME/.mozbuild/clang/bin:$TOOLS/visual-c/tools/msvc/$MSVC/bin/hostx64/x64:" +WINDOWSSDKDIR="$TOOLS/win-sdk" export CC="$HOME/.mozbuild/clang/bin/clang-cl" export CXX="$HOME/.mozbuild/clang/bin/clang-cl" -export DIA_SDK_PATH="${TOOLS}/dia-sdk" +export DIA_SDK_PATH="$TOOLS/dia-sdk" export HOST_CC="$HOME/.mozbuild/clang/bin/clang" export HOST_CXX="$HOME/.mozbuild/clang/bin/clang++" -export MIDL="${TOOLS}/wine/bin/widl" +export MIDL="$TOOLS/wine/bin/widl" export MOZ_INCLUDE_SOURCE_INFO=1 export MOZ_STUB_INSTALLER=1 -export WIN32_REDIST_DIR="${TOOLS}/visual-c/redist/msvc/${MSVC}/x64/microsoft.vc143.crt" -export WIN_UCRT_REDIST_DIR="${WINDOWSSDKDIR}/redist/${WSDK}/ucrt/dlls/x64" -export WINE="${TOOLS}/wine/bin/wine64" +export WIN32_REDIST_DIR="$TOOLS/visual-c/redist/msvc/$MSVC/x64/microsoft.vc143.crt" +export WIN_UCRT_REDIST_DIR="$WINDOWSSDKDIR/redist/${WSDK}/ucrt/dlls/x64" +export WINE="$TOOLS/wine/bin/wine64" export WINEDEBUG=-all -mk_add_options "export LD_PRELOAD=${TOOLS}/liblowercase/liblowercase.so" -mk_add_options "export LOWERCASE_DIRS=${TOOLS}" +mk_add_options "export LD_PRELOAD=$TOOLS/liblowercase/liblowercase.so" +mk_add_options "export LOWERCASE_DIRS=$TOOLS" mk_add_options "export PATH=$EXTRA_PATH$PATH" if test "$WFX_RELEASE"; then @@ -48,7 +50,7 @@ ac_add_options --enable-default-browser-agent if test -x "$(command -v sccache)"; then ac_add_options --with-ccache=sccache elif test -f "$HOME/.mozbuild/sccache/sccache"; then - ac_add_options --with-ccache=$HOME/.mozbuild/sccache/sccache + ac_add_options --with-ccache="$HOME"/.mozbuild/sccache/sccache fi ac_add_options --enable-install-strip ac_add_options --enable-strip @@ -61,6 +63,6 @@ ac_add_options --with-app-name=waterfox ac_add_options --with-branding=waterfox/browser/branding ac_add_options --with-distribution-id=net.waterfox if test -f "$PWD/browser/locales/l10n"; then - ac_add_options --with-l10n-base=$PWD/browser/locales/l10n + ac_add_options --with-l10n-base="$PWD"/browser/locales/l10n fi -MOZ_REQUIRE_SIGNING= \ No newline at end of file +export MOZ_REQUIRE_SIGNING=