diff --git a/Makefile_happysrcs b/Makefile_happysrcs index f4041ee..2f464a1 100644 --- a/Makefile_happysrcs +++ b/Makefile_happysrcs @@ -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 diff --git a/find-build.cl b/find-build.cl new file mode 100755 index 0000000..f445199 --- /dev/null +++ b/find-build.cl @@ -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))))) +