Sure, here it is.
# native-comp optimization
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:${PATH}"
export LDFLAGS="-L/usr/local/lib/gcc/10"
export LIBRARY_PATH="/usr/local/opt/gcc/lib/gcc/10:${LIBRARY_PATH:-}"
cd emacs || exit
git clean -xfd
./autogen.sh
CC='clang' \
./configure \
--disable-silent-rules \
--with-ns \
--disable-ns-self-contained \
--with-cairo \
--with-modules \
--with-nativecomp \
--with-xml2 \
--with-gnutls \
--with-json \
--with-rsvg
# Ensure the directory to which we will dump Emacs exists and has the correct
# permissions set.
libexec=/usr/local/libexec/emacs
if [ ! -d $libexec ]; then
sudo mkdir -p $libexec
chown $USER $libexec
fi
make distclean
make -j 4
make install
rm -rf "/Applications/Emacs.app"
mv nextstep/Emacs.app "/Applications/"
cp -R lisp "/Applications/Emacs.app/Contents/"