From cd935546eb04464de07e869c88f74a6d15aef6a6 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Sat, 20 Jul 2024 11:57:13 -0500 Subject: [PATCH] src: move `vendor/htcl/` under `comp/` Similarly to Parsec, this code is practically only used in one spot, so it might as well be maintained there. I don't even know what codebase HTcl is a 'vendoring' *of* and it's dated to over 15 years ago at minimum, so it's probably lost to history now... Just put it all together for clarity and ease of development. Signed-off-by: Austin Seipp --- src/Makefile | 3 +-- src/comp/.ghci | 4 ++-- src/{vendor/htcl => comp/HTcl}/.gitignore | 0 src/{vendor/htcl => comp/HTcl}/HTcl.hs | 0 src/{vendor/htcl => comp/HTcl}/Makefile | 0 src/{vendor/htcl => comp/HTcl}/haskell.c | 0 src/comp/Makefile | 4 ++-- util/haskell-language-server/gen_hie.py | 2 +- 8 files changed, 6 insertions(+), 7 deletions(-) rename src/{vendor/htcl => comp/HTcl}/.gitignore (100%) rename src/{vendor/htcl => comp/HTcl}/HTcl.hs (100%) rename src/{vendor/htcl => comp/HTcl}/Makefile (100%) rename src/{vendor/htcl => comp/HTcl}/haskell.c (100%) diff --git a/src/Makefile b/src/Makefile index 13b36104b..d1e7c79fe 100644 --- a/src/Makefile +++ b/src/Makefile @@ -56,7 +56,7 @@ all: install install clean full_clean: $(MAKE) -C vendor/stp PREFIX=$(PREFIX) $@ $(MAKE) -C vendor/yices PREFIX=$(PREFIX) $@ - $(MAKE) -C vendor/htcl PREFIX=$(PREFIX) $@ + $(MAKE) -C comp/HTcl PREFIX=$(PREFIX) $@ # we need to build targets from here sequentially, as they operate in the same workspace $(MAKE) -C comp -j1 PREFIX=$(PREFIX) $@ $(MAKE) -C Libraries PREFIX=$(PREFIX) $@ @@ -68,4 +68,3 @@ install clean full_clean: $(MAKE) -C bluetcl PREFIX=$(PREFIX) $@ $(MAKE) -C bluesim PREFIX=$(PREFIX) $@ $(MAKE) -C Verilator PREFIX=$(PREFIX) $@ - diff --git a/src/comp/.ghci b/src/comp/.ghci index 13342487d..4d854115f 100644 --- a/src/comp/.ghci +++ b/src/comp/.ghci @@ -25,10 +25,10 @@ -- Shared libraries and FFI bindings :set -i../vendor/stp/include_hs :set -i../vendor/yices/include_hs -:set -i../vendor/htcl +:set -iHTcl :set -I/usr/include/tcl -:set -L../vendor/htcl +:set -LHTcl :set -lhtcl :set -L../vendor/stp/lib diff --git a/src/vendor/htcl/.gitignore b/src/comp/HTcl/.gitignore similarity index 100% rename from src/vendor/htcl/.gitignore rename to src/comp/HTcl/.gitignore diff --git a/src/vendor/htcl/HTcl.hs b/src/comp/HTcl/HTcl.hs similarity index 100% rename from src/vendor/htcl/HTcl.hs rename to src/comp/HTcl/HTcl.hs diff --git a/src/vendor/htcl/Makefile b/src/comp/HTcl/Makefile similarity index 100% rename from src/vendor/htcl/Makefile rename to src/comp/HTcl/Makefile diff --git a/src/vendor/htcl/haskell.c b/src/comp/HTcl/haskell.c similarity index 100% rename from src/vendor/htcl/haskell.c rename to src/comp/HTcl/haskell.c diff --git a/src/comp/Makefile b/src/comp/Makefile index a6d2ada0b..f16e91d62 100644 --- a/src/comp/Makefile +++ b/src/comp/Makefile @@ -56,7 +56,7 @@ YICES_INC_FLAGS = -I../vendor/yices/include YICES_LIB_FLAGS = -L../vendor/yices/lib -lyices # HTCL -HTCL_HS = ../vendor/htcl +HTCL_HS = HTcl HTCL_INC_FLAGS = -L$(HTCL_HS) HTCL_LIB_FLAGS = -lhtcl @@ -170,7 +170,7 @@ GHCINCLUDES = \ GHCTMP = '-tmpdir $(TMPDIR)' # Default RTS flags for programs built with a Haskell main # 256MB heap, 10MB stack, 1 second interval between heap profiles -# If you modify this, also update rts_opts in ../vendor/htcl/haskell.c +# If you modify this, also update rts_opts in HTcl/haskell.c RTSFLAGS = "-with-rtsopts=-H256m -K10m -i1" FVIA ?= -fasm GHCFLAGS = \ diff --git a/util/haskell-language-server/gen_hie.py b/util/haskell-language-server/gen_hie.py index ba528910d..477ed58b1 100644 --- a/util/haskell-language-server/gen_hie.py +++ b/util/haskell-language-server/gen_hie.py @@ -11,13 +11,13 @@ "./Libs", "./GHC", "./GHC/posix", + "./Htcl" "./Parser", "./Parser/BSV", "./Parser/Classic", "./Parsec", "../vendor/stp/include_hs", "../vendor/yices/include_hs", - "../vendor/htcl" ] arguments = ["-i"]