1. 06 Apr, 2007 1 commit
  2. 15 Mar, 2007 1 commit
    • sven.panne@aedion.de's avatar
      Use update-alternatives for handling generic tool names · 1ee08bbe
      sven.panne@aedion.de authored
      ATTENTION: Packagers should read the following stuff carefully!
      
      GHC, Hugs and nhc come with various tools like runhaskell or hsc2hs. On the
      one hand this is quite handy, avoiding lots of tiny native packages, but OTOH
      this leads to a few problems:
      
         * The tools are not always identical in functionality.
      
         * The tools fight for a global generic name like "/usr/bin/runhaskell".
      
      These problems are not new and not unique to Haskell implementations, so for
      *nix-based system there is a tool called update-alternatives which handles
      those cases. The idea is as follows:
      
         * Each program/man page/etc. installs itself with a very specific name
           like /usr/bin/hsc2hs-ghc or /usr/share/man/man1/lua5.1.1.gz, so nothing
           clashes.
      
         * The (un-)installation scripts call update-alternatives to notify the
           system about new alternatives for a generic tool/manpage/etc.
      
         * Alternatives can be grouped together ("link groups"), so e.g. switching
           from Sun's Java to Kaffe switches compiler, JRE, manpages etc. together.
           Alas, this doesn't work well with the Haskell implementations yet,
           because they come with different sets of tools (in addition to runFOO):
      
             GHC:  hsc2hs
             Hugs: hsc2hs, cpphs
             nhc:  cpphs
      
           Either these tools should be disentangled fromt the Haskell
           implementations or all implementations should offer the same set.
           Opinions and recommendations on this topic are highly welcome.
      
         * This mechanism can be used to easily switch between several versions of
           the same implementation, too, but we are not yet fully prepared for that.
      
      As a first step, GHC now installs hsc2hs as 'hsc2hs-ghc' and does *not*
      install runhaskell directly anymore, only runghc. hsc2hs and runhaskell are
      created via update-alternatives now. What is currently missing is a mechanism
      for platforms like Windows and probably Mac OS X.
      1ee08bbe
  3. 09 Aug, 2006 1 commit
  4. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  5. 16 Jun, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-06-16 09:45:28 by simonmar] · 1957057d
      simonmar authored
      Move the boilerplate Makefile code for using libghccompat.a into a
      shared .mk file, lib/compat/compat.mk.  libghccompat.a is really a
      poor-mans package, but to make it a real package would mean dealing
      with variationg in the package support of different GHC versions, so
      this is easier for now.
      1957057d
  6. 14 Feb, 2005 1 commit
  7. 31 Jan, 2005 1 commit
  8. 28 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-28 12:55:17 by simonmar] · 153b9cb9
      simonmar authored
      Rationalise the BUILD,HOST,TARGET defines.
      
      Recall that:
      
        - build is the platform we're building on
        - host is the platform we're running on
        - target is the platform we're generating code for
      
      The change is that now we take these definitions as applying from the
      point of view of the particular source code being built, rather than
      the point of view of the whole build tree.
      
      For example, in RTS and library code, we were previously testing the
      TARGET platform.  But under the new rule, the platform on which this
      code is going to run is the HOST platform.  TARGET only makes sense in
      the compiler sources.
      
      In practical terms, this means that the values of BUILD, HOST & TARGET
      may vary depending on which part of the build tree we are in.
      
      Actual changes:
      
       - new file: includes/ghcplatform.h contains platform defines for
         the RTS and library code.
      
       - new file: includes/ghcautoconf.h contains the autoconf settings
         only (HAVE_BLAH).  This is so that we can get hold of these
         settings independently of the platform defines when necessary
         (eg. in GHC).
      
       - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
      
       - MachRegs.h, which is included into both the compiler and the RTS,
         now has to cope with the fact that it might need to test either
         _TARGET_ or _HOST_ depending on the context.
      
       - the compiler's Makefile now generates
           stage{1,2,3}/ghc_boot_platform.h
         which contains platform defines for the compiler.  These differ
         depending on the stage, of course: in stage2, the HOST is the
         TARGET of stage1.  This was wrong before.
      
       - The compiler doesn't get platform info from Config.hs any more.
         Previously it did (sometimes), but unless we want to generate
         a new Config.hs for each stage we can't do this.
      
       - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
         in CPP'd Haskell source.
      
       - ghcplatform.h defines *_TARGET_* for backwards compatibility
         (ghcplatform.h is included by ghcconfig.h, which is included by
         config.h, so code which still #includes config.h will get the TARGET
         settings as before).
      
       - The Users's Guide is updated to mention *_HOST_* rather than
         *_TARGET_*.
      
       - coding-style.html in the commentary now contains a section on
         platform defines.  There are further doc updates to come.
      
      Thanks to Wolfgang Thaller for pointing me in the right direction.
      153b9cb9
  9. 26 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-26 16:03:40 by simonmar] · 55aa70cd
      simonmar authored
      Common up the ghc_ge_XXX variables into config.mk, and add the
      ability to build ghc/lib and ghc/utils using the stage1 compiler, by
      saying 'make UseStage1=YES'.  This is going to be useful for
      bootstrapping.
      55aa70cd
  10. 05 Jan, 2005 1 commit
  11. 12 Aug, 2004 1 commit
  12. 15 Feb, 2004 1 commit
    • panne's avatar
      [project @ 2004-02-15 12:20:26 by panne] · f0444935
      panne authored
      I'm giving up here: The various quoting-related changes in rawSystem &
      friends make it impossible to pass $(exeext) with double quotes via
      cpp to Main.hs in a backwards-compatible way, so we revert to a cruel
      hack here.  >:-(  Improvements are highly welcome...
      f0444935
  13. 09 Feb, 2004 1 commit
  14. 07 Feb, 2004 1 commit
    • panne's avatar
      [project @ 2004-02-07 16:37:06 by panne] · 5cb4bb13
      panne authored
      Simplifications + small steps towards a stand-alone hsc2hs:
      
       * Replaced Config module by a simple CPP macro
       * Don't #include configuration header
       * Bumped version number
       * Warning police
      5cb4bb13
  15. 04 Jun, 2003 1 commit
  16. 07 Feb, 2003 1 commit
  17. 29 Oct, 2002 1 commit
  18. 27 Oct, 2002 1 commit
  19. 09 Sep, 2002 1 commit
  20. 29 May, 2002 1 commit
  21. 30 Apr, 2002 2 commits
  22. 29 Jan, 2002 1 commit
  23. 21 Jan, 2002 1 commit
  24. 17 Jan, 2002 1 commit
  25. 26 Dec, 2001 1 commit
  26. 03 Nov, 2001 1 commit
  27. 23 Oct, 2001 1 commit
  28. 12 Oct, 2001 2 commits
  29. 12 Sep, 2001 1 commit
    • rrt's avatar
      [project @ 2001-09-12 11:16:05 by rrt] · 7748154b
      rrt authored
      Make hsc2hs find template-hsc.h on Windows. This involves putting Main.hs
      through cpp; to avoid the string gap problem preprocessing
      __GLASGOW_HASKELL__ into its value inside strings, make judicious use of ++
      (hope that's OK, Marcin; there seemed very little point in putting it all in
      KludgedSystem this time).
      7748154b
  30. 08 Aug, 2001 1 commit
  31. 01 Aug, 2001 1 commit
  32. 16 Jul, 2001 1 commit
  33. 11 Jul, 2001 1 commit
  34. 03 Jul, 2001 1 commit
  35. 27 Jun, 2001 1 commit
  36. 22 May, 2001 1 commit
  37. 27 Mar, 2001 1 commit
  38. 23 Mar, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-03-23 16:36:20 by simonmar] · 50027272
      simonmar authored
      Changes to support bootstrapping the compiler from .hc files.  It's
      not quite working yet, but it's not far off.
      
        - the biggest change is that any injected #includes are now placed in
          the .hc file at generation time, rather than compilation time.  I
          can't see any reason not to do this - it makes it clear by looking at
          the .hc file which files are being #included, it means one less
          temporary file at compilation time, and it means the .hc file is more
          standalone.
      
        - all the gruesomeness is in mk/bootstrap.mk, which handles building
          .hc files without a ghc driver.
      50027272