问题
In a Haskell project's cabal file we have the following sections:
C-Sources: src/A.c
, src/B.c
, ...
Includes: include/A.h
, include/B.h
, ...
Unfortunately, wildcarding in these sections is not allowed (as confirmed here):
-- this doesn't work:
C-Sources: src/*.c
Includes: include/*.h
Question: How can one alter Setup.hs
to automatically include src/*.c
and include/*.h
as above?
来源:https://stackoverflow.com/questions/41575528/how-to-automatically-include-haskell-c-sources-through-setup-hs-build-script