doc/walkthrough.rst
HS_PROGS = htools/htools
-if WANT_CONFD
-HS_PROGS += htools/hconfd
-endif
HS_BIN_ROLES = hbal hscan hspace hinfo
-HS_ALL_PROGS = $(HS_PROGS) htools/test htools/hpc-htools
+HS_ALL_PROGS = $(HS_PROGS) htools/test htools/hpc-htools htools/hconfd
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=test/%) test/hail
scripts/gnt-os
PYTHON_BOOTSTRAP_SBIN = \
- daemons/ganeti-confd \
daemons/ganeti-masterd \
daemons/ganeti-noded \
daemons/ganeti-watcher \
daemons/ganeti-rapi \
$(gnt_scripts)
+if PY_CONFD
+PYTHON_BOOTSTRAP_SBIN += daemons/ganeti-confd
+endif
+
PYTHON_BOOTSTRAP = \
$(PYTHON_BOOTSTRAP_SBIN) \
tools/ensure-dirs
$(LN_S) -f htools \
$(DESTDIR)$(bindir)/$$role ; \
done
+if HS_CONFD
+ mv $(DESTDIR)$(sbindir)/hconfd $(DESTDIR)$(sbindir)/ganeti-confd
+endif
endif
$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
$(PYTHON_BOOTSTRAP_SBIN) \
daemons/ganeti-cleaner
+if HS_CONFD
+nodist_sbin_SCRIPTS += htools/hconfd
+endif
+
python_scripts = \
tools/burnin \
tools/cfgshell \
echo "HTOOLS = False"; \
fi; \
echo "ENABLE_CONFD = $(ENABLE_CONFD)"; \
+ echo "PY_CONFD = $(PY_CONFD)"; \
+ echo "HS_CONFD = $(HS_CONFD)"; \
} > $@
lib/_vcsversion.py: Makefile vcs-version | lib/.dir
ENABLE_CONFD=
AC_ARG_ENABLE([confd],
[AS_HELP_STRING([--enable-confd],
- [enable the ganeti-confd daemon (default: yes)])],
+ [enable the ganeti-confd daemon (default: python, options haskell/python/no)])],
[[case "$enableval" in
no)
enable_confd=False
+ py_confd=False
+ hs_confd=False
;;
- yes)
+ yes|python)
+ enable_confd=True
+ py_confd=True
+ hs_confd=False
+ ;;
+ haskell)
enable_confd=True
+ py_confd=False
+ hs_confd=True
;;
*)
echo "Invalid value for enable-confd '$enableval'"
;;
esac
]],
- [enable_confd=True])
+ [enable_confd=True;py_confd=True;hs_confd=False])
AC_SUBST(ENABLE_CONFD, $enable_confd)
+AC_SUBST(PY_CONFD, $py_confd)
+AC_SUBST(HS_CONFD, $hs_confd)
AM_CONDITIONAL([WANT_CONFD], [test x$enable_confd = xTrue])
+AM_CONDITIONAL([PY_CONFD], [test x$py_confd = xTrue])
+AM_CONDITIONAL([HS_CONFD], [test x$hs_confd = xTrue])
# --with-disk-separator=...
AC_ARG_WITH([disk-separator],
fi # end if enable_htools, define automake conditions
+if test "$HTOOLS" != "yes" && test "$HS_CONFD" = "True"; then
+ AC_MSG_ERROR(m4_normalize([cannot enable Haskell version of ganeti-confd if
+ htools support is not enabled]))
+fi
+
AM_CONDITIONAL([WANT_HTOOLS], [test x$HTOOLS = xyes])
AM_CONDITIONAL([WANT_HTOOLSTESTS], [test "x$GHC_PKG_QUICKCHECK" != x])
AM_CONDITIONAL([WANT_HTOOLSAPIDOC], [test x$HTOOLS_APIDOC = xyes])