That is very dodgy; it makes *every* C file compiled have that header added
to it. Apparently sys/event.h needs some other header files to be included
on some OS's, and so this leads to compile failures in completely unrelated
places to the code that actually uses sys/event.h
This reverts commit c993d8e710, which added
this with no rationalle and I must have missed in amoung the other patches
when merging.
Also, Utility/kqueue.c already includes sys/event.h
The current use of the 'Fast' and 'Production' flags is both inconsistent and
redundant. It's inconsistent, because users are allowed to specify both '-fFast
-fProduction' at the same time -- thereby enabling two contradicting features.
The flags are redundant, because Cabal allows users to specify '-O0' at
configure time, which is essentially the same as '-fFast'. Since 'Production'
is just the opposite of 'Fast', this means that neither flag is needed.
I have seen some other programs do this, and think it's pretty cool. Means
you can test wherever it's deployed, as well as at build time.
My other reason for doing it is less happy. Cabal's handling of test suites
sucks, requiring duplicated info, and even when that's done, it fails to
preprocess hsc files here. Building it in avoids that and avoids having
to explicitly tell cabal to enable test suites, which would then make it
link the test executable every time, which is unnecessarily slow.
This also has the benefit that now "make fast test" does a max speed build
and tests it.
Stopped checking the assistant flag for flags like webapp and xmpp,
because cabal disables the assistant if the other flag's dependencies
cannot be satisfied.
Been meaning to do this for some time; Android port was last straw.
Note that newer versions of the uuid library have a Data.UUID.V4 that
generates random UUIDs slightly more cleanly, but Debian has an old version
of the library, so I do it slightly round-about.