#!/bin/sh # Automate configure+make for things I build from source often. BASE_DIR=`/bin/pwd | xargs /usr/bin/basename` # GNU programs seem to support one or both of these. ISTR that it # used to be just --enable-maintainer-mode to get debugging symbols, # and then someone added --enable-debug because reasons? Hilariously, # the first hit if you google the two of them together is # https://svn.haxx.se/dev/archive-2007-03/0903.shtml, followed by # https://svn.haxx.se/dev/archive-2001-10/0387.shtml. STD_DEBUG_FLAGS="--enable-maintainer-mode --enable-debug" case ${BASE_DIR} in emacs) make distclean ./autogen.sh ./configure ${STD_DEBUG_FLAGS} --with-mailutils make bootstrap echo "" echo "Built '`git branch | grep -E "^\* " | cut -d " " -f2`' branch." ;; hexchat) # https://hexchat.readthedocs.io/en/latest/building.html meson build -Dwith-theme-manager=true ninja -C build echo "" echo "Run 'sudo ninja -C build install' to install HexChat locally." echo "" ;; bitcoin|alt-bitcoin) make distclean ./autogen.sh # Regarding the 'autoreconf' invocation, see: # - https://github.com/apereo/mod_auth_cas/issues/97 # - https://github.com/apereo/mod_auth_cas/blob/master/README#L111 # - https://android.developreference.com/article/17551415/How+to+overcome+%E2%80%9C%27aclocal-1.15%27+is+missing+on+your+system%E2%80%9D+warning%3F autoreconf -f -i ./configure ${STD_DEBUG_FLAGS} --with-gui=qt5 --with-incompatible-bdb make ;; interstellar-probe) make distclean ./autogen.sh ./configure ${STD_DEBUG_FLAGS} --with-ansible --made-you-look make ;; *) echo "Generic GNU-style build..." if [ -f ./autogen.sh ]; then ./autogen.sh; fi ./configure ${STD_DEBUG_FLAGS} make ;; esac