Skip to content

Commit

Permalink
Use consistent naming as how doc build works
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Vasseur committed Nov 20, 2023
1 parent 0bceaca commit f0df561
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/jobs/configure-checks/all.bats
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ compile_assertions_finished () {
skip
fi
setup
run run_configure --disable-domserver
run run_configure --disable-domserver-build
refute_line " * domserver...........: /opt/domjudge/domserver"
for group in www-data apache nginx; do
refute_line " * webserver group.....: $group"
Expand All @@ -467,7 +467,7 @@ compile_assertions_finished () {
skip
fi
setup
run run_configure --disable-judgehost
run run_configure --disable-judgehost-build
assert_line " * domserver...........: /opt/domjudge/domserver"
assert_regex "^ \* webserver group\.\.\.\.\.: (www-data|apache|nginx)$"
refute_line " * judgehost...........: /opt/domjudge/judgehost"
Expand Down
44 changes: 22 additions & 22 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ AC_SUBST(DOMJUDGE_VERSION, $PACKAGE_VERSION)
AC_DEFINE_UNQUOTED(DOMJUDGE_VERSION, "$PACKAGE_VERSION",
[DOMjudge version number (alias for PACKAGE_VERSION)])

AC_SUBST(ENABLE_DOMSERVER,yes)
AC_ARG_ENABLE([domserver],AS_HELP_STRING([--enable-domserver],
AC_SUBST(DOMSERVER_BUILD_ENABLED,yes)
AC_ARG_ENABLE([domserver-build],AS_HELP_STRING([--enable-domserver-build],
[configure and build the domserver (default: yes).]),
[if test "x$enableval" = xno ; then AC_SUBST(ENABLE_DOMSERVER,no) fi])
[if test "x$enableval" = xno ; then AC_SUBST(DOMSERVER_BUILD_ENABLED,no) fi])

AC_SUBST(ENABLE_JUDGEHOST,yes)
AC_ARG_ENABLE([judgehost],AS_HELP_STRING([--enable-judgehost],
AC_SUBST(JUDGEHOST_BUILD_ENABLED,yes)
AC_ARG_ENABLE([judgehost-build],AS_HELP_STRING([--enable-judgehost-build],
[configure and build the judgehost (default: yes).]),
[if test "x$enableval" = xno ; then AC_SUBST(ENABLE_JUDGEHOST,no) fi])
[if test "x$enableval" = xno ; then AC_SUBST(JUDGEHOST_BUILD_ENABLED,no) fi])

if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
# Set default {C,CXX,LD}FLAGS. This might screw up portability, but
# adds important security. Only set these flags when none are supplied
# by the user.
Expand Down Expand Up @@ -90,7 +90,7 @@ else
AC_MSG_RESULT([$DOMJUDGE_USER])
fi

if test "x$ENABLE_DOMSERVER" = xyes; then
if test "x$DOMSERVER_BUILD_ENABLED" = xyes; then
AC_MSG_CHECKING([webserver-group])
AC_ARG_WITH([webserver-group], [AS_HELP_STRING([--with-webserver-group=GROUP],
[Webserver group for password files (default: try to detect).])], [], [])
Expand Down Expand Up @@ -119,7 +119,7 @@ fi
# }}}

# {{{ runguard
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
AC_MSG_CHECKING([runuser])
AC_ARG_WITH([runuser], [AS_HELP_STRING([--with-runuser=USER],
[Prefix for unprivileged user(s) under which to run submissions (default: domjudge-run).])], [], [])
Expand Down Expand Up @@ -160,7 +160,7 @@ fi

# These are defaults that can still be overridden below!
if test "x$FHS_ENABLED" = xyes ; then
if test "x$ENABLE_DOMSERVER" = xyes; then
if test "x$DOMSERVER_BUILD_ENABLED" = xyes; then
AC_SUBST(domserver_root, '')
AC_SUBST(domserver_bindir, $bindir)
AC_SUBST(domserver_etcdir, $sysconfdir/${PACKAGE_TARNAME})
Expand All @@ -174,7 +174,7 @@ if test "x$FHS_ENABLED" = xyes ; then
AC_SUBST(domserver_exampleprobdir,$datadir/${PACKAGE_TARNAME}/example_problems)
fi

if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
AC_SUBST(judgehost_root, '')
AC_SUBST(judgehost_bindir, $bindir)
AC_SUBST(judgehost_etcdir, $sysconfdir/${PACKAGE_TARNAME})
Expand Down Expand Up @@ -204,16 +204,16 @@ AC_DEFUN([AX_PATH], [

AX_WITH_COMMENT(2,[ ])
AX_WITH_COMMENT(3,[Fine tuning of installation root paths when FHS is disabled (the default):])
if test "x$ENABLE_DOMSERVER" = xyes; then
if test "x$DOMSERVER_BUILD_ENABLED" = xyes; then
AX_PATH(domserver_root, [$prefix/domserver])
fi
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
AX_PATH(judgehost_root, [$prefix/judgehost])
fi
AX_PATH(domjudge_docdir, [$prefix/doc])
AX_WITH_COMMENT(4,[ ])
AX_WITH_COMMENT(5,[More fine tuning of all installation (sub)directories:])
if test "x$ENABLE_DOMSERVER" = xyes; then
if test "x$DOMSERVER_BUILD_ENABLED" = xyes; then
AX_PATH(domserver_bindir, [$domserver_root/bin])
AX_PATH(domserver_etcdir, [$domserver_root/etc])
AX_PATH(domserver_webappdir, [$domserver_root/webapp])
Expand All @@ -225,7 +225,7 @@ AX_PATH(domserver_rundir, [$domserver_root/run])
AX_PATH(domserver_tmpdir, [$domserver_root/tmp])
AX_PATH(domserver_exampleprobdir, [$domserver_root/example_problems])
fi
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
AX_WITH_COMMENT(6,[ ])
AX_PATH(judgehost_bindir, [$judgehost_root/bin])
AX_PATH(judgehost_etcdir, [$judgehost_root/etc])
Expand Down Expand Up @@ -276,7 +276,7 @@ fi
AC_MSG_RESULT($BASEURL)

# Checks for programs.
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CXXCPP
Expand Down Expand Up @@ -307,7 +307,7 @@ AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE, 200809L, [Include POSIX.1-2008 base specific
AC_DEFINE_UNQUOTED(_XOPEN_SOURCE, 500, [Include SUSv2 (UNIX 98) extensions])

# Checks for header files.
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/param.h sys/time.h syslog.h termios.h unistd.h magic.h libcgroup.h])

Expand Down Expand Up @@ -348,19 +348,19 @@ echo ""
echo "Summary:"
echo " * project.............: $PACKAGE_NAME $PACKAGE_VERSION"
echo " * prefix..............: $prefix"
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
echo " * CPPFLAGS............: $CPPFLAGS"
echo " * CFLAGS..............: $CFLAGS"
echo " * CXXFLAGS............: $CXXFLAGS"
echo " * LDFLAGS.............: $LDFLAGS"
fi
echo ""
echo " * default user........: $DOMJUDGE_USER"
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
echo " * runguard user.......: $RUNUSER"
echo " * runguard group......: $RUNGROUP"
fi
if test "x$ENABLE_DOMSERVER" = xyes; then
if test "x$DOMSERVER_BUILD_ENABLED" = xyes; then
echo " * webserver group.....: $WEBSERVER_GROUP"
fi
echo ""
Expand All @@ -372,7 +372,7 @@ if test "x$DOC_BUILD_ENABLED" != xyes ; then
else
echo ""
fi
if test "x$ENABLE_DOMSERVER" = xyes; then
if test "x$DOMSERVER_BUILD_ENABLED" = xyes; then
echo ""
echo " * domserver...........: AX_VAR_EXPAND($domserver_root)"
echo " - bin..............: AX_VAR_EXPAND($domserver_bindir)"
Expand All @@ -386,7 +386,7 @@ echo " - tmp..............: AX_VAR_EXPAND($domserver_tmpdir)"
echo " - webapp...........: AX_VAR_EXPAND($domserver_webappdir)"
echo " - example_problems.: AX_VAR_EXPAND($domserver_exampleprobdir)"
fi
if test "x$ENABLE_JUDGEHOST" = xyes; then
if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
echo ""
echo " * judgehost...........: AX_VAR_EXPAND($judgehost_root)"
echo " - bin..............: AX_VAR_EXPAND($judgehost_bindir)"
Expand Down
4 changes: 2 additions & 2 deletions paths.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ INSTALL = @INSTALL@
@SET_MAKE@

# Build domserver?
ENABLE_DOMSERVER = @ENABLE_DOMSERVER@
DOMSERVER_BUILD_ENABLED = @DOMSERVER_BUILD_ENABLED@

# Build judgehost?
ENABLE_JUDGEHOST = @ENABLE_JUDGEHOST@
JUDGEHOST_BUILD_ENABLED = @JUDGEHOST_BUILD_ENABLED@

# Build documentation?
DOC_BUILD_ENABLED = @DOC_BUILD_ENABLED@
Expand Down

0 comments on commit f0df561

Please sign in to comment.