Skip to content

Commit

Permalink
Add --configure-only option to quit after the configure run.
Browse files Browse the repository at this point in the history
This will be used to avoid building the entire package when we just
want the 32 or 64 bit sudo_intercept.so and sudo_noexec.so.
  • Loading branch information
millert committed Aug 1, 2023
1 parent 8e22ede commit 002e22f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions scripts/mkpkg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Build a binary package using polypkg
# Usage: mkpkg [--build-only] [--debug] [--flavor flavor] [--platform platform] [--osversion ver]
# Usage: mkpkg [--build-only] [--configure-only] [--debug] [--flavor flavor]
# [--platform platform] [--osversion ver]
#

# Make sure IFS is set to space, tab, newline in that order.
Expand All @@ -28,11 +29,12 @@ nl='
IFS=" $nl"

# Parse arguments
usage="usage: mkpkg [--build-only] [--debug] [--flavor flavor] [--platform platform] [--osversion ver]"
usage="usage: mkpkg [--build-only] [--configure-only] [--debug] [--flavor flavor] [--platform platform] [--osversion ver]"
debug=0
flavor=vanilla
crossbuild=false
build_packages=true;
build_sudo=true;
while test $# -gt 0; do
case "$1" in
--debug)
Expand Down Expand Up @@ -84,6 +86,9 @@ while test $# -gt 0; do
--build-only)
build_packages=false
;;
--configure-only)
build_sudo=false
;;
*)
# Pass unknown options to configure
configure_opts="${configure_opts}${configure_opts+$tab}$1"
Expand Down Expand Up @@ -574,9 +579,11 @@ if [ -r Makefile ]; then
${MAKE} $make_opts distclean
fi
${configure} "$@" || exit $?
${MAKE} $make_opts || exit $?
if [ $build_packages = true ]; then
${MAKE} $make_opts PPFLAGS="$PPFLAGS" PPVARS="$PPVARS" package
if [ $build_sudo = true ]; then
${MAKE} $make_opts || exit $?
if [ $build_packages = true ]; then
${MAKE} $make_opts PPFLAGS="$PPFLAGS" PPVARS="$PPVARS" package
fi
fi
exitval=$?
test $debug -eq 0 && rm -rf destdir
Expand Down

0 comments on commit 002e22f

Please sign in to comment.