[Gtk2hs-devel] move Gtk2HsSetup.hs to gtk2hs-buildtools

Claus Reinke claus.reinke at talk21.com
Thu Nov 25 12:43:02 EST 2010

>>> b) putting Gtk2HsSetup.hs in either gtk2hs-buildtools or any other 
>>> library
>>> means that ./Setup.hs has to run to realize that this library  is 
>>> missing
>>> and that it needs to be downloaded. However, ./Setup.hs  cannot be run
>>> because it imports Gtk2HsSetup.hs which is not yet  available.
>> There is MIN_VERSION_<package>(), so you might be able to check
>> whether it is defined/has the right version, if it comes with the tools
>> package.
> Does that work in Setup.hs? I thought that these CPP macros were
> generated by the 'confgure' step, which may not have been run yet.

argh. You're right - the macros are not available in Setup.hs. I
keep forgetting that because it would be useful to have them


So, if putting the file into the tools package doesn't suffice, we'd
be back to passing in CPP macros from .cabal files (or using a front
Setup.hs to check the configuration info before calling out to a
version-specific SetupX.hs).


More information about the Libraries mailing list