Commit 0065d5ab authored by Simon Marlow's avatar Simon Marlow

Reorganisation of the source tree

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.
parent 28a464a7

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -175,6 +175,13 @@ A rough roadmap to the source tree: ...@@ -175,6 +175,13 @@ A rough roadmap to the source tree:
Resources Resources
--------- ---------
The GHC Developer's Wiki
The home for GHC Developers, with information on accessing the latest sources,
the bug tracker, and further documentation on the code.
http://hackage.haskell.org/trac/ghc
The Building Guide The Building Guide
Full documentation on the build system. Full documentation on the build system.
......
This diff is collapsed.
GHC build system The Glasgow Haskell Compiler
================ ============================
This is the top-level directory of the fptools build system. Several This is the source tree for GHC, a compiler and interactive
packages are part of this build system; if you got this as part of a environment for the Haskell functional programming language.
source distribution (eg. for GHC), then you will have one or more of
the following directories:
ghc The Glasgow Haskell Compiler For more information, visit GHC's web site:
hslibs A Collection of Haskell libraries
haddock A Haskell documentation tool
haggis The Haggis GUI toolkit
happy The Happy Haskell parser generator
hdirect Haskell interop tool
greencard A foreign function interface pre-processor for Haskell.
libraries Haskell libraries (reqd. by ghc)
nofib The NoFib Haskell benchmarking suite
Additional documentation for each project can be found in its http://www.haskell.org/ghc/
respective directory.
In addition, the following directories contain project-independent bits: Information for developers of GHC can be found here:
mk GNU make setup used by all of fptools http://hackage.haskell.org/trac/ghc/
glafp-utils Shared utility programs
docs Documentation on the installing and using
the fptools build system.
distrib Tools and additional bits for building distributions
Quick start: the following is *supposed* to work
Building & Installing
=====================
NB. you need GHC installed in order to build GHC, because the compiler
is itself written in Haskell. It is possible to build GHC using just
a C compiler, but we don't recommend this as the normal route. If you
*really* want to do it this way, then see the Building Guide (link
below).
You also need a few other tools installed: Happy [4], Alex [5], and
Haddock [6] (for building library documentation), and a good DocBook
XML toolchain if you want to build the compiler documentation.
Quick start: the following gives you a default build:
$ autoreconf
$ ./configure $ ./configure
$ make $ make
$ make install $ make install
where 'make' is whatever GNU make is called on your system (GNU make The autoreconf step is only necessary if this is a tree checked out
is *required*). If there are any other tools required for the build, from darcs. For source distributions downloaded from GHC's web site,
then the configure script will detect them and tell you if any are this step has already been performed.
missing. For example, a working GHC installation is required for
building most of the tools (including GHC itself). These steps give you the default build, which includes everything
optimised and built in various ways (eg. profiling libs are built).
It can take a long time. To customise the build, see the file
HACKING.
For full information on building GHC, see the GHC Building Guide [3],
which is also available in source form (DocBook XML) in docs/building.
The configuration script is a standard GNU autoconf script which
accepts all the normal arguments, eg. --prefix=<blah> to install the
package somewhere other than /usr/local. Try ./configure --help to
get a full list of the options.
There is usually an ANNOUNCE* file with any distribution. Please References
consult that, or the <piece>/README file, to find out how to proceed. ==========
Full documentation for the fptools build system can be found in the [1] http://www.haskell.org/ghc/ GHC Home Page
Building Guide: [2] http://hackage.haskell.org/trac/ghc GHC Developer's Wiki
[3] http://www.haskell.org/ghc/docs/latest/html/building/index.html
Building Guide
http://www.haskell.org/ghc/docs/latest/html/building/building-guide.html [4] http://www.haskell.org/happy/ Happy
[5] http://www.haskell.org/alex/ Alex
[6] http://www.haskell.org/haddock/ Haddock
More information about GHC can be found here:
http://www.haskell.org/ghc/ Contributors
============
-- Please see
The GHC Team, glasgow-haskell-users@haskell.org
http://www.haskell.org/ghc/contributors.html
...@@ -1055,4 +1055,65 @@ else ...@@ -1055,4 +1055,65 @@ else
GhcPkgCmd=$fp_cv_matching_ghc_pkg GhcPkgCmd=$fp_cv_matching_ghc_pkg
fi])# FP_PROG_GHC_PKG fi])# FP_PROG_GHC_PKG
# FP_GHC_HAS_READLINE
# -------------------
AC_DEFUN([FP_GHC_HAS_READLINE],
[AC_REQUIRE([FP_PROG_GHC_PKG])
AC_CACHE_CHECK([whether ghc has readline package], [fp_cv_ghc_has_readline],
[if "${GhcPkgCmd-ghc-pkg}" --show-package readline >/dev/null 2>&1; then
fp_cv_ghc_has_readline=yes
else
fp_cv_ghc_has_readline=no
fi])
AC_SUBST([GhcHasReadline], [`echo $fp_cv_ghc_has_readline | sed 'y/yesno/YESNO/'`])
])# FP_GHC_HAS_READLINE
# FP_GCC_NEEDS_NO_OMIT_LFPTR
# --------------------------
# Some OSs (Mandrake Linux, in particular) configure GCC with
# -momit-leaf-frame-pointer on by default. If this is the case, we need to turn
# it off for mangling to work. The test is currently a bit crude, using only the
# version number of gcc. Defines HAVE_GCC_MNO_OMIT_LFPTR.
AC_DEFUN([FP_GCC_NEEDS_NO_OMIT_LFPTR],
[AC_REQUIRE([FP_HAVE_GCC])
AC_CACHE_CHECK([whether gcc needs -mno-omit-leaf-frame-pointer], [fp_cv_gcc_needs_no_omit_lfptr],
[FP_COMPARE_VERSIONS([$gcc_version_str], [-ge], [3.2],
[fp_cv_gcc_needs_no_omit_lfptr=yes],
[fp_cv_gcc_needs_no_omit_lfptr=no])])
if test "$fp_cv_gcc_needs_no_omit_lfptr" = "yes"; then
AC_DEFINE([HAVE_GCC_MNO_OMIT_LFPTR], [1], [Define to 1 if gcc supports -mno-omit-leaf-frame-pointer.])
fi])# FP_GCC_NEEDS_NO_OMIT_LFPTR
# FP_SETUP_PROJECT_VERSION
# ---------------------
AC_DEFUN([FP_SETUP_PROJECT_VERSION],
[# Some renamings
AC_SUBST([ProjectVersion], [$PACKAGE_VERSION])
# Split PACKAGE_VERSION into (possibly empty) parts
VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
VERSION_TMP=`echo $PACKAGE_VERSION | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
VERSION_MINOR=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/`
ProjectPatchLevel=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/`
# Calculate project version as an integer, using 2 digits for minor version
case $VERSION_MINOR in
?) ProjectVersionInt=${VERSION_MAJOR}0${VERSION_MINOR} ;;
??) ProjectVersionInt=${VERSION_MAJOR}${VERSION_MINOR} ;;
*) AC_MSG_ERROR([bad minor version in $PACKAGE_VERSION]) ;;
esac
AC_SUBST([ProjectVersionInt])
# The project patchlevel is zero unless stated otherwise
test -z "$ProjectPatchLevel" && ProjectPatchLevel=0
# Remove dots from the patch level; this allows us to have versions like 6.4.1.20050508
ProjectPatchLevel=`echo $ProjectPatchLevel | sed 's/\.//'`
AC_SUBST([ProjectPatchLevel])
])# FP_SETUP_PROJECT_INFO
# LocalWords: fi # LocalWords: fi