Skip to content

Commit

Permalink
Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD
Browse files Browse the repository at this point in the history
When building without --enable-trivial-httpd-cmdline, don't build or install
the ostree-trivial-httpd binary.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
  • Loading branch information
akiernan committed Sep 5, 2019
1 parent c5a7f55 commit 456c8ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile-ostree.am
Expand Up @@ -143,12 +143,14 @@ ostree_SOURCES += src/ostree/ot-builtin-pull.c
endif

if USE_LIBSOUP
if BUILDOPT_TRIVIAL_HTTPD
# Eventually once we stop things from using this, we should support disabling this
ostree_SOURCES += src/ostree/ot-builtin-trivial-httpd.c
pkglibexec_PROGRAMS += ostree-trivial-httpd
ostree_trivial_httpd_SOURCES = src/ostree/ostree-trivial-httpd.c
ostree_trivial_httpd_CFLAGS = $(ostree_bin_shared_cflags) $(OT_INTERNAL_SOUP_CFLAGS)
ostree_trivial_httpd_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_SOUP_LIBS)
endif

if !USE_CURL
# This is necessary for the cookie jar bits
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Expand Up @@ -192,6 +192,9 @@ AC_ARG_ENABLE(trivial-httpd-cmdline,
[Continue to support "ostree trivial-httpd" [default=no]])],,
enable_trivial_httpd_cmdline=no)
AM_CONDITIONAL(BUILDOPT_TRIVIAL_HTTPD, test x$enable_trivial_httpd_cmdline = xyes)
AS_IF([test x$with_soup = xno && test x$enable_trivial_httpd_cmdline = xyes], [
AC_MSG_WARN([trivial-httpd enabled, but libsoup is not; libsoup is needed for trivial-httpd])
])
AM_COND_IF(BUILDOPT_TRIVIAL_HTTPD,
[AC_DEFINE([BUILDOPT_ENABLE_TRIVIAL_HTTPD_CMDLINE], 1, [Define if we are enabling ostree trivial-httpd entrypoint])]
)
Expand Down

0 comments on commit 456c8ca

Please sign in to comment.