Commit d9a900dc authored by Iustin Pop's avatar Iustin Pop
Browse files

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