New patches: [haddock: run unlit before cpp, like ghc does. alistair@abayley.org**20071204211356] { hunk ./Distribution/Simple/Haddock.hs 277 + let cppOutput = targetFileNoext <.> "hspp" + let hsFile = targetFileNoext <.> "hs" hunk ./Distribution/Simple/Haddock.hs 280 - if needsCpp bi - then runSimplePreProcessor (ppCpp' inputArgs bi lbi) - file targetFile verbosity - else copyFile file targetFile - when (targetFileExt == ".lhs") $ do - runSimplePreProcessor ppUnlit - targetFile (targetFileNoext <.> "hs") verbosity - return () + -- Run unlit first, then CPP + if (targetFileExt == ".lhs") + then runSimplePreProcessor ppUnlit file hsFile verbosity + else copyFile file hsFile + when (needsCpp bi) $ do + runSimplePreProcessor (ppCpp' inputArgs bi lbi) + hsFile cppOutput verbosity + removeFile hsFile + copyFile cppOutput hsFile + removeFile cppOutput } Context: [The NHC module now uses cpp Duncan Coutts **20071129124745] [Rename defaultMain__ to defaultMainHelper Duncan Coutts **20071121203604 It was a silly name. ] [Bump development version number due to api change Duncan Coutts **20071120164121 Since we've changed the exports of the Setup module significantly. However since this is a dev series I don't think it makes sense to bump the major version number as in the PVP, or we'd end up doing it all the time in a development series. ] [Remove unused code in Setup module Duncan Coutts **20071120163922 This changes the API so cannot be pushed to the 1.2 branch. ] [Use the new Command stuff for Distribution.Simple Duncan Coutts **20071120161816] [Use the new Command stuff for Distribution.Make Duncan Coutts **20071120161605] [Stop using deprecated setup code in SetupWrapper Duncan Coutts **20071120161435] [Add Command module to exposed-modules Duncan Coutts **20071116145234] [Add new Command abstraction for handling command line args Duncan Coutts **20071116141225 Add instances of it for all existing Cabal commands. This should makes command line handling more regular and hopefully make it easier to override or make derived commands in cabal-install. So far we're only adding code, not modifying existing stuff except renaming some existing internal functions so they do not clash with the new code. ] [Add emptyPFEFlags and emptySDistFlags for consistency Duncan Coutts **20071116135625] [Simplify parameters to defaultMain__ Duncan Coutts **20071116132323 Don't use maybe, just have the callers pass the defaults instead. Eliminate the Maybe PackageDescription parameter and instead just have the called override the readDesc in the UserHooks. This simplifies defaultMainWorker too as it can always just use readDesc. ] [Make scratchdir into a proper configure flag Duncan Coutts **20071116131604 rather than using the flag extension mechanism. It was the old flag using it and I'm about to replace that whole system. ] [Refactor: move UserHooks into it's own module Duncan Coutts **20071114150659] [Tidy up args in the pfe, clean, haddock and hscolour default hooks Duncan Coutts **20071114150131 Don't pass unnecessary args and inline trivial definitions ] [Partial implementation of installing for nhc98 Duncan Coutts **20071127174132 Doesn't install into the right place by default yet. ] [Library archive creation for nhc98 Duncan Coutts **20071127174017 So far only for vanilla not profiling libs. ] [Escape some special characters Ian Lynagh **20071126163253] [Fix a broken link Ian Lynagh **20071126163137] [Escape some special characters in the haddock docs Ian Lynagh **20071126155145] [Fix what looks like a doc braino Ian Lynagh **20071126154824] [Put nhc98 .hi files in the target dir rather than the src dir Duncan Coutts **20071127003800 So they end up next to the .o files under dist/ just like for ghc. ] [Workaround import bug in nhc98 Duncan Coutts **20071123210009 Cabal can now build using itself and nhc98 ] [Add support for building libs and exes with nhc98 via hmake Duncan Coutts **20071123205750 Doesn't do installation yet or check for existence of dependent packages. ] [FIX BUILD with GHC 6.2: getTemporaryDirectory wasn't available Simon Marlow **20071123093121] [Do proper pre-processing for Haddock 2 David Waern **20071109162557 Besides pre-processing, this patch adds include paths and output paths to the ghc flags passed to Hadddock. ] [Import changelog changes from the 1.2 branch Duncan Coutts **20071116145738] [Export PreProcessor constructor and mkSimplePreProcessor Duncan Coutts **20071116145327 Otherwise it is impossible to declare new pre-processors in Setup.hs files ] [Fix finding ghc's ld.exe on windows. Duncan Coutts **20071120101110 It looks like it had worked but the ld -x test broke that too. Grr. ] [Fix configure --interfacedir= Duncan Coutts **20071114191550 bug #178 ] [Fix haddock interface file location used when registering inplace packages Ian Lynagh **20071110171424 This fixes inter-package doc links when building GHC. ] [Add extensions that ghc-6.6 supports Duncan Coutts **20071109142250] [The extension is NoMonoPatBinds not MonoPatBinds Duncan Coutts **20071109142217] [Add language extensions introduced in GHC 6.8 Duncan Coutts **20071108185612] [Make the ld -x test use the temp dir rather than dist dir Duncan Coutts **20071108141349 Should fix cabal-install. ] [fix compilation with GHC 6.2.x Simon Marlow **20071105113004] [Install the haddock interface file to the right place Ian Lynagh **20071030170254] [Add an interfacedir configure flag, for where to put haddock insterface files Ian Lynagh **20071029174908] [put the binary-dist copy in the right place Simon Marlow **20071026132515] [fix $(TOP) Simon Marlow **20071026101915] [fix XML (at least, makes it work here) Simon Marlow **20071026101907] [no longer need to pass --allow-missing-html to haddock Ross Paterson **20071026084124 This option only affects Haddock if it is invoked with --use-package, and Cabal no longer uses that option, as it now gets the arguments for --read-interface from ghc-pkg directly (cf patch "rejig location of package interfaces for haddock"). ] [no longer need to pass --ghc-pkg to haddock Ross Paterson **20071026073126 Haddock only runs ghc-pkg if invoked with --use-package, and Cabal no longer uses that option, as it now gets the arguments for --read-interface from ghc-pkg directly (cf patch "rejig location of package interfaces for haddock"). ] [fix help text (--PROG-arg is now --PROG-option) Ross Paterson **20071026001045] [Fix a bug in the Unlit pre-processor David Waern **20071024181908 With this patch, unlit can handle line pragmas with filenames that contain spaces. ] [Adjust verbosity of a step in configure Duncan Coutts **20071024160758] [Compile a .c rather than a .hs file to make a .o file in ld -x configure test Duncan Coutts **20071024150505 Since when bootstrapping ghc we're not in any position to compile .hs files that easily. ] [Create the dist/ dir early in the configuration process Duncan Coutts **20071024133554] [Create temp files in dist, since it is now guaranteed to exist Duncan Coutts **20071024102850] [Regenerate GHC/Makefile.hs from GHC/Makefile.in Duncan Coutts **20071023183804] [Only use ld -x on systems where ld supports that. Duncan Coutts **20071023183738 Hopefully this fixes it for both ordinary builds and via ghc makefiles. ] [pass cpp-options to cpphs Ross Paterson **20071023184210] [Refuse to run any commands if the .cabal has been modified Simon Marlow **20071023093111 See GHC bug #1372 This is a consistency check, intended to prevent this class of build failures: * Package P is updated, its version number is bumped, the new version is compiled and installed. * Package Q depends on P. Q is modified to use the new P, and Q's .cabal file is updated with changes to the build-depends field to depend on the new version of P. * The user has an old build of Q. They pull the changes to Q and 'setup build' without cleaning or re-configuring. Build errors ensue, because the code of Q depends on changes to P's API, and we're still building against the old P. Note that you can't get segfaults this way, only build errors. This also relies on some new consistency checking in GHC 6.8 to work properly. If the user re-configures their Q build and then issues 'setup build' without cleaning, GHC must now realise that the package flags have changed, and re-compile all the affected Q modules. GHC 6.6 would not do this, but 6.8 does. ] [Add support for Haddock 2.0 David Waern **20071021231415] [Be explicit about the base version dependency Duncan Coutts **20071023122417 don't just leave it up to the default search order ] [typo in comment Ross Paterson **20071022091235] [Correct the spelling of mingw32 in os alias list Duncan Coutts **20071018195641 Doh! ] [refinement of fix for #1785: don't use xargs' -s option at all Simon Marlow **20071019124522] [FIX GHC bug #1785: use 2048 as the maximum command-line size Simon Marlow **20071018140500 Apparently Solaris sets a limit of 2048 here ] [don't fail if xxx_hsc_make.c is gone Ross Paterson **20071018164245 The non-GHC hsc2hs deletes it even if the compilation fails. ] [Use cpp-options rather than abusing ghc-options Duncan Coutts **20071017164914] [Add a "cpp-options:" field and use it for pre-processing .hs .hsc .chs files Duncan Coutts **20071017164747 This is for pre-processing Haskell modules, not for C code. We already have cc-options for that purpose. Up 'til now people have been abusing ghc-options for this purpose. Even Cabal itself was guilty of doing that. ] [Figure out if hsc2hs is using gcc or ghc as it's C compiler Duncan Coutts **20071017143108 and pass the appropriate flags on the basis of knowing that. This is a hack. What we should do longer term is make hsc2hs always use gcc as it's C compiler and have Cabal figure out the right flags to pass it, rather than using ghc to pass on the appropriate flags to gcc. ] [Change the handling of cpp & ghc flags for hsc2hs Duncan Coutts **20071016231652 The hsc2hs that comes with ghc uses ghc as the C compiler. This means we must escape the real cc flags. It also means we can ask ghc to add extra include dirs that we might need to find includes of dependent packages. This is a bit of a hack. In the longer term it'd be better for Cabal to collect the include dirs and cc options of dependent packages and to pass them explicitly itself. ] [Improve error messages for failed sanity checks. Thomas Schilling **20070925144955] [Translate flat files into sectionized files, by duplicating global Thomas Schilling **20070925144921 dependecies into each non-empty section. The previous solution dumped them into the library section, even if it would have been empty otherwise. ] [Move ghcVerbosity function into GHC module to share code Duncan Coutts **20071014165730] [Note current development version number in release notes Duncan Coutts **20071012121835] [Update the TODO list, mostly removing things. Duncan Coutts **20071012121702 Most of these are duplicated by Trac bugs. We should try and get rid of this TODO file completely and just use Trac. ] [Add logging functions notice, info, debug functions and use them consistently Duncan Coutts **20071012113237 We previously had this kind of code all over the place: > when (verbosity >= verbose) > (putStrLn "some message") We now replace that with: > info verbosity "some message" Much nicer. ] [When parsing ghc-pkg output, only look at the first package.conf file for GlobalPackageDB and SpecificPackageDB, and all package.conf files for UserPackageDB. bjorn@bringert.net**20071016095254 Before, we would consider user packages when fulfilling dependencies for global installs. ghc-pkg will refuse to install packages globally if they use user packages. Thus, without this patch, global installs can fail when you have user packages installed. ] [Pass -c (silent create) to ar when verbosity < normal. bjorn@bringert.net**20071013220906] [Change --verbosity= option of SetupWrapper (cabal-setup) to --verbose=, since that is what the rest of Cabal uses. bjorn@bringert.net**20071013215617] [Pass -w -v0 to ghc when compiling Setup.{lhs,hs} in SetupWrapper when verbosity == silent. bjorn@bringert.net**20071013214820] [Update documentation on configurations Duncan Coutts **20071012015338 Describe the new syntax and make variuous changes to the description of the meaning. ] [Use -O2 for compiling .c files when we configure --enable-optimization Duncan Coutts **20071011223607 Seems a reasonable default behaviour. ] [parameterise InstalledPackageInfo over the type of module names Simon Marlow **20071003114947 This is useful in GHC, we can instantiate InstalledPackageInfo to ModuleName and avoid lots of String<->FastString conversions. ] [Remove commented-out code. bjorn@bringert.net**20071006083615 Push to 1.2. ] [Rename parseDescription to parsePackageDescription. bjorn@bringert.net**20071006083354 This should be pushed to cabal-1.2 to make cabal-install work with 1.2. ] [Bump version number to 1.3 bjorn@bringert.net**20071005105412] [Expose parseDescription. bjorn@bringert.net**20071005104554] [Fix GenericPrackageDescription pretty printing to make it parsable. It still does not include all information. bjorn@bringert.net**20071005102555] [Haddock comment for the available dependencies argument to finalizePackageDescription. bjorn@bringert.net**20071004134544] [Add extra-libs to shared library linking Clemens Fruhwirth **20070927123923] [Actually -stubdir only works well in ghc-6.8 due to -I search dir mess Duncan Coutts **20070926131843 In ghc-6.6 the Foo/Bar.hc files only #include "Bar_stub.h" rather than #include "Foo/Bar_stub.h". This means when we set the stubdir so that the _stub.h files don't sit next to the .hs file then the include search path is not right to find the _stub.h file. In ghc-6.8 this is fixed so that it adds the -stubdir path to the include search path when calling gcc. ] [The -stubdir flag is supported in ghc-6.6 not just 6.6.1 Duncan Coutts **20070926114223] [Add -package-name to GHC invocation when linking DSOs Clemens Fruhwirth **20070926090025] [Be more fuzzy with os, arch and impl matching in conditions. Fixes bug #158. Duncan Coutts **20070925132608 Do all the comparisons case insensitively and add some OS aliases so that if os(windows) works if the System.Info.os is actually "mingw32". ] [Don't generate links when dependent docs not installed. Fixes bug #157. Duncan Coutts **20070924142520 Generates a warning rather than failing as before. ] [Fix warnings Ian Lynagh **20070923122921] [Fix pre-processing for executables Duncan Coutts **20070922105414 The pre-processed files should go into the exe's build dir, not the lib's build dir. Also pre-process main modules, fixing bug #14. ] [Add a boring file Ian Lynagh **20070913203550] [Remove some now-unecessary cleaning that causes problems for haskell-src Ian Lynagh **20070920203257 The code that removes .hs files in the source tree generated from .y files had a comment: XXX: This is actually no longer necessary, but we keep it, so that clean works correctly on packages built with an older version of Cabal This was causing problems for source distributions that include such generated files (including haskell-src in extralibs). ] [Move expensive conviguration actions inside branch where they're used Duncan Coutts **20070917085834 We only need to configure the compiler and resolve any "Cabal-Version:" dependency when we're actually going to compile the Setup.hs program. We can otherwise save time by not calling ghc and ghc-pkg unnecessarily. (I only noticed this because I've got >150 registered packages which causes ghc and ghc-pkg to be very slow to start.) ] [Note in .cabal file that we're using a custom build-type Duncan Coutts **20070917033959] [Pass on all the cabal-setup options to cabal, not just unrecognised ones Duncan Coutts **20070917025121 So for example -v and -w get passed on rather than swallowed by cabal-setup itself. ] [Put setup program and setup .o/.hi files into dist/setup Duncan Coutts **20070917024907 That way they get cleaned automatically and do not clutter the top dir. ] [Correct the verbosity range in the "--help" text Duncan Coutts **20070917024416 The correct range in 0--3, not 0--2 or 0--5 ] [look in odir for source and .hs files, not buildDir lbi Duncan Coutts **20070917145030 odir = buildDir lbi for the lib case, which is why it worked most of the time in testing but in the exe case it's a different dir. ] [Put _stub.{c|h} files under dist/ so they'll get cleaned. Fixes bug #154. Duncan Coutts **20070917123042 Only used with ghc-6.6 and later which supports the -stubdir flag. With earlier ghc versions the files still end up in the src dirs and so do not get cleaned. ] [Fix haddockDir Ian Lynagh **20070912133051] [Add htmlDirTemplate to inplaceDirs Ian Lynagh **20070912125749] [Add a --htmldir flag Ian Lynagh **20070912122145] [Don't forcibly append "pkgName (package pkg_descr)" to htmldir Ian Lynagh **20070911192814] [TAG 2007-09-06 Ian Lynagh **20070906212150] [use OPTIONS instead of OPTIONS_GHC for now, the latter doesn't work with GHC 6.2.x Simon Marlow **20070912105243] [Don't create empty data dirs. Fixes bug #153. Duncan Coutts **20070912113803 Patch contributed by Sven Panne. ] [Use confgurations to help build Cabal for ghc-6.2.x Duncan Coutts **20070912112934 Replacing a long-standing comment telling people how to do it manually. ] [warning police Simon Marlow **20070907140731] [Update D.S.GHC/Makefile.hs Clemens Fruhwirth **20070906213507] [Add shared library building to GHC module (also via Makefile) Clemens Fruhwirth **20070906213132] [fix type clash: Data.Version -> Distribution.Version Malcolm.Wallace@cs.york.ac.uk**20070906163051] [fix broken #ifdefs for nhc98 Malcolm.Wallace@cs.york.ac.uk**20070906161553] [spell nhc98-options correctly Malcolm.Wallace@cs.york.ac.uk**20070906150411] [Fix various mispellings of nhc98. Malcolm.Wallace@cs.york.ac.uk**20070906143959] [nhc-options should be spelled nhc98-options Malcolm.Wallace@cs.york.ac.uk**20070906143536] [TAG 1.2.0 Duncan Coutts **20070906121830] Patch bundle hash: b90eec38bdb72c429d503e569b69a61b9e01eaf4