Commit 201b6c34 authored by Iustin Pop's avatar Iustin Pop

htools: switch hbal to the generic binary

In addition, the patch adds a separate Makefile variable for holding
the binary roles to make it more clear what we symlink.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 458a286a
......@@ -98,7 +98,6 @@
/htools/.hpc
/htools/coverage
/htools/hbal
/htools/hscan
/htools/hspace
/htools/htools
......
......@@ -307,10 +307,10 @@ docrst = \
doc/walkthrough.rst
HS_PROGS = \
htools/hbal \
htools/hscan \
htools/hspace \
htools/htools
HS_BIN_ROLES = hbal
HS_ALL_PROGS = $(HS_PROGS) htools/test
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
......@@ -343,6 +343,7 @@ HS_LIB_SRCS = \
htools/Ganeti/HTools/Types.hs \
htools/Ganeti/HTools/Utils.hs \
htools/Ganeti/HTools/Program/Hail.hs \
htools/Ganeti/HTools/Program/Hbal.hs \
htools/Ganeti/Jobs.hs \
htools/Ganeti/Luxi.hs \
htools/Ganeti/OpCodes.hs
......@@ -455,6 +456,10 @@ install-exec-hook:
@mkdir_p@ $(DESTDIR)$(iallocatorsdir)
$(LN_S) -f $(DESTDIR)$(bindir)/htools \
$(DESTDIR)$(iallocatorsdir)/hail
for role in $(HS_BIN_ROLES); do \
$(LN_S) -f $(DESTDIR)$(bindir)/htools \
$(DESTDIR)$(bindir)/$$role ; \
done
endif
$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
......
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Main (main) where
module Ganeti.HTools.Program.Hbal (main) where
import Control.Concurrent (threadDelay)
import Control.Exception (bracket)
......
......@@ -31,10 +31,12 @@ import System.IO
import Ganeti.HTools.Utils
import qualified Ganeti.HTools.Program.Hail as Hail
import qualified Ganeti.HTools.Program.Hbal as Hbal
-- | Supported binaries.
personalities :: [(String, IO ())]
personalities = [ ("hail", Hail.main)
, ("hbal", Hbal.main)
]
-- | Display usage and exit.
......
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