fix hardcoded builddir

This commit is contained in:
crumbtoo
2024-02-22 10:51:43 -07:00
parent 50fac603b9
commit f691115868
2 changed files with 10 additions and 1 deletions

View File

@@ -1,10 +1,11 @@
GHC_VERSION = $(shell ghc --numeric-version)
HAPPY = happy
HAPPY_OPTS = -a -g -c -i/tmp/t.info
ALEX = alex
ALEX_OPTS = -g
SRC = src
CABAL_BUILD = dist-newstyle/build/x86_64-osx/ghc-9.6.2/rlp-0.1.0.0/build
CABAL_BUILD = $(shell clisp find-build.cl)
all: parsers lexers

8
find-build.cl Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env clisp
(let* ((paths (directory "dist-newstyle/build/*/*/rlp-*/build/"))
(n (length paths)))
(cond ((< 1 n) (error ">1 build directories found. run `cabal clean`."))
((< n 1) (error "no build directories found. this shouldn't happen lol"))
(t (format t "~A" (car paths)))))