This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 12 Jan, 2005 1 commit
    • ijones's avatar
      glob of CVS changes; PError, NHC options, system.directory, NHC builds · d1975ee2
      ijones authored
      Authors: Malcolm Wallace, Ross Paterson, Krasimir Angelov
      
        move createIfNotExists and removeFileRecursive functions from
        Distribution.Simple.Utils to System.Directory. The functions are renamed
        to createDirectoryIfMissing and removeDirectoryRecursive.
      
        avoid a few GHC warnings
      
        get IOError stuff from System.IO.Error instead of System.IO
      
        Minor tweaks to build with nhc98.
      
        OPTIONS pragma stuff for nhc98 and compat w/ ghc
      
        Use a custom monad ParseResult for parse results instead of Either PError,
        removing the need for Distribution.Compat.Error and the dependency on mtl.
        
      
      d1975ee2
  2. 10 Jan, 2005 5 commits
  3. 09 Jan, 2005 1 commit
  4. 08 Jan, 2005 5 commits
    • ijones's avatar
      look in libraries source directory for executable modules · 79edfb28
      ijones authored
      When building executables, one typically wants to build them based on
      the library that's contained in the cabal package.  This was difficult
      if both the executables and the library used different
      hs-source-dir's.  This patch causes executables to look at the
      library's hs-source-dir for modules when preprocessing and building.
      
      This is instead of building and locally installing a package and using
      the -package flag to build the executable, since that's more
      complicated, and won't necessarily work if the library isn't designed
      to be installed in-place.
      79edfb28
    • ijones's avatar
      cleaned up unit test · e7600411
      ijones authored
      e7600411
    • ijones's avatar
      048b31ad
    • ijones's avatar
      added docs for licenses · f3d2cc60
      ijones authored
      f3d2cc60
    • ijones's avatar
      fix from krasimir for getHomeDirectory · 20c33412
      ijones authored
        I added getHomeDirectory function to Distribution.Compat.Directory
        which
        now is used from GHCPackageConfig.localPackageConfig instead of
        (getEnv "HOME").
        Without this fix the build process under Windows terminate with
        "does not exists (no environment variable)".
        
        NOTE: The fix works only if Cabal is built with ghc-6.3+. In any other case
        getHomeDirectory is defined as getEnv "HOME" and will continue to fail.
        This can be fixed but it will add an additional dependency of Cabal from
        shell32 under Windows and ghc < 6.3. I decided to leave the things at this
        stage because they are more maintainable in this way. If this is a pain I
        can rewrite the things latter.
      20c33412
  5. 07 Jan, 2005 3 commits
    • ijones's avatar
      fixed case where two main modules are in the same directory · 4238a696
      ijones authored
      It's pretty common to have a situation where two modules with
      different filenames are both named Main.  If they're in the same
      directory, and we use the -odir and -hidir flags, ghc --make uses the
      Main.o produced from the first build to link the 2nd!
      
      I added a pretty tricky test case for this, after it was reported by
      Ganes Sittampalam while trying to build the HaXmL executables.
      
      I fixed it today by adding the executable name to the -odir and -hidir
      paths, to make sure that they don't use the same Main.o... this is a
      bit inefficient, though, because I'm pretty sure that means it will
      rebuild any bits of the library it depends on for each executable.
      
      Any objections to this?
      4238a696
    • ijones's avatar
      fixed three bugs in the parser and pretty printer · 00bedcb7
      ijones authored
      Two of the bugs were passing the wrong accessor function to the pretty
      printer.
      
      The third bug was that the pretty printer rendered "foo\\bar" as
      "foo\bar", but actually in order to get the slash into the string, the
      user would have to have used the quote syntax.  I think we decided
      that the quote syntax meant a haskell string, so they should input it
      as "foo\\bar", of course internally represented as "foo\bar', but when
      printed, it should show two slashes again.
      00bedcb7
    • ijones's avatar
      ad1c4ef3
  6. 06 Jan, 2005 9 commits
    • ijones's avatar
      cvs pull from ross paterson · 2d88124a
      ijones authored
        buildHugs: use lex to tokenize the source file when looking for "foreign"
        use FilePath.objExtension
        only read Setup.buildinfo if present
        trim "Multi-line!" from help message
        move hcOptions function to Distribution.PackageDescription
        add Hugs options and $@ to runhugs command line (Unix only)
      2d88124a
    • ijones's avatar
      removed OPTIONS -cpp · 39d085f4
      ijones authored
      39d085f4
    • ijones's avatar
      fixed some haddock problems · 2cbaebd8
      ijones authored
      2cbaebd8
    • ijones's avatar
      fixed checking for unknown args · e04b8f7f
      ijones authored
      Long story:
      
      It seems that Marvin removed my beautiful and powerful "getOpt"
      alterations to use the System.Console one, which I had already deemed
      to be non-beautiful because of the errors it spews when faced with
      arguments it doesn't understand.
      
      I think Marvin misunderstood the API docs that seem to suggest that
      the "commands" that get passed back from getOpt are the non-matched
      arguments.  In fact, non-matched arguments get returned as errors
      (ewwwww).
      
      So I had to re-apply my GetOpt module, and alter the parser
      accordingly.
      
      Also, since it's not OK to pass random arguments all the time (just
      when you have user hooks), I cleaned up calls to no_extra_flags to
      only get called when there's nothing sensible to do with unknown
      arguments.
      e04b8f7f
    • ijones's avatar
      added test case for two mains in same directory · 82605922
      ijones authored
      82605922
    • ijones's avatar
      failing test cases and new assertCmdFail function · 39046f12
      ijones authored
      39046f12
    • ijones's avatar
      copy-prefix now prepends prefix · 6cf86a70
      ijones authored
      ** The value of --copy-prefix is now prepended to that of --prefix
      (like $DESTDIR) instead of replacing it.  As Ross pointed out, it
      doesn't really make sense for --prefix not to be a prefix of
      --copy-prefix, as the value of --prefix may be embedded in the
      generated files.
      
      ** Unit tests change to reflect
      6cf86a70
    • ijones's avatar
      the default for --prefix is now /usr/local · 18e9ee77
      ijones authored
      18e9ee77
    • ijones's avatar
      41b4788c
  7. 03 Jan, 2005 3 commits
  8. 02 Jan, 2005 3 commits
  9. 01 Jan, 2005 7 commits
  10. 31 Dec, 2004 1 commit
  11. 30 Dec, 2004 2 commits
    • ijones's avatar
      cvs commit blob from ross patterson · 9ef44ff2
      ijones authored
      ** haddock fixes
      
      ** Add the following fields to PackageDescription:
        
        	buildPackage   :: Bool,         -- ^ package is buildable here
        	ccOptions      :: [String],     -- ^ options for C compiler
        	ldOptions      :: [String],     -- ^ options for linker
        	frameworks     :: [String],
        
        When these are system dependent (as they often are), they will need to be
        overridden, but the mechanism is left to the Cabal user.
        
        Not that I've treated these as basic fields, so they apply to the library
        (if any) and all executables in the package.  The overriding is easier
        that way.
      
      ** Make the build prefix settable with the --builddir option to configure
        (in Simple), save this in the LocalBuildInfo, and use it in subsequent
        phases.
        
        This is useful for the Hugs build, where we want to place the built
        libraries so that we can easily use them inplace.
      
      ** Some rearrangement, centring on changes to the definition of
        PPSuffixHandler:
        
        * removed the special treatment of literate source: a separate
          preprocessor can be used for these if required.
        
        * handlers can use package and local build info to construct the
          appropriate preprocessor.
        
        Also, the supplied suffix handlers list now only has entries for suffixes
        that need preprocessing (i.e. not .hs or .lhs).  Dummy entries for the
        suffixes handled by the compiler are added internally.
      
      **  Add a function getOptionsFromSource to fetch LANGUAGE and OPTIONS pragmas
        from the initial part of a Haskell source module (as proposed by SimonM
        on the libraries list).
        
        Also export the auxiliary function stripComments, which does what it says,
        optionally preserving pragmas.
      
      9ef44ff2
    • ijones's avatar
      more refactoring of InstallCmd · 9069b9a4
      ijones authored
      9069b9a4