How to automatically include Haskell C-sources through `Setup.hs` build script?

妖精的绣舞 提交于 2019-12-12 22:36:01

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!