Commit d9a900dc authored by Iustin Pop's avatar Iustin Pop

Replace htools→hs in configure/makefile rules

This continues the cleanup of the 'htools' name, by replacing 'htools'
with 'hs' in configure and makefile rules.

There is still 'WANT_HTOOLS' left as it is correct, but some of the
conditionals in Makefile.am will need some cleanup (in a different
patch).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 8775e62a
......@@ -54,7 +54,7 @@ myexeclibdir = $(pkglibdir)
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:
HTOOLS_DIRS = \
HS_DIRS = \
src \
src/Ganeti \
src/Ganeti/Block \
......@@ -76,7 +76,7 @@ HTOOLS_DIRS = \
htest/Test/Ganeti/Query
DIRS = \
$(HTOOLS_DIRS) \
$(HS_DIRS) \
autotools \
daemons \
devel \
......@@ -161,8 +161,8 @@ maintainer-clean-local:
CLEANFILES = \
$(addsuffix /*.py[co],$(DIRS)) \
$(addsuffix /*.hi,$(HTOOLS_DIRS)) \
$(addsuffix /*.o,$(HTOOLS_DIRS)) \
$(addsuffix /*.hi,$(HS_DIRS)) \
$(addsuffix /*.o,$(HS_DIRS)) \
$(PYTHON_BOOTSTRAP) \
epydoc.conf \
$(REPLACE_VARS_SED) \
......@@ -191,11 +191,11 @@ GENERATED_FILES = \
$(BUILT_PYTHON_SOURCES) \
$(PYTHON_BOOTSTRAP)
HTOOLS_GENERATED_FILES =
HS_GENERATED_FILES =
if WANT_HTOOLS
HTOOLS_GENERATED_FILES += $(HS_PROGS)
HS_GENERATED_FILES += $(HS_PROGS)
if ENABLE_CONFD
HTOOLS_GENERATED_FILES += src/hconfd src/ganeti-confd
HS_GENERATED_FILES += src/hconfd src/ganeti-confd
endif
endif
......@@ -670,7 +670,7 @@ install-exec-hook:
endif
$(HS_ALL_PROGS): %: %.hs $(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS) Makefile
@if [ "$(notdir $@)" = "test" ] && [ "$(HTOOLS_NODEV)" ]; then \
@if [ "$(notdir $@)" = "test" ] && [ "$(HS_NODEV)" ]; then \
echo "Error: cannot run unittests without the development" \
" libraries (see devnotes.rst)" 1>&2; \
exit 1; \
......@@ -678,7 +678,7 @@ $(HS_ALL_PROGS): %: %.hs $(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS) Makefile
@rm -f $(notdir $@).tix
$(GHC) --make \
$(HFLAGS) \
$(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) $(HTOOLS_REGEX_PCRE) \
$(HS_NOCURL) $(HS_PARALLEL3) $(HS_REGEX_PCRE) \
-osuf $(notdir $@).o -hisuf $(notdir $@).hi \
$(HEXTRA) $(HEXTRA_INT) $@
@touch "$@"
......@@ -1053,7 +1053,7 @@ dist_TESTS = \
nodist_TESTS =
check_SCRIPTS =
if WANT_HTOOLSTESTS
if WANT_HSTESTS
nodist_TESTS += $(haskell_tests)
dist_TESTS += htest/offline-test.sh
check_SCRIPTS += \
......@@ -1173,7 +1173,7 @@ doc/examples/bash_completion doc/examples/bash_completion-debug: \
$(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \
lib/cli.py $(gnt_scripts) $(client_PYTHON) tools/burnin \
daemons/ganeti-cleaner \
$(GENERATED_FILES) $(HTOOLS_GENERATED_FILES)
$(GENERATED_FILES) $(HS_GENERATED_FILES)
PYTHONPATH=. $(RUN_IN_TEMPDIR) \
$(CURDIR)/$(BUILD_BASH_COMPLETION) $(BC_ARGS) > $@
......@@ -1685,7 +1685,7 @@ install-exec-local:
"$(DESTDIR)${localstatedir}/run/ganeti"
.PHONY: apidoc
if WANT_HTOOLSAPIDOC
if WANT_HSAPIDOC
apidoc: py-apidoc hs-apidoc
else
apidoc: py-apidoc
......@@ -1713,15 +1713,15 @@ hs-apidoc: $(HS_BUILT_SRCS)
$(LN_S) ../hscolour.css $(APIDOC_HS_DIR)/Ganeti/Confd/hscolour.css
set -e ; \
cd src; \
if [ "$(HTOOLS_NOCURL)" ]; \
then OPTGHC="--optghc=$(HTOOLS_NOCURL)"; \
if [ "$(HS_NOCURL)" ]; \
then OPTGHC="--optghc=$(HS_NOCURL)"; \
else OPTGHC=""; \
fi; \
if [ "$(HTOOLS_PARALLEL3)" ]; \
then OPTGHC="$$OPTGHC --optghc=$(HTOOLS_PARALLEL3)"; \
if [ "$(HS_PARALLEL3)" ]; \
then OPTGHC="$$OPTGHC --optghc=$(HS_PARALLEL3)"; \
fi; \
if [ "$(HTOOLS_REGEX_PCRE)" ]; \
then OPTGHC="$$OPTGHC --optghc=$(HTOOLS_REGEX_PCRE)"; \
if [ "$(HS_REGEX_PCRE)" ]; \
then OPTGHC="$$OPTGHC --optghc=$(HS_REGEX_PCRE)"; \
fi; \
RELSRCS="$(HS_LIB_SRCS:src/%=%) $(patsubst src/%,%,$(filter src/%,$(HS_BUILT_SRCS)))"; \
for file in $$RELSRCS; do \
......@@ -1740,7 +1740,7 @@ TAGS: $(GENERATED_FILES)
rm -f TAGS
$(GHC) -e ":etags" -v0 \
$(filter-out -O -Werror,$(HFLAGS)) \
$(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) $(HTOOLS_REGEX_PCRE) \
$(HS_NOCURL) $(HS_PARALLEL3) $(HS_REGEX_PCRE) \
$(HS_LIBTEST_SRCS)
find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
-path './daemons/ganeti-*' -o -path './tools/*' -o \
......
......@@ -476,10 +476,10 @@ fi
# check for modules, first custom/special checks
AC_MSG_NOTICE([checking for required haskell modules])
HTOOLS_NOCURL=-DNO_CURL
HS_NOCURL=-DNO_CURL
if test "$enable_htools_rapi" != no; then
AC_GHC_PKG_CHECK([curl], [HTOOLS_NOCURL=], [])
if test -n "$HTOOLS_NOCURL"; then
AC_GHC_PKG_CHECK([curl], [HS_NOCURL=], [])
if test -n "$HS_NOCURL"; then
if test "$enable_htools_rapi" = check; then
AC_MSG_WARN(m4_normalize([The curl library was not found, Haskell
code will be compiled without RAPI support]))
......@@ -491,12 +491,12 @@ if test "$enable_htools_rapi" != no; then
AC_MSG_NOTICE([Enabling curl/RAPI/RPC usage in Haskell code])
fi
fi
AC_SUBST(HTOOLS_NOCURL)
AC_SUBST(HS_NOCURL)
HTOOLS_PARALLEL3=
AC_GHC_PKG_CHECK([parallel-3.*], [HTOOLS_PARALLEL3=-DPARALLEL3],
HS_PARALLEL3=
AC_GHC_PKG_CHECK([parallel-3.*], [HS_PARALLEL3=-DPARALLEL3],
[AC_GHC_PKG_REQUIRE(parallel)], t)
AC_SUBST(HTOOLS_PARALLEL3)
AC_SUBST(HS_PARALLEL3)
# and now standard modules
AC_GHC_PKG_REQUIRE(json)
......@@ -506,11 +506,11 @@ AC_GHC_PKG_REQUIRE(bytestring)
AC_GHC_PKG_REQUIRE(utf8-string)
# extra modules for confd functionality
HTOOLS_REGEX_PCRE=-DNO_REGEX_PCRE
HS_REGEX_PCRE=-DNO_REGEX_PCRE
has_confd=False
if test "$enable_confd" != no; then
CONFD_PKG=
AC_GHC_PKG_CHECK([regex-pcre], [HTOOLS_REGEX_PCRE=],
AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=],
[CONFD_PKG="$CONFD_PKG regex-pcre"])
AC_GHC_PKG_CHECK([hslogger], [], [CONFD_PKG="$CONFD_PKG hslogger"])
AC_GHC_PKG_CHECK([Crypto], [], [CONFD_PKG="$CONFD_PKG Crypto"])
......@@ -528,7 +528,7 @@ if test "$enable_confd" != no; then
$CONFD_PKG]))
fi
fi
AC_SUBST(HTOOLS_REGEX_PCRE)
AC_SUBST(HS_REGEX_PCRE)
if test "$has_confd" = True; then
AC_MSG_NOTICE([Enabling confd usage])
fi
......@@ -560,24 +560,24 @@ AC_SUBST(ENABLE_MONITORING, $has_monitoring)
AM_CONDITIONAL([ENABLE_MONITORING], [test "$has_monitoring" = True])
# development modules
HTOOLS_NODEV=
AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HTOOLS_NODEV=1], t)
AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HTOOLS_NODEV=1], t)
AC_GHC_PKG_CHECK([test-framework-hunit], [], [HTOOLS_NODEV=1])
AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HTOOLS_NODEV=1])
AC_GHC_PKG_CHECK([temporary], [], [HTOOLS_NODEV=1])
HS_NODEV=
AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HS_NODEV=1], t)
AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HS_NODEV=1], t)
AC_GHC_PKG_CHECK([test-framework-hunit], [], [HS_NODEV=1])
AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HS_NODEV=1])
AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1])
# FIXME: unify checks for non-test libraries (attoparsec, hinotify, ...)
# that are needed to execute the tests, avoiding the duplication
# of the checks.
AC_GHC_PKG_CHECK([attoparsec], [], [HTOOLS_NODEV=1])
AC_GHC_PKG_CHECK([vector], [], [HTOOLS_NODEV=1])
if test -n "$HTOOLS_NODEV"; then
AC_GHC_PKG_CHECK([attoparsec], [], [HS_NODEV=1])
AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1])
if test -n "$HS_NODEV"; then
AC_MSG_WARN(m4_normalize([Required development modules were not found,
you won't be able to run Haskell unittests]))
else
AC_MSG_NOTICE([Haskell development modules found, unittests enabled])
fi
AC_SUBST(HTOOLS_NODEV)
AC_SUBST(HS_NODEV)
HTOOLS=yes
AC_SUBST(HTOOLS)
......@@ -600,7 +600,7 @@ AC_ARG_ENABLE([split-query],
;;
esac
]],
[[case "x${has_confd}x${HTOOLS_NOCURL}x" in
[[case "x${has_confd}x${HS_NOCURL}x" in
xTruexx)
enable_split_query=True
;;
......@@ -614,7 +614,7 @@ if test x$enable_split_query = xTrue -a x$has_confd != xTrue; then
AC_MSG_ERROR([Split queries require the confd daemon])
fi
if test x$enable_split_query = xTrue -a x$HTOOLS_NOCURL != x; then
if test x$enable_split_query = xTrue -a x$HS_NOCURL != x; then
AC_MSG_ERROR([Split queries require the htools-rapi feature (curl library)])
fi
......@@ -623,7 +623,7 @@ if test x$enable_split_query = xTrue; then
fi
# Check for HsColour
HTOOLS_APIDOC=no
HS_APIDOC=no
AC_ARG_VAR(HSCOLOUR, [HsColour path])
AC_PATH_PROG(HSCOLOUR, [HsColour], [])
if test -z "$HSCOLOUR"; then
......@@ -639,9 +639,9 @@ if test -z "$HADDOCK"; then
not be generated]))
fi
if test -n "$HADDOCK" && test -n "$HSCOLOUR"; then
HTOOLS_APIDOC=yes
HS_APIDOC=yes
fi
AC_SUBST(HTOOLS_APIDOC)
AC_SUBST(HS_APIDOC)
# Check for hlint
AC_ARG_VAR(HLINT, [hlint path])
......@@ -656,8 +656,8 @@ if test "$HTOOLS" != yes && test "$ENABLE_CONFD" = True; then
fi
AM_CONDITIONAL([WANT_HTOOLS], [test "$HTOOLS" = yes])
AM_CONDITIONAL([WANT_HTOOLSTESTS], [test "x$HTOOLS_NODEV" = x])
AM_CONDITIONAL([WANT_HTOOLSAPIDOC], [test "$HTOOLS_APIDOC" = yes])
AM_CONDITIONAL([WANT_HSTESTS], [test "x$HS_NODEV" = x])
AM_CONDITIONAL([WANT_HSAPIDOC], [test "$HS_APIDOC" = yes])
AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"])
# Check for fakeroot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment