Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[project @ 1996-11-21 16:45:53 by simonm]

New Build System!
  • Loading branch information...
commit 02b60157852c1bf3c371b47c33d83814a05153bc 1 parent c7cfec6
simonm authored
Showing with 3,534 additions and 5,309 deletions.
  1. +23 −0 Makefile
  2. +0 −36 Makefile.in
  3. +0 −129 STARTUP.in
  4. +58 −175 configure.in
  5. +0 −38 ghc/Jmakefile
  6. +79 −0 ghc/Makefile
  7. +0 −59 ghc/Makefile.BOOT
  8. +0 −920 ghc/compiler/Jmakefile
  9. +223 −0 ghc/compiler/Makefile
  10. +1 −1  ghc/compiler/simplCore/SimplCore.lhs
  11. +0 −13 ghc/docs/Jmakefile
  12. +6 −0 ghc/docs/Makefile
  13. +0 −3  ghc/docs/install_guide/Jmakefile
  14. +5 −0 ghc/docs/install_guide/Makefile
  15. +0 −10 ghc/docs/release_notes/Jmakefile
  16. +6 −0 ghc/docs/release_notes/Makefile
  17. +5 −3 ghc/docs/state_interface/{Jmakefile → Makefile}
  18. +0 −6 ghc/docs/users_guide/Jmakefile
  19. +7 −0 ghc/docs/users_guide/Makefile
  20. +0 −44 ghc/driver/Jmakefile
  21. +34 −0 ghc/driver/Makefile
  22. +4 −4 ghc/driver/ghc-iface.lprl
  23. +32 −32 ghc/driver/ghc.lprl
  24. +0 −105 ghc/includes/Jmakefile
  25. +41 −0 ghc/includes/Makefile
  26. +77 −0 ghc/lib/.depend
  27. +0 −236 ghc/lib/Jmakefile
  28. +47 −0 ghc/lib/Makefile
  29. +125 −0 ghc/lib/Makefile.libHS
  30. +0 −68 ghc/lib/cbits/Jmakefile
  31. +37 −0 ghc/lib/cbits/Makefile
  32. 0  ghc/lib/tests/Jmakefile
  33. +198 −0 ghc/mk/buildflags.mk
  34. +192 −0 ghc/mk/ghc-opts.mk
  35. +14 −0 ghc/mk/ghc.mk
  36. +239 −0 ghc/mk/ghcconfig.mk.in
  37. +99 −0 ghc/mk/site-ghc.mk
  38. +40 −0 ghc/mk/suffixes-ghc.mk
  39. +0 −64 ghc/mkworld/GHC_OPTS
  40. 0  ghc/mkworld/Jmakefile
  41. +0 −9 ghc/mkworld/install-ghc.jm
  42. +0 −20 ghc/mkworld/macros-ghc.jm
  43. +0 −391 ghc/mkworld/only4-ghc.jm
  44. +0 −467 ghc/mkworld/site-ghc.jm.in
  45. +0 −27 ghc/mkworld/suffixes-ghc.jm
  46. +0 −141 ghc/mkworld/utils-ghc.jm
  47. +0 −440 ghc/runtime/Jmakefile
  48. +114 −0 ghc/runtime/Makefile
  49. +220 −0 ghc/runtime/Makefile.libHSrts
  50. +19 −19 ghc/runtime/gmp/{Jmakefile → Makefile}
  51. 0  ghc/runtime/gmp/tests/Jmakefile
  52. +0 −19 ghc/utils/Jmakefile
  53. +20 −0 ghc/utils/Makefile
  54. +0 −21 ghc/utils/heap-view/Jmakefile
  55. +56 −0 ghc/utils/heap-view/Makefile
  56. +0 −50 ghc/utils/hp2ps/Jmakefile
  57. +28 −0 ghc/utils/hp2ps/Makefile
  58. +0 −30 ghc/utils/hscpp/Jmakefile
  59. +12 −0 ghc/utils/hscpp/Makefile
  60. +0 −20 ghc/utils/hstags/Jmakefile
  61. +0 −16 ghc/utils/mkdependHS/Jmakefile
  62. +9 −0 ghc/utils/mkdependHS/Makefile
  63. +2 −2 ghc/utils/mkdependHS/mkdependHS.prl
  64. +0 −97 ghc/utils/parallel/Jmakefile
  65. +64 −0 ghc/utils/parallel/Makefile
  66. +0 −26 ghc/utils/stat2resid/Jmakefile
  67. +19 −0 ghc/utils/stat2resid/Makefile
  68. +0 −26 ghc/utils/ugen/Jmakefile
  69. +18 −0 ghc/utils/ugen/Makefile
  70. +0 −514 ghc/utils/ugen/lex.c
  71. +53 −0 ghc/utils/ugen/lex.flex
  72. +2 −0  ghc/utils/ugen/main.c
  73. +0 −858 ghc/utils/ugen/syntax.tab.c
  74. +0 −13 ghc/utils/ugen/syntax.tab.h
  75. +6 −6 ghc/utils/ugen/syntax.y
  76. +2 −2 ghc/utils/ugen/tree.c
  77. +1 −0  ghc/utils/ugen/tree.ugn
  78. +8 −20 ghc/utils/ugen/yyerror.c
  79. +0 −10 ghc/utils/unlit/Jmakefile
  80. +8 −0 ghc/utils/unlit/Makefile
  81. +0 −4 glafp-utils/Jmakefile
  82. +15 −0 glafp-utils/Makefile
  83. +0 −58 glafp-utils/Makefile.BOOT
  84. +9 −0 glafp-utils/fastmake/Makefile
  85. 0  glafp-utils/{scripts → fastmake}/fastmake.prl
  86. +8 −0 glafp-utils/lndir/Makefile
  87. 0  glafp-utils/{scripts → lndir}/lndir-Xos.h
  88. 0  glafp-utils/{scripts → lndir}/lndir-Xosdefs.h
  89. 0  glafp-utils/{scripts → lndir}/lndir.c
  90. +9 −0 glafp-utils/ltx/Makefile
  91. 0  glafp-utils/{scripts → ltx}/ltx.prl
  92. +9 −0 glafp-utils/mkdependC/Makefile
  93. 0  glafp-utils/{scripts → mkdependC}/mkdependC.prl
  94. +9 −0 glafp-utils/mkdirhier/Makefile
  95. 0  glafp-utils/{scripts → mkdirhier}/mkdirhier.sh
  96. +0 −7 glafp-utils/msub/Jmakefile
  97. +12 −0 glafp-utils/msub/Makefile
  98. +9 −0 glafp-utils/runstdtest/Makefile
  99. 0  glafp-utils/{scripts → runstdtest}/runstdtest.prl
  100. +0 −50 glafp-utils/scripts/Jmakefile
  101. +42 −0 mk/Cprog.mk
  102. +38 −0 mk/HSprog.mk
  103. +14 −0 mk/cdepend.mk
  104. +34 −0 mk/clib.mk
  105. +37 −0 mk/gen.mk
  106. +14 −0 mk/hsdepend.mk
  107. +83 −0 mk/install.mk.in
  108. +39 −0 mk/lib.mk
  109. +22 −0 mk/platform.mk.in
  110. +313 −0 mk/rules.mk
  111. +53 −0 mk/script.mk
  112. +110 −0 mk/subdir.mk
  113. +402 −0 mk/utils.mk.in
View
23 Makefile
@@ -0,0 +1,23 @@
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.2 1996/11/21 16:45:54 simonm Exp $
+
+TOP = .
+SUBDIRS = glafp-utils ghc
+include $(TOP)/mk/gen.mk
+include $(TOP)/mk/subdir.mk
+
+line = @echo "------------------------------------------------------------------------------"
+
+boot ::
+ @echo "Bootstrapping $(PROJECTNAME)..."
+ $(line)
+ @echo "Booting glafp-utils"
+ $(line)
+ @$(MAKE) -C glafp-utils boot
+
+ $(line)
+ @echo "Booting ghc"
+ $(line)
+ @$(MAKE) -C ghc boot
+
+ @echo "Done!"
View
36 Makefile.in
@@ -1,36 +0,0 @@
-# @configure_input@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-CC = @CC@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-LIBS = @LIBS@
-
-CFLAGS = -O
-LDFLAGS = -O
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-binprefix =
-manprefix =
-
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
-mandir = $(prefix)/man/man1
-manext = 1
-
-SHELL = /bin/sh
-
-Makefile: Makefile.in config.status
- $(SHELL) config.status
-config.status: configure
- $(SHELL) config.status --recheck
-configure: configure.in
- cd $(srcdir) && autoconf < configure.in > configure.new
- grep -v '# Generated automatically from' < configure.new > configure
-
View
129 STARTUP.in
@@ -1,129 +0,0 @@
-#! /bin/sh
-#
-# die quickly if anything goes astray...
-set -e
-
-# figure out the absolute pathname of the "top" directory
-# (the one which has "mkworld", "nofib", "glafp-utils", etc., as subdirs)
-hardtop=`pwd`
-hardtop=`echo $hardtop | sed 's|^/tmp_mnt/|/|' | sed 's|^/export/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|'`
-echo ''
-echo "*** The top of your build tree is: $hardtop"
-
-case "$hardtop" in
- # NeXTStep brain damage
- /private/tmp_mnt/auto* )
- echo '***'
- echo '*** AAARRRGGGHHHH!!!'
- echo '***'
- echo '*** Stupid automounter (and pwd) will not tell me'
- echo '*** the absolute pathname for the current directory.'
- echo '*** Be sure to set TopDirPwd in mkworld/site-DEF.jm.'
- echo '*** (Then it does not matter what this script decides.)'
- echo '***'
- ;;
-esac
-
-# make "mkworld", "literate", and "glafp-utils" (no special configuration)
-
-# make all the Makefiles first
-
-for i in @DoingMkWorld@ @DoingGlaFpUtils@ @DoingLiterate@ ; do
- if [ -d $i ] ; then
- ( set -e; \
- cd $i ; \
- echo '' ; \
- echo "*** configuring $i ..." ; \
- @MakeCmd@ -f Makefile.BOOT BOOT_DEFINES="-P none -S std -DTopDirPwd=$hardtop"; \
- echo '' ; \
- echo "*** making Makefiles in $i ..." ; \
- @MakeCmd@ Makefile ; \
- @MakeCmd@ Makefiles \
- )
- else
- echo warning: $i is not a directory -- doing nothing for it
- fi
-done
-
-# now make the dependencies and Real Stuff
-
-for i in @DoingMkWorld@ @DoingGlaFpUtils@ @DoingLiterate@ ; do
- if [ -d $i ] ; then
- ( set -e; \
- cd $i ; \
- echo '' ; \
- echo "*** making dependencies in $i ..." ; \
- @MakeCmd@ depend ; \
- echo '' ; \
- echo "*** making all in $i ..." ; \
- @MakeCmd@ all \
- )
- else
- echo warning: $i is not a directory -- doing nothing for it
- fi
-done
-
-# OK, now make the \`real' Makefiles
-
-passed_in_setup="-S @MkWorldSetup@"
-
-for i in @DoingGHC@ @DoingHsLibs@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ EndOfList ; do
- if [ $i = nofib ] ; then
- setup=$passed_in_setup
- else
- setup=''
- fi
- if [ -d $i ] ; then
- ( set -e; \
- cd $i ; \
- echo '' ; \
- echo "*** configuring $i ..." ; \
- @MakeCmd@ -f Makefile.BOOT BOOT_DEFINES="-P $i $setup -C mkworld -DTopDirPwd=$hardtop"; \
- echo '' ; \
- echo "*** making Makefiles in $i ..." ; \
- @MakeCmd@ Makefile ; \
- @MakeCmd@ Makefiles \
- )
- else
- if [ $i != EndOfList ] ; then
- echo warning: $i is not a directory -- doing nothing for it
- fi
- fi
-done
-
-# Finally, the dependencies
-
-for i in @DoingGHC@ @DoingHsLibs@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ EndOfList ; do
- if [ -d $i ] ; then
- ( set -e; \
- cd $i ; \
- echo '' ; \
- echo "*** making dependencies in $i ..." ; \
- @MakeCmd@ depend \
- )
- else
- if [ $i != EndOfList ] ; then
- echo warning: $i is not a directory -- doing nothing for it
- fi
- fi
-done
-
-echo ''
-echo '*******************************************************************'
-echo "* Looking good! All you should need to do now is... *"
-echo '* *'
-for i in @DoingGHC@ @DoingHsLibs@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ EndOfList ; do
- if [ $i != EndOfList ] ; then
- echo " cd $i"
- if [ $i = nofib ] ; then
- echo ' make all # or...'
- echo ' make runtests'
- else
- echo ' make all'
- echo ' make install # if you are so inclined...'
- fi
- fi
-done
-echo '* *'
-echo '*******************************************************************'
-exit 0
View
233 configure.in
@@ -12,88 +12,60 @@ dnl * INITIAL SETUP, CHOICE OF PLATFORM(S)
# Do "./configure --help" to see what flags are available.
# (Better yet, read the documentation!)
#
+AC_INIT(mk/platform.mk)
+
# -------------------------------------------------------------------------
-AC_INIT(STARTUP.in)
-#
# Prepare to generate the following header files
#
-AC_CONFIG_HEADER(ghc/includes/config.h)
-# and literate/config.h ???
-# ToDo !!!!!!!!!!!!!!!!
-#
+AC_CONFIG_HEADER(ghc/includes/config.h literate/lit-deatify/config.h)
+
# No, we don't do `--srcdir'...
if test x"$srcdir" != 'x.' ; then
echo "This configuration does not support the \`--srcdir' option."
exit 1
fi
+hardtop=`pwd`
+hardtop=`echo $hardtop | sed 's|^/tmp_mnt/|/|' | sed 's|^/export/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|'`
+echo ''
+echo "*** The top of your build tree is: $hardtop"
+AC_SUBST(hardtop)
+
# -------------------------------------------------------------------------
dnl ** choose what blobs to build (ghc,hslibs,haggis,happy,nofib,????)
# set to the name for the dir if doing it, otherwise empty
-DoingGHC='ghc'
DoingHsLibs=''
DoingNoFib=''
DoingHappy=''
DoingHaggis=''
-DoingLiterate=''
-# the following are not normally changed
-DoingMkWorld='mkworld'
-DoingGlaFpUtils='glafp-utils'
-
MkWorldSetup='std'
-AC_ARG_ENABLE(ghc,
+AC_ARG_ENABLE(hslibs,
[
**********************************************************************
* Configuration options for the Glasgow functional-programming tools *
**********************************************************************
-First, select *which* of the tools you want to build,
-with --{enable,disable}-{ghc,hslibs,nofib,happy,haggis}.
-(The default is: only GHC (Glasgow Haskell compiler).)
+First, select *which* of the tools you want to build, with
+--{enable,disable}-{hslibs,nofib,happy,haggis}. (Currently, you have to
+build ghc.)
-Second, you may set one of a few applies-in-all-cases options.
-For example, --with-tmpdir=/usr/tmp.
+Second, you may set one of a few applies-in-all-cases options. For
+example, --with-tmpdir=/usr/tmp.
-Then you may set various options which are specifically for the
-tools you choose in step 1. For GHC, perhaps --enable-concurrent.
-For NoFib, perhaps --enable-all-tests. And so on.
+Then you may set various options which are specifically for the tools you
+choose in step 1. For GHC, perhaps --enable-concurrent. For NoFib,
+perhaps --enable-all-tests. And so on.
-The rest of this message lists all of the configure options. If the
-option is enabled by default, the message says how to disable it. And
-vice versa.
+The rest of this message lists all of the configure options. If the option
+is enabled by default, the message says how to disable it. And vice versa.
-If you are confused, don't forget the installation documents that came
-with the software!
+If you are confused, don't forget the installation documents that came with
+the software!
*******************************************************************
-** FOR SELECTING WHICH GLASGOW FP TOOLS TO BUILD:
-
---disable-ghc do *not* build GHC as part of Glasgow FP tools],
- [case "$enableval" in
- yes) DoingGHC='ghc'
- ;;
- no) DoingGHC=''
- ;;
- *) echo "I don't understand this option: --enable-ghc=$enableval"
- exit 1
- ;;
- esac])
-if test "xxx$DoingGHC" = 'xxxghc' -a \( ! -d ghc \) ; then
- DoingGHC=''
- echo 'Doing --disable-ghc, as there is no ghc directory'
-fi
-ghc_mkworld_site_ghc_jm='ghc/mkworld/site-ghc.jm'
-ghc_includes_platform_h='ghc/includes/platform.h'
-# duznae work: ghc_includes_config_h='ghc/includes/config.h'
-if test "xxx$DoingGHC" = 'xxx' ; then
- ghc_mkworld_site_ghc_jm=''
- ghc_includes_platform_h=''
-# ghc_includes_config_h=''
-fi
-
-AC_ARG_ENABLE(hslibs,
+** FOR SELECTING WHICH GLASGOW FP TOOLS TO BUILD:]
[--enable-hslibs build suite of Haskell libraries],
[case "$enableval" in
yes) DoingHsLibs='hslibs'
@@ -108,10 +80,6 @@ if test "xxx$DoingHsLibs" = 'xxxhslibs' -a \( ! -d hslibs \) ; then
DoingHsLibs=''
echo 'Doing --disable-hslibs, as there is no hslibs directory'
fi
-hslibs_mkworld_site_hslibs_jm='hslibs/mkworld/site-hslibs.jm'
-if test "xxx$DoingHsLibs" = 'xxx' ; then
- hslibs_mkworld_site_hslibs_jm=''
-fi
AC_ARG_ENABLE(nofib,
[--enable-nofib build NoFib suite as part of Glasgow FP tools],
@@ -128,10 +96,6 @@ if test "xxx$DoingNoFib" = 'xxxnofib' -a \( ! -d nofib \) ; then
DoingNoFib=''
echo 'Doing --disable-nofib, as there is no nofib directory'
fi
-nofib_mkworld_site_nofib_jm='nofib/mkworld/site-nofib.jm'
-if test "xxx$DoingNoFib" = 'xxx' ; then
- nofib_mkworld_site_nofib_jm=''
-fi
AC_ARG_ENABLE(happy,
[--enable-happy build Happy parser-generator as part of Glasgow FP tools],
@@ -165,64 +129,10 @@ if test "xxx$DoingHaggis" = 'xxxhaggis' -a \( ! -d haggis \) ; then
echo 'Doing --disable-haggis, as there is no haggis directory'
fi
-AC_ARG_ENABLE(literate,
- [
-The following three are \`for hackers only':
---disable-literate do *not* build literate-programming stuff],
- [case "$enableval" in
- yes) DoingLiterate='literate'
- ;;
- no) DoingLiterate=''
- ;;
- *) echo "I don't understand this option: --enable-literate=$enableval"
- exit 1
- ;;
- esac])
-if test "xxx$DoingLiterate" = 'xxxliterate' -a \( ! -d literate \) ; then
- DoingLiterate=''
- echo 'Doing --disable-literate, as there is no literate directory'
-fi
-
-AC_ARG_ENABLE(mkworld,
- [--disable-mkworld do *not* build \`mkworld' configuration stuff],
- [case "$enableval" in
- yes) DoingMkWorld='mkworld'
- ;;
- no) DoingMkWorld=''
- ;;
- *) echo "I don't understand this option: --enable-mkworld=$enableval"
- exit 1
- ;;
- esac])
-if test "xxx$DoingMkWorld" = 'xxxmkworld' -a \( ! -d mkworld \) ; then
- DoingMkWorld=''
- echo 'Doing --disable-mkworld, as there is no mkworld directory'
-fi
-
-AC_ARG_ENABLE(glafp-utils,
- [--disable-glafp-utils do *not* build \`glafp utilities'],
- [case "$enableval" in
- yes) DoingGlaFpUtils='glafp-utils'
- ;;
- no) DoingGlaFpUtils=''
- ;;
- *) echo "I don't understand this option: --enable-glafp-utils=$enableval"
- exit 1
- ;;
- esac])
-if test "xxx$DoingGlaFpUtils" = 'xxxglafp-utils' -a \( ! -d glafp-utils \) ; then
- DoingGlaFpUtils=''
- echo 'Doing --disable-glafp-utils, as there is no glafp-utils directory'
-fi
-
-AC_SUBST(DoingGHC)
AC_SUBST(DoingHsLibs)
AC_SUBST(DoingNoFib)
AC_SUBST(DoingHappy)
AC_SUBST(DoingHaggis)
-AC_SUBST(DoingLiterate)
-AC_SUBST(DoingMkWorld)
-AC_SUBST(DoingGlaFpUtils)
# -------------------------------------------------------------------------
dnl ** choose host(/target/build) platform
@@ -726,19 +636,22 @@ AC_ARG_WITH(tmpdir,
AC_SUBST(TmpDir)
dnl ** possibly set a max heap for Haskell compilations
-# let the user specify a maximum heap to be used; the old
-# "I have a 64MB machine, why not use a 32MB heap?" thing.
-HcMaxHeapWasSet='NO'
-HcMaxHeap='0'
+HcMaxHeapFlag=''
AC_ARG_WITH(max-heap,
[
--with-max-heap=<heap size, e.g., 32m>
- Do all Haskell compilations with a heap of this size. (If
- you've got it, flaunt it.)],
- [HcMaxHeapWasSet='YES'
- HcMaxHeap="$withval"])
-AC_SUBST(HcMaxHeapWasSet)
-AC_SUBST(HcMaxHeap)
+ Do all Haskell compilations with a heap of this size.],
+ [HcMaxHeapFlag="-H$withval"])
+AC_SUBST(HcMaxHeapFlag)
+
+dnl ** possibly set a max stack for Haskell compilations
+HcMaxStackFlag=''
+AC_ARG_WITH(max-stack,
+ [
+--with-max-stack=<stack size, e.g., 4m>
+ Do all Haskell compilations with a stack of this size.],
+ [HcMaxStackFlag="-K$withval"])
+AC_SUBST(HcMaxStackFlag)
dnl ** figure out about mkdependHS
MkDependHSCmd='mkdependHS'
@@ -1273,14 +1186,8 @@ dnl as some seds (notably OSF) only allow 99 commands (!!!).
dnl We will do the equivalent by a HACK further down.
# -------------------------------------------------------------------------
-dnl
-dnl * `GHC' CONFIGURATION STUFF
+dnl GHC CONFIGURATION STUFF
-if test "xxx$DoingGHC" = 'xxxghc' ; then
-# a very big "if"!
-#
-#---------------------------------------------------------------
-#
dnl ** which Haskell compiler to bootstrap GHC with?
# Figure out what Haskell compiler(s) to use for booting
#
@@ -1517,23 +1424,14 @@ AC_SUBST(GhcWithSockets)
# Here, by HACK means, we dump all the Build_ info
# into a file. See comment above.
-rm -f ghc/mkworld/buildinfo.jm
-echo creating ghc/mkworld/buildinfo.jm
-cat > ghc/mkworld/buildinfo.jm <<EOF
-XCOMM ** DO NOT EDIT! **
-XCOMM This file is obliterated every time 'configure' is run!
-
-EOF
+rm -f ghc/mk/buildinfo.mk
+echo creating ghc/mk/buildinfo.mk
+touch ghc/mk/buildinfo.mk
for xx in normal p t u mc mr mt mp mg 2s 1s du a b c d e f g h i j k l m n o A B ; do
eval "yy=\$Build_$xx"
- echo "#ifndef Build_$xx" >> ghc/mkworld/buildinfo.jm
- echo "#define Build_$xx $yy" >> ghc/mkworld/buildinfo.jm
- echo "#endif" >> ghc/mkworld/buildinfo.jm
+ echo "Build_$xx = $yy" >> ghc/mk/buildinfo.mk
done
-# here ends a very big if DoingGHC = 'ghc' ...
-fi
-
# -------------------------------------------------------------------------
dnl
dnl * `HsLibs' CONFIGURATION STUFF
@@ -1593,20 +1491,19 @@ AC_SUBST(WithHsLibsHcType)
# Here, by HACK means, we dump all the Build_ info
# into a file. See comment above.
-rm -f hslibs/mkworld/buildinfo.jm
-echo creating hslibs/mkworld/buildinfo.jm
-cat > hslibs/mkworld/buildinfo.jm <<EOF
-XCOMM ** DO NOT EDIT! **
-XCOMM This file is obliterated every time 'configure' is run!
+rm -f hslibs/mk/buildinfo.mk
+echo creating hslibs/mk/buildinfo.mk
+cat > hslibs/mk/buildinfo.mk <<EOF
+# ** DO NOT EDIT! **
+# This file is obliterated every time 'configure' is run!
EOF
for xx in normal p t u mc mr mt mp mg 2s 1s du a b c d e f g h i j k l m n o A B ; do
eval "yy=\$Build_$xx"
- echo "#ifndef Build_$xx" >> hslibs/mkworld/buildinfo.jm
- echo "#define Build_$xx $yy" >> hslibs/mkworld/buildinfo.jm
- echo "#endif" >> hslibs/mkworld/buildinfo.jm
+ echo "Build_$xx = $yy" >> hslibs/mk/buildinfo.mk
done
+
# here ends a very big if DoingHsLibs = 'hslibs' ...
fi
#
@@ -1757,16 +1654,6 @@ fi
#
# -------------------------------------------------------------------------
dnl
-dnl * `Literate' CONFIGURATION STUFF
-
-dnl if test "xxx$DoingLiterate" = 'xxxliterate' ; then
-dnl # a very big "if"!
-dnl
-dnl # here ends a very big if DoingLiterate = 'literate' ...
-dnl fi
-#
-# -------------------------------------------------------------------------
-dnl
dnl * `NoFib' CONFIGURATION STUFF
if test "xxx$DoingNoFib" = 'xxxnofib' ; then
@@ -2009,28 +1896,24 @@ dnl AC_SUBST(IncludeParallelNoFibTests)
# Here, by HACK means, we dump all the Include*NoFibTests info
# into a file. See comment above.
-rm -f nofib/mkworld/buildinfo.jm
-echo creating nofib/mkworld/buildinfo.jm
+rm -f nofib/mk/buildinfo.mk
+echo creating nofib/mk/buildinfo.mk
cat > nofib/mkworld/buildinfo.jm <<EOF
-XCOMM ** DO NOT EDIT! **
-XCOMM This file is obliterated every time 'configure' is run!
+# ** DO NOT EDIT! **
+# This file is obliterated every time 'configure' is run!
EOF
for xx in Real Spectral Imaginary GHC_ONLY Specialise PRIVATE Parallel ; do
eval "yy=\$Include${xx}NoFibTests"
- echo "#ifndef Include${xx}NoFibTests" >> nofib/mkworld/buildinfo.jm
- echo "#define Include${xx}NoFibTests $yy" >> nofib/mkworld/buildinfo.jm
- echo "#endif" >> nofib/mkworld/buildinfo.jm
+ echo "Include${xx}NoFibTests = $yy" >> nofib/mk/buildinfo.mk
done
# Here, by HACK means, we add all the Build_ info
# into a file. See comment above.
-
+
for xx in normal p t u mc mr mt mp mg 2s 1s du a b c d e f g h i j k l m n o A B ; do
eval "yy=\$Build_$xx"
- echo "#ifndef Build_$xx" >> nofib/mkworld/buildinfo.jm
- echo "#define Build_$xx $yy" >> nofib/mkworld/buildinfo.jm
- echo "#endif" >> nofib/mkworld/buildinfo.jm
+ echo "Build_$xx = $yy" >> nofib/mk/buildinfo.mk
done
# here ends a very big if DoingNoFib = 'nofib' ...
@@ -2042,9 +1925,9 @@ dnl * extract non-header files with substitution (end)
#
AC_SUBST(MkWorldSetup)
-AC_OUTPUT(Makefile STARTUP mkworld/site.jm mkworld/platform.h mkworld/config.h $ghc_mkworld_site_ghc_jm $ghc_includes_platform_h $hslibs_mkworld_site_hslibs_jm $nofib_mkworld_site_nofib_jm)
+AC_OUTPUT(mk/platform.mk mk/utils.mk mk/install.mk ghc/mk/ghcconfig.mk ghc/includes/platform.h)
echo '************************************************'
-echo '*** NOW DO: sh < STARTUP'
+echo '*** NOW DO: make boot; make all'
echo '************************************************'
exit 0
View
38 ghc/Jmakefile
@@ -1,38 +0,0 @@
-#define IHaveSubdirs
-
-/* order in SUBDIRS is not supposed to be important but ...
- "compiler" must be before "lib", because we use
- the compiler just built to compile pieces of "lib".
-
- "includes" also needs to be v early, to ensure that
- GhcConstants.h is made before needed.
-
- if we're building from .hc files, we do the libraries
- first, then the compiler; otherwise the other way around
-
-*/
-#if HaskellCompilerType == HC_USE_HC_FILES
-#define __compiler_and_lib lib compiler
-#else
-#define __compiler_and_lib compiler lib
-#endif
-
-SUBDIRS = includes \
- utils \
- driver \
- runtime \
- docs \
- __compiler_and_lib
-
-/*OUT: parsers */
-
-#undef __compiler_and_lib
-
-/* "CONTRIB" is also a SUBDIR, but there is nothing to build there.
- */
-
-/* the standard "whoami" target will give the basic info. */
-/* this target adds to it. */
-whoami::
- @echo using a \`$(BUILDPLATFORM)\' host to build a Haskell compiler to run on a
- @echo \`$(HOSTPLATFORM)\' host that will generate \`C\' target code
View
79 ghc/Makefile
@@ -0,0 +1,79 @@
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.2 1996/11/21 16:46:26 simonm Exp $
+
+TOP=..
+include $(TOP)/ghc/mk/ghc.mk
+
+line = @echo "------------------------------------------------------------------------------"
+
+define BuildLibs
+$(line)
+@echo "Building Libraries"
+$(line)
+@$(MAKE) -C lib depend all
+endef
+
+define BuildCompiler
+$(line)
+@echo "Building Compiler"
+$(line)
+@$(MAKE) -C compiler depend all
+endef
+
+# dependencies:
+# everything needs utils
+# includes needs driver (for mkNativeGen.c)
+# make depend except in {utils,driver} needs includes
+# RTS and compiler need includes
+
+boot ::
+ $(line)
+ @echo "Building Utils"
+ $(line)
+ @$(MAKE) -C utils depend all
+
+ $(line)
+ @echo "Building Driver"
+ $(line)
+ @$(MAKE) -C driver all
+
+ $(line)
+ @echo "Building Includes"
+ $(line)
+ @$(MAKE) -C includes all
+
+ $(line)
+ @echo "Building Runtime System"
+ $(line)
+ @$(MAKE) -C runtime depend all
+
+ $(line)
+ @echo "Building Docs"
+ $(line)
+ @$(MAKE) -C docs depend all
+
+ifeq ($(HaskellCompilerType), HC_USE_HC_FILES)
+ $(BuildLibs)
+ $(BuildCompiler)
+else
+ $(BuildCompiler)
+ $(BuildLibs)
+endif
+
+# "CONTRIB" is also a SUBDIR, but there is nothing to build there.
+SUBDIRS = utils driver includes runtime docs compiler lib
+
+# Make the required directories for install.
+
+install_dirs ::
+ $(MKDIRHIER) $(INSTBINDIR_GHC)
+ $(MKDIRHIER) $(INSTSCRIPTDIR_GHC)
+ $(MKDIRHIER) $(INSTLIBDIR_GHC)
+ $(MKDIRHIER) $(INSTLIBDIR_GHC)/includes
+ $(MKDIRHIER) $(INSTDATADIR_GHC)
+ $(MKDIRHIER) $(INSTDATADIR_GHC)/includes
+ $(MKDIRHIER) $(INSTDATADIR_GHC)/imports
+
+install :: install_dirs
+
+include $(TOP)/mk/subdir.mk
View
59 ghc/Makefile.BOOT
@@ -1,59 +0,0 @@
-# hand-hacked Makefile to boot the "make world" process
-#---------------------------------------------------------------------
-
-# Platform-specific configuration stuff was read from: sun.cf
-
-SHELL = /bin/sh
-PATHSEP = /
-
-#******** NB: TOP setting
-TOP = ..
-CURRENT_DIR = ./ghc
-
-RM=rm -f
-MV=mv -f
-BOOTSTRAPCFLAGS =
-
-# Project identification -- name, version, and stuff
-
-PROJECTNAME = Booting the Make World System
-PROJECTVERSION = none
-PROJECTLABEL = generic
-SETUPLABEL = std
-
-PROJECTCONFIGDIR =
-
-###########################################################################
-# Configuration stuff (jmake, its friends and templates)
-
-JMKMF = jmkmf_used_only_with_installed_utils
-JRESTOREDEPS = $(JMAKESRC)/jrestoredeps
-JMAKE = $(JMAKESRC)/jmake
-JMAKE_DEFINES =
-
-JMAKESRC = $(TOP)/mkworld
-
-JMAKE_CMD = $(NEWTOP)$(JMAKE) -I$(NEWTOP)$(JMAKESRC) $(BOOTSTRAPCFLAGS) -DTopDir=$(TOP) -DCurDir=$(CURRENT_DIR) $(BOOT_DEFINES)
-
-###########################################################################
-
-Makefile:: $(JMAKE)
-
-$(JMAKE):
- @(cd $(JMAKESRC) && if [ -f Makefile ]; then \
- echo "checking $@ in $(JMAKESRC) first..."; $(MAKE) all; else \
- echo "bootstrapping $@ from Makefile.BOOT in $(JMAKESRC) first..."; \
- $(MAKE) -f Makefile.BOOT BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \
- echo "okay, continuing in $(CURRENT_DIR)")
-
-Makefile::
- -@if [ -f Makefile ]; then \
- echo " $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
- $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
- else exit 0; fi
- $(JMAKE_CMD)
- $(JRESTOREDEPS)
- @if cmp -s Makefile Makefile.bak; then $(RM) Makefile.bak ; else exit 0 ; fi
- @chmod 444 Makefile
- @echo ==== The new Makefile is for\: ====
- @$(MAKE) whoami
View
920 ghc/compiler/Jmakefile
@@ -1,920 +0,0 @@
-/* preliminaries */
-
-/* (only subdir is the test suite) */
-
-#if IncludeTestDirsInBuild == YES
-# define IHaveSubdirs
-
-# define __ghc_compiler_tests_dir tests
-#else
-# define __ghc_compiler_tests_dir /* nothing */
-#endif
-SUBDIRS = __ghc_compiler_tests_dir
-#undef __ghc_compiler_tests_dir
-
-#define NoAllTargetForSubdirs
-#define NoDocsTargetForSubdirs
-#define NoInstallDocsTargetForSubdirs
-#define NoDependTargetForSubdirs
-#define NoInstallTargetForSubdirs
-#define NoTagTargetForSubdirs
-
-/* Suffix rules: we do not use them much at all in GHC.
- We need some magic stuff (from suffixes-GEN.ljm) for
- the parser files.
-*/
-SuffixRules_flexish()
-SuffixRule_c_o()
-
-.SUFFIXES: .lhi
-.lhi.hi:
- $(RM) $@
- $(GHC_UNLIT) $< $@
- @chmod 444 $@
-
-/* assume ALL source is in subdirectories one level below
- they don't have Jmakefiles; this Jmakefile controls everything
-*/
-
-SUBDIR_LIST = \ /* here they are, colon separated (for mkdependHS) */
-utils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:nativeGen:absCSyn:main:reader:profiling:deforest:parser
-
-#ifdef MainIncludeDir
-MAIN_INCLUDE_DIR=MainIncludeDir
-#else
-MAIN_INCLUDE_DIR=$(TOP_PWD)/$(CURRENT_DIR)/$(GHC_INCLUDES)
-#endif
-
-/* helps to find GhcConstants.h in codeGen/CgCompInfo.lhs */
-#ifdef CompInfoDir
-COMPINFO_DIR=CompInfoDir
-#else
-COMPINFO_DIR=$(TOP_PWD)/$(CURRENT_DIR)/codeGen
-#endif
-/* nativeGen, elsewhere */
-#ifdef NativeGenDir
-NATIVEGEN_DIR=NativeGenDir
-#else
-NATIVEGEN_DIR=$(TOP_PWD)/$(CURRENT_DIR)/nativeGen
-#endif
-
-/* in order-of-passes order, utility modules at the end */
-
-#define READERSRCS_HS \
-parser/U_constr.hs \
-parser/U_binding.hs \
-parser/U_pbinding.hs \
-parser/U_entidt.hs \
-parser/U_list.hs \
-parser/U_literal.hs \
-parser/U_maybe.hs \
-parser/U_either.hs \
-parser/U_qid.hs \
-parser/U_tree.hs \
-parser/U_ttype.hs
-
-#define hsp_library libhsp.a
-
-#define READERSRCS_LHS \
-parser/UgenUtil.lhs \
-parser/UgenAll.lhs \
-reader/ReadPrefix.lhs \
-\
-reader/PrefixSyn.lhs \
-reader/PrefixToHs.lhs \
-reader/RdrHsSyn.lhs \
-\
-hsSyn/HsBinds.lhs /* abstract Haskell syntax */ \
-hsSyn/HsCore.lhs \
-hsSyn/HsDecls.lhs \
-hsSyn/HsExpr.lhs \
-hsSyn/HsImpExp.lhs \
-hsSyn/HsLit.lhs \
-hsSyn/HsMatches.lhs \
-hsSyn/HsPat.lhs \
-hsSyn/HsPragmas.lhs \
-hsSyn/HsTypes.lhs \
-hsSyn/HsSyn.lhs
-
-#define NOT_SO_BASICSRCS_LHS \
-basicTypes/FieldLabel.lhs \
-basicTypes/Id.lhs \
-basicTypes/IdInfo.lhs \
-basicTypes/IdUtils.lhs \
-basicTypes/Literal.lhs \
-basicTypes/Name.lhs \
-basicTypes/PprEnv.lhs \
-basicTypes/PragmaInfo.lhs \
-basicTypes/SrcLoc.lhs \
-basicTypes/UniqSupply.lhs \
-basicTypes/Unique.lhs \
-\
-types/Class.lhs \
-types/Kind.lhs \
-types/PprType.lhs \
-types/TyCon.lhs \
-types/TyVar.lhs \
-types/Usage.lhs \
-types/Type.lhs \
-\
-specialise/SpecEnv.lhs
-
-#define RENAMERSRCS_HS \
-rename/ParseIface.hs
-
-#define RENAMERSRCS_LHS \
-rename/ParseUtils.lhs \
-rename/RnHsSyn.lhs \
-rename/RnMonad.lhs \
-rename/Rename.lhs \
-rename/RnNames.lhs \
-rename/RnSource.lhs \
-rename/RnBinds.lhs \
-rename/RnExpr.lhs \
-rename/RnIfaces.lhs \
-rename/RnUtils.lhs
-
-#define TCSRCS_LHS \
-typecheck/TcHsSyn.lhs \
-typecheck/GenSpecEtc.lhs \
-typecheck/Inst.lhs \
-typecheck/TcBinds.lhs \
-typecheck/TcClassDcl.lhs \
-typecheck/TcDefaults.lhs \
-typecheck/TcDeriv.lhs \
-typecheck/TcExpr.lhs \
-typecheck/TcGenDeriv.lhs \
-typecheck/TcGRHSs.lhs \
-typecheck/TcIfaceSig.lhs \
-typecheck/TcInstDcls.lhs \
-typecheck/TcInstUtil.lhs \
-typecheck/TcMatches.lhs \
-typecheck/TcModule.lhs \
-typecheck/TcMonad.lhs \
-typecheck/TcEnv.lhs \
-typecheck/TcKind.lhs \
-typecheck/TcType.lhs \
-typecheck/TcMonoType.lhs \
-typecheck/TcPat.lhs \
-typecheck/TcSimplify.lhs \
-typecheck/TcTyClsDecls.lhs \
-typecheck/TcTyDecls.lhs \
-typecheck/Unify.lhs
-
-/*
-typecheck/TcPragmas.lhs \
-*/
-
-#define DSSRCS_LHS \
-deSugar/Desugar.lhs \
-deSugar/Match.lhs \
-deSugar/MatchCon.lhs \
-deSugar/MatchLit.lhs \
-deSugar/DsBinds.lhs \
-deSugar/DsCCall.lhs \
-deSugar/DsExpr.lhs \
-deSugar/DsGRHSs.lhs \
-deSugar/DsHsSyn.lhs \
-deSugar/DsListComp.lhs \
-deSugar/DsMonad.lhs \
-deSugar/DsUtils.lhs \
-\
-coreSyn/CoreLift.lhs \
-coreSyn/CoreLint.lhs
-
-#if GhcWithDeforester != YES
-#define __omit_deforester_flag -DOMIT_DEFORESTER=1
-#define DEFORESTER_SRCS_LHS /*none*/
-#else
-#define __omit_deforester_flag /*nope*/
-#define DEFORESTER_SRCS_LHS \
-deforest/DefSyn.lhs \
-deforest/Core2Def.lhs \
-deforest/Def2Core.lhs \
-deforest/Deforest.lhs \
-deforest/DefUtils.lhs \
-deforest/DefExpr.lhs \
-deforest/Cyclic.lhs \
-deforest/TreelessForm.lhs
-#endif /* GhcWithDeforester */
-
-#define SIMPL_SRCS_LHS \
-coreSyn/AnnCoreSyn.lhs \
-coreSyn/FreeVars.lhs \
-\
-specialise/Specialise.lhs \
-specialise/SpecUtils.lhs \
-\
-simplCore/SimplCase.lhs \
-simplCore/SimplEnv.lhs \
-simplCore/SimplMonad.lhs \
-simplCore/SimplPgm.lhs \
-simplCore/SimplUtils.lhs \
-simplCore/SimplVar.lhs \
-simplCore/Simplify.lhs \
-\
-simplCore/LiberateCase.lhs \
-\
-simplCore/ConFold.lhs \
-simplCore/FloatIn.lhs \
-simplCore/FloatOut.lhs \
-simplCore/SAT.lhs \
-simplCore/SATMonad.lhs \
-simplCore/SetLevels.lhs \
-simplCore/SimplCore.lhs \
-simplCore/OccurAnal.lhs \
-simplCore/FoldrBuildWW.lhs \
-simplCore/AnalFBWW.lhs \
-\
-stranal/StrictAnal.lhs \
-stranal/SaLib.lhs \
-stranal/SaAbsInt.lhs \
-stranal/WwLib.lhs \
-stranal/WorkWrap.lhs DEFORESTER_SRCS_LHS
-
-#define STG_SRCS_LHS \
-stgSyn/CoreToStg.lhs \
-stgSyn/StgSyn.lhs \
-stgSyn/StgUtils.lhs \
-stgSyn/StgLint.lhs \
-profiling/SCCfinal.lhs \
-\
-simplStg/SatStgRhs.lhs \
-simplStg/LambdaLift.lhs \
-simplStg/StgVarInfo.lhs \
-simplStg/UpdAnal.lhs \
-simplStg/StgStats.lhs \
-simplStg/StgSATMonad.lhs \
-simplStg/StgSAT.lhs \
-simplStg/SimplStg.lhs
-
-#define BACKSRCS_LHS \
-absCSyn/AbsCUtils.lhs \
-absCSyn/AbsCSyn.lhs \
-absCSyn/CLabel.lhs \
-absCSyn/Costs.lhs \
-absCSyn/HeapOffs.lhs \
-absCSyn/PprAbsC.lhs \
-\
-codeGen/CodeGen.lhs \
-codeGen/ClosureInfo.lhs \
-codeGen/SMRep.lhs \
-codeGen/CgConTbls.lhs \
-codeGen/CgMonad.lhs \
-codeGen/CgUsages.lhs \
-codeGen/CgHeapery.lhs \
-codeGen/CgStackery.lhs \
-codeGen/CgExpr.lhs \
-codeGen/CgCase.lhs \
-codeGen/CgLetNoEscape.lhs \
-codeGen/CgTailCall.lhs \
-codeGen/CgClosure.lhs \
-codeGen/CgCon.lhs \
-codeGen/CgRetConv.lhs \
-codeGen/CgBindery.lhs \
-codeGen/CgUpdate.lhs
-
-#if GhcWithNativeCodeGen == NO || GhcWithHscBuiltViaC == YES
- /* if building via C, we *assume* that it is the
- distributed C files, which do not have a native-code
- generator in them
- */
-# define __omit_ncg_maybe -DOMIT_NATIVE_CODEGEN=1
-# define NATIVEGEN_SRCS_LHS /*none*/
-#else
-# define __omit_ncg_maybe /*none*/
-
-# define NATIVEGEN_SRCS_LHS \
-nativeGen/AbsCStixGen.lhs \
-nativeGen/AsmCodeGen.lhs \
-nativeGen/AsmRegAlloc.lhs \
-nativeGen/MachCode.lhs \
-nativeGen/MachMisc.lhs \
-nativeGen/MachRegs.lhs \
-nativeGen/PprMach.lhs \
-nativeGen/RegAllocInfo.lhs \
-nativeGen/Stix.lhs \
-nativeGen/StixInfo.lhs \
-nativeGen/StixInteger.lhs \
-nativeGen/StixPrim.lhs \
-nativeGen/StixMacro.lhs
-#endif
-
-#define UTILSRCS_LHS \
-utils/Argv.lhs \
-utils/Bag.lhs \
-utils/BitSet.lhs \
-utils/CharSeq.lhs \
-utils/Digraph.lhs \
-utils/FiniteMap.lhs \
-utils/ListSetOps.lhs \
-utils/MatchEnv.lhs \
-utils/Maybes.lhs \
-utils/OrdList.lhs \
-utils/Outputable.lhs \
-utils/PprStyle.lhs \
-utils/Pretty.lhs \
-utils/SST.lhs \
-utils/UniqFM.lhs \
-utils/UniqSet.lhs \
-utils/Unpretty.lhs \
-utils/Util.lhs
-
-#define MAIN_SRCS_LHS \
-main/CmdLineOpts.lhs \
-main/ErrUtils.lhs \
-main/MkIface.lhs \
-main/Main.lhs
-
-#define VBASICSRCS_LHS \
-prelude/PrelMods.lhs \
-prelude/PrimRep.lhs \
-prelude/PrimOp.lhs \
-prelude/TysPrim.lhs \
-prelude/TysWiredIn.lhs \
-prelude/PrelVals.lhs \
-prelude/PrelInfo.lhs \
-\
-absCSyn/CStrings.lhs \
-codeGen/CgCompInfo.lhs \
-coreSyn/CoreSyn.lhs \
-coreSyn/CoreUnfold.lhs \
-coreSyn/CoreUtils.lhs \
-coreSyn/PprCore.lhs \
-profiling/CostCentre.lhs \
-simplCore/BinderInfo.lhs \
-simplCore/MagicUFs.lhs
-
-ALLSRCS_HS = READERSRCS_HS RENAMERSRCS_HS
-ALLSRCS_LHS = /* all pieces of the compiler */ \
-VBASICSRCS_LHS \
-NOT_SO_BASICSRCS_LHS \
-UTILSRCS_LHS \
-MAIN_SRCS_LHS \
-READERSRCS_LHS \
-RENAMERSRCS_LHS \
-TCSRCS_LHS \
-DSSRCS_LHS \
-SIMPL_SRCS_LHS \
-STG_SRCS_LHS \
-BACKSRCS_LHS NATIVEGEN_SRCS_LHS
-
-#if GhcBuilderVersion >= 200
-# define loop_hi(f) CAT3(f,_1_3,.hi)
-#else
-# define loop_hi(f) CAT2(f,.hi)
-#endif
-
-DELOOP_HIs = \
-loop_hi(utils/Ubiq) \
-loop_hi(absCSyn/AbsCLoop) \
-loop_hi(basicTypes/IdLoop) \
-loop_hi(codeGen/CgLoop1) \
-loop_hi(codeGen/CgLoop2) \
-loop_hi(deSugar/DsLoop) \
-loop_hi(hsSyn/HsLoop) \
-loop_hi(nativeGen/NcgLoop) \
-loop_hi(prelude/PrelLoop) \
-loop_hi(rename/RnLoop) \
-loop_hi(simplCore/SmplLoop) \
-loop_hi(typecheck/TcMLoop) \
-loop_hi(typecheck/TcLoop) \
-loop_hi(types/TyLoop)
-
-/*
-\
-*/
-/* NB: all the ones that may be empty (e.g., NATIVEGEN_SRCS_LHS)
- need to be on the last line.
-*/
-
-/* should't use these fancy `make' things, really */
-ALLHCS =$(ALLSRCS_LHS:.lhs=.hc) $(ALLSRCS_HS:.hs=.hc)
-ALLOBJS=$(ALLSRCS_LHS:.lhs=.o) $(ALLSRCS_HS:.hs=.o)
-ALLINTS=$(ALLSRCS_LHS:.lhs=.hi) $(ALLSRCS_HS:.hs=.hi)
-
-.PRECIOUS: $(ALLINTS)
-
-#if GhcWithHscDebug == YES
-# define use_DDEBUG -DDEBUG
-#else
-# define use_DDEBUG /*nothing*/
-#endif
-
-#if GhcWithHscOptimised == YES
-# if GhcBuilderVersion >= 200
-# define __version_sensitive_flags -O -fshow-import-specs
-# else
-# define __version_sensitive_flags -O -fshow-import-specs -fomit-derived-read -fomit-reexported-instances
-# endif
-#else
-# if GhcBuilderVersion >= 200
-# define __version_sensitive_flags /*none*/
-# else
-# define __version_sensitive_flags -fomit-derived-read -fomit-reexported-instances
-# endif
-#endif
-
-/* avoid use of AllProjectsHcOpts; then put in HcMaxHeapFlag "by hand" */
-#undef AllProjectsHcOpts
-#define AllProjectsHcOpts /**/
-
-HC_OPTS = -cpp HcMaxHeapFlag -fhaskell-1.3 -fglasgow-exts -DCOMPILING_GHC \
- -Rghc-timing -I. -i$(SUBDIR_LIST) \
- use_DDEBUG __version_sensitive_flags __omit_ncg_maybe __omit_deforester_flag
-
-#undef __version_sensitive_flags
-#undef __omit_ncg_maybe
-#undef __omit_deforester_flag
-
-#if GhcWithHscBuiltViaC == YES /* not using a Haskell compiler */
-
-hcs:: $(ALLHCS)
-
-# if HaskellCompilerType == HC_USE_HC_FILES
-HC = $(GHC) /* uses the driver herein */
-# endif
-
-#endif /* using .hc files */
-
-/*
- -DCOMPILING_GHC
- Used when compiling GHC. Some GHC utility modules are
- *also* part of the GHC library. There are a few bits
- of those modules that only apply to GHC itself and
- should not be in the library stuff. We use this
- CPP thing to isolate those bits.
-*/
-
-BuildPgmFromHaskellModules(hsc,$(ALLOBJS) parser/hsclink.o parser/hschooks.o,,libhsp.a)
-
-parser/hschooks.o : parser/hschooks.c
- $(RM) $@
- $(HC) -c -o $@ $(HCFLAGS) parser/hschooks.c
-
-#if DoInstallGHCSystem == YES
-MakeDirectories(install, $(INSTLIBDIR_GHC))
-InstallBinaryTarget(hsc,$(INSTLIBDIR_GHC))
-#endif
-
-/* set up for going either to .hc or to .o files */
-#if GhcWithHscBuiltViaC == YES
-
-/*OLD:SuffixRule_hc_o() */
-
-# if HaskellCompilerType == HC_USE_HC_FILES
- /* if we do not, we never try to compile .lhs files;
- we *blast* the macro we would normally use (HACK) (WDP 94/12)
- */
-
-# undef HaskellCompileWithSpecifiedFlags
-# define HaskellCompileWithSpecifiedFlags(module,isuf,osuf,flags) @@\
-module.osuf : module.isuf \
-_body_HaskellCompileWithSpecifiedFlags(module.isuf,module.osuf,module,isuf,flags)
-
-# define compile(module,isuf,extra_flags) \
-HaskellCompileWithExtraFlags(module,hc,o,-c,extra_flags)
-
-# define compile_rec(module,isuf,extra_flags) \
-HaskellCompileWithExtraFlags_Recursive(module,hc,o,-c,extra_flags)
-
-# else /* we do! */
-
-# define compile(module,isuf,extra_flags) \
-HaskellCompileWithExtraFlags(module,isuf,hc,-C,extra_flags)
-
-# define compile_rec(module,isuf,extra_flags) \
-HaskellCompileWithExtraFlags_Recursive(module,isuf,hc,-C,extra_flags)
-
-# endif /* ... == HC_USE_HC_FILES */
-
-#else /* ! booting from C */
-
-# define compile(module,isuf,extra_flags) \
-HaskellCompileWithExtraFlags(module,isuf,o,-c,extra_flags)
-
-# define compile_rec(module,isuf,extra_flags) \
-HaskellCompileWithExtraFlags_Recursive(module,isuf,o,-c,extra_flags)
-
-#endif /* ! booting from C */
-
-#define if_ghc(x) x
-#if GhcBuilderVersion >= 26
-# define if_ghc26(x) x
-#else
-# define if_ghc26(x) /*nothing*/
-#endif
-
-/* OK, here we go: */
-
-rename/ParseIface.hs : rename/ParseIface.y
- $(RM) rename/ParseIface.hs rename/ParseIface.hinfo
- happy -g rename/ParseIface.y
- @chmod 444 rename/ParseIface.hs
-
-compile(absCSyn/AbsCUtils,lhs,)
-compile(absCSyn/CStrings,lhs,)
-compile(absCSyn/CLabel,lhs,)
-compile(absCSyn/Costs,lhs,)
-compile(absCSyn/HeapOffs,lhs,)
-compile(absCSyn/PprAbsC,lhs,)
-compile(absCSyn/AbsCSyn,lhs,if_ghc(-fno-omit-reexported-instances))
-
-compile(hsSyn/HsBinds,lhs,)
-compile(hsSyn/HsCore,lhs,)
-compile(hsSyn/HsDecls,lhs,)
-compile(hsSyn/HsExpr,lhs,if_ghc(-K2m))
-compile(hsSyn/HsImpExp,lhs,)
-compile(hsSyn/HsLit,lhs,)
-compile(hsSyn/HsMatches,lhs,)
-compile(hsSyn/HsPat,lhs,)
-compile(hsSyn/HsPragmas,lhs,)
-compile(hsSyn/HsTypes,lhs,)
-compile(hsSyn/HsSyn,lhs,if_ghc(-fno-omit-reexported-instances))
-
-compile(basicTypes/FieldLabel,lhs,)
-compile(basicTypes/Id,lhs,)
-compile(basicTypes/IdInfo,lhs,-K2m)
-compile(basicTypes/IdUtils,lhs,)
-compile(basicTypes/Literal,lhs,)
-compile(basicTypes/Name,lhs,)
-compile(basicTypes/PprEnv,lhs,)
-compile(basicTypes/PragmaInfo,lhs,)
-compile(basicTypes/SrcLoc,lhs,)
-compile(basicTypes/UniqSupply,lhs,)
-compile(basicTypes/Unique,lhs,)
-
-compile(codeGen/CgBindery,lhs,)
-compile(codeGen/CgCase,lhs,)
-compile(codeGen/CgClosure,lhs,)
-compile(codeGen/CgCompInfo,lhs,-I$(COMPINFO_DIR))
-compile(codeGen/CgCon,lhs,)
-compile(codeGen/CgConTbls,lhs,)
-compile(codeGen/CgExpr,lhs,)
-compile(codeGen/CgHeapery,lhs,)
-compile(codeGen/CgLetNoEscape,lhs,)
-compile(codeGen/CgMonad,lhs,)
-compile(codeGen/CgRetConv,lhs,)
-compile(codeGen/CgStackery,lhs,)
-compile(codeGen/CgTailCall,lhs,)
-compile(codeGen/CgUpdate,lhs,)
-compile(codeGen/CgUsages,lhs,)
-compile(codeGen/ClosureInfo,lhs,)
-compile(codeGen/CodeGen,lhs,)
-compile(codeGen/SMRep,lhs,)
-
-compile(coreSyn/AnnCoreSyn,lhs,if_ghc(-fno-omit-reexported-instances))
-compile(coreSyn/CoreUtils,lhs,)
-compile(coreSyn/CoreLift,lhs,)
-compile(coreSyn/CoreLint,lhs,)
-compile(coreSyn/CoreSyn,lhs,)
-compile(coreSyn/PprCore,lhs,)
-compile(coreSyn/CoreUnfold,lhs,)
-compile(coreSyn/FreeVars,lhs,)
-
-compile(deSugar/Desugar,lhs,)
-compile(deSugar/DsBinds,lhs,)
-compile(deSugar/DsCCall,lhs,)
-compile(deSugar/DsExpr,lhs,)
-compile(deSugar/DsGRHSs,lhs,)
-compile(deSugar/DsHsSyn,lhs,)
-compile(deSugar/DsListComp,lhs,)
-compile(deSugar/DsMonad,lhs,)
-compile(deSugar/DsUtils,lhs,)
-compile(deSugar/Match,lhs,)
-compile(deSugar/MatchCon,lhs,)
-compile(deSugar/MatchLit,lhs,)
-
-compile(main/CmdLineOpts,lhs,if_ghc(-fvia-C))
-compile(main/ErrUtils,lhs,)
-compile(main/Main,lhs,if_ghc(-fvia-C))
-compile(main/MkIface,lhs,)
-
-#if GhcWithNativeCodeGen == YES
-compile(nativeGen/AbsCStixGen,lhs,)
-compile(nativeGen/AsmCodeGen,lhs,-I$(COMPINFO_DIR))
-compile(nativeGen/AsmRegAlloc,lhs,-I$(COMPINFO_DIR))
-compile(nativeGen/MachCode,lhs,-I$(NATIVEGEN_DIR))
-compile(nativeGen/MachMisc,lhs,-I$(NATIVEGEN_DIR))
-compile(nativeGen/MachRegs,lhs,-I$(NATIVEGEN_DIR))
-compile(nativeGen/PprMach,lhs,-I$(NATIVEGEN_DIR) if_ghc(-K2m))
-compile(nativeGen/RegAllocInfo,lhs,-I$(NATIVEGEN_DIR))
-compile(nativeGen/Stix,lhs,)
-compile(nativeGen/StixInfo,lhs,)
-compile(nativeGen/StixInteger,lhs,)
-compile(nativeGen/StixMacro,lhs,)
-compile(nativeGen/StixPrim,lhs,)
-#endif
-
-compile(prelude/PrelInfo,lhs,)
-compile(prelude/PrelMods,lhs,)
-compile(prelude/PrelVals,lhs,)
-compile(prelude/PrimRep,lhs,-I$(COMPINFO_DIR))
-compile(prelude/PrimOp,lhs,-K3m -H10m)
-compile(prelude/TysPrim,lhs,)
-compile(prelude/TysWiredIn,lhs,)
-
-compile(profiling/SCCfinal,lhs,)
-compile(profiling/CostCentre,lhs,)
-
-compile(reader/PrefixSyn,lhs,)
-compile(reader/PrefixToHs,lhs,)
-compile(reader/ReadPrefix,lhs,if_ghc(-fvia-C -I$(COMPINFO_DIR) -Iparser '-#include"hspincl.h"'))
-compile(reader/RdrHsSyn,lhs,)
-
-compile(rename/ParseIface,hs,-Onot) /* sigh */
-compile(rename/ParseUtils,lhs,)
-compile(rename/RnHsSyn,lhs,)
-compile(rename/RnMonad,lhs,if_ghc(-fvia-C))
-compile(rename/Rename,lhs,)
-compile(rename/RnNames,lhs,)
-compile(rename/RnSource,lhs,-H12m)
-compile(rename/RnBinds,lhs,)
-compile(rename/RnExpr,lhs,)
-compile(rename/RnIfaces,lhs,)
-compile(rename/RnUtils,lhs,)
-
-compile(simplCore/BinderInfo,lhs,)
-compile(simplCore/ConFold,lhs,)
-compile(simplCore/FloatIn,lhs,)
-compile(simplCore/FloatOut,lhs,)
-compile(simplCore/LiberateCase,lhs,)
-compile(simplCore/MagicUFs,lhs,)
-compile(simplCore/OccurAnal,lhs,)
-
-compile(simplCore/AnalFBWW,lhs,)
-compile(simplCore/FoldrBuildWW,lhs,)
-
-compile(simplCore/SAT,lhs,)
-compile(simplCore/SATMonad,lhs,)
-compile(simplCore/SetLevels,lhs,)
-compile(simplCore/SimplCase,lhs,)
-compile(simplCore/SimplCore,lhs,)
-compile(simplCore/SimplEnv,lhs,)
-compile(simplCore/SimplMonad,lhs,)
-compile(simplCore/SimplPgm,lhs,)
-compile(simplCore/SimplUtils,lhs,)
-compile(simplCore/SimplVar,lhs,)
-compile(simplCore/Simplify,lhs,)
-
-compile(simplStg/SatStgRhs,lhs,)
-compile(simplStg/LambdaLift,lhs,)
-compile(simplStg/StgVarInfo,lhs,)
-compile(simplStg/UpdAnal,lhs,)
-compile(simplStg/StgStats,lhs,)
-compile(simplStg/StgSATMonad,lhs,)
-compile(simplStg/StgSAT,lhs,)
-compile(simplStg/SimplStg,lhs,)
-
-#if GhcWithDeforester == YES
-compile(deforest/Core2Def,lhs,)
-compile(deforest/Cyclic,lhs,)
-compile(deforest/Def2Core,lhs,)
-compile(deforest/DefExpr,lhs,)
-compile(deforest/DefSyn,lhs,)
-compile(deforest/DefUtils,lhs,)
-compile(deforest/Deforest,lhs,)
-compile(deforest/TreelessForm,lhs,)
-#endif
-
-compile(specialise/Specialise,lhs,-H12m if_ghc(-Onot)) /* -Onot for compile-space reasons */
-compile(specialise/SpecEnv,lhs,)
-compile(specialise/SpecUtils,lhs,)
-
-compile(stgSyn/CoreToStg,lhs,)
-compile(stgSyn/StgUtils,lhs,)
-compile(stgSyn/StgLint,lhs,)
-compile(stgSyn/StgSyn,lhs,if_ghc(-fno-omit-reexported-instances))
-
-compile(stranal/SaAbsInt,lhs,)
-compile(stranal/SaLib,lhs,)
-compile(stranal/StrictAnal,lhs,)
-compile(stranal/WorkWrap,lhs,)
-compile(stranal/WwLib,lhs,)
-
-compile(typecheck/GenSpecEtc,lhs,)
-compile(typecheck/Inst,lhs,)
-compile(typecheck/TcHsSyn,lhs,)
-compile(typecheck/TcBinds,lhs,)
-compile(typecheck/TcClassDcl,lhs,)
-compile(typecheck/TcDefaults,lhs,)
-compile(typecheck/TcDeriv,lhs,)
-compile(typecheck/TcExpr,lhs,)
-compile(typecheck/TcGRHSs,lhs,)
-compile(typecheck/TcGenDeriv,lhs,)
-compile(typecheck/TcIfaceSig,lhs,)
-compile(typecheck/TcInstDcls,lhs,)
-compile(typecheck/TcInstUtil,lhs,)
-compile(typecheck/TcMatches,lhs,)
-compile(typecheck/TcModule,lhs,)
-compile(typecheck/TcMonad,lhs,if_ghc(-fvia-C))
-compile(typecheck/TcKind,lhs,)
-compile(typecheck/TcType,lhs,)
-compile(typecheck/TcEnv,lhs,)
-compile(typecheck/TcMonoType,lhs,)
-compile(typecheck/TcPat,lhs,)
-/*compile(typecheck/TcPragmas,lhs,)*/
-compile(typecheck/TcSimplify,lhs,)
-compile(typecheck/TcTyClsDecls,lhs,)
-compile(typecheck/TcTyDecls,lhs,)
-compile(typecheck/Unify,lhs,)
-
-compile(types/Class,lhs,)
-compile(types/Kind,lhs,)
-compile(types/PprType,lhs,if_ghc26(-Onot)) /* avoid a 0.26 bug */
-compile(types/TyCon,lhs,)
-compile(types/TyVar,lhs,)
-compile(types/Usage,lhs,)
-compile(types/Type,lhs,)
-
-compile(utils/Argv,lhs,if_ghc(-fvia-C))
-compile(utils/Bag,lhs,)
-compile(utils/BitSet,lhs,if_ghc26(-monly-4-regs))
-compile(utils/CharSeq,lhs,if_ghc(-fvia-C)) /* uses stg_putc */
-compile(utils/Digraph,lhs,)
-compile(utils/FiniteMap,lhs,)
-compile(utils/ListSetOps,lhs,)
-compile(utils/Maybes,lhs,)
-compile(utils/OrdList,lhs,)
-compile(utils/Outputable,lhs,)
-compile(utils/PprStyle,lhs,)
-compile(utils/Pretty,lhs,)
-compile(utils/SST,lhs,if_ghc(-fvia-C))
-compile(utils/UniqFM,lhs,)
-compile(utils/UniqSet,lhs,)
-compile(utils/Unpretty,lhs,)
-compile(utils/MatchEnv,lhs,)
-compile(utils/Util,lhs,)
-
-/* for convenience in cross-compiling */
-objs:: $(ALLOBJS)
-
-/* *** parser ************************************************* */
-
-YACC_OPTS = -d
-CC_OPTS = -Iparser -I. -I$(COMPINFO_DIR) /*-DUGEN_DEBUG=1*/ /*-DHSP_DEBUG=1*/
-
-/* add to these on the command line with, e.g., EXTRA_YACC_OPTS=-v */
-
-CPP_DEFINES = $(D_DEBUG)
-
-HSP_SRCS_C = parser/constr.c \
- parser/binding.c \
- parser/pbinding.c \
- parser/entidt.c \
- parser/hslexer.c \
- parser/hsparser.tab.c \
- parser/id.c \
- parser/infix.c \
- parser/list.c \
- parser/literal.c \
- parser/maybe.c \
- parser/either.c \
- parser/qid.c \
- parser/syntax.c \
- parser/tree.c \
- parser/ttype.c \
- parser/type2context.c \
- parser/util.c
-
-HSP_OBJS_O = parser/constr.o \
- parser/binding.o \
- parser/pbinding.o \
- parser/entidt.o \
- parser/hslexer.o \
- parser/hsparser.tab.o \
- parser/id.o \
- parser/infix.o \
- parser/list.o \
- parser/literal.o \
- parser/maybe.o \
- parser/either.o \
- parser/qid.o \
- parser/syntax.o \
- parser/tree.o \
- parser/ttype.o \
- parser/type2context.o \
- parser/util.o
-
-/* this is for etags */
-REAL_HSP_SRCS_C = parser/main.c \
- parser/hschooks.c \
- parser/hsclink.c \
- parser/id.c \
- parser/util.c \
- parser/syntax.c \
- parser/type2context.c \
- parser/infix.c \
- parser/printtree.c
-
-UgenNeededHere(all depend)
-
-/* Most hsp files are in libhsp.a, so we can either make
- a standalone parser, or incorporate the files into
- the hsc compiler directly (WDP 94/10)
-*/
-NormalLibraryTarget(hsp,$(HSP_OBJS_O))
-
-/* We need the hsp program for hstags to work! */
-/* BuildPgmFromCFiles(hsp,parser/printtree.o parser/main.o,,libhsp.a) */
-
-#if DoInstallGHCSystem == YES
-/* MakeDirectories(install, $(INSTLIBDIR_GHC)) */
-/* InstallBinaryTarget(hsp,$(INSTLIBDIR_GHC)) */
-#endif /* DoInstall... */
-
-YaccRunWithExpectMsg(parser/hsparser,12,0)
-
-parser/hslexer.o : parser/hslexer.c parser/hsparser.tab.h
- $(RM) $@
- $(CC) $(CFLAGS) -c $<
- @if [ \( $(@D) != '.' \) -a \( $(@D) != './' \) ] ; then echo mv $(@F) $@ ; mv $(@F) $@ ; else exit 0 ; fi
-
-UgenTarget(parser,constr)
-UgenTarget(parser,binding)
-UgenTarget(parser,pbinding)
-UgenTarget(parser,entidt)
-UgenTarget(parser,list)
-UgenTarget(parser,literal)
-UgenTarget(parser,maybe)
-UgenTarget(parser,either)
-UgenTarget(parser,qid)
-UgenTarget(parser,tree)
-UgenTarget(parser,ttype)
-
-UGENS_C = parser/constr.c \
- parser/binding.c \
- parser/pbinding.c \
- parser/entidt.c \
- parser/literal.c \
- parser/list.c \
- parser/maybe.c \
- parser/either.c \
- parser/qid.c \
- parser/tree.c \
- parser/ttype.c
-
-/* Putting the -#include"hspincl.h" option into the
- PARSER_HS_OPTS line really does not work (it depends
- on the 'make' that you use).
-*/
-PARSER_HS_OPTS = if_ghc(-fvia-C -I$(COMPINFO_DIR) -Iparser)
-
-compile(parser/UgenAll,lhs,if_ghc(-fvia-C))
-compile(parser/UgenUtil,lhs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_constr,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_binding,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_pbinding,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_entidt,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_list,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_literal,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_maybe,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_either,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_qid,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_tree,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_ttype,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-
-/* finished with local macros */
-#undef compile
-#undef compile_rec
-#undef if_ghc
-
-/* *** misc *************************************************** */
-
-DEPSRCS = $(ALLSRCS_LHS) $(ALLSRCS_HS)
-
-#if GhcBuilderVersion < 200
-/* this will go away soon enough... (once 1.3 is settled in) */
-MKDEPENDHS = mkdependHS-1.2
-#endif
-
-#if GhcWithHscBuiltViaC == NO
-MKDEPENDHS_OPTS= -I$(MAIN_INCLUDE_DIR) -I$(COMPINFO_DIR) -x HsVersions.h
-#else /* booting from .hc */
-MKDEPENDHS_OPTS= -o .hc -I$(MAIN_INCLUDE_DIR) -I$(COMPINFO_DIR) -x HsVersions.h
-#endif /* booting from .hc files */
-
-#if HaskellCompilerType != HC_USE_HC_FILES
- /* otherwise, the dependencies jeopardize our .hc files --
- which are all we have! */
-depend :: $(DELOOP_HIs)
-HaskellDependTarget( $(DEPSRCS) )
-#endif
-
-ExtraStuffToClean( $(ALLOBJS) $(HSP_OBJS_O) )
-#if GhcWithHscBuiltViaC == YES
-ExtraStuffToClean( $(ALLHCS) )
-#endif
-ExtraStuffToBeVeryClean( $(STD_VERY_CLEAN) )
-
-ClearTagsFile()
-HsTagsTarget( $(ALLSRCS_LHS) )
-HSTAGS_OPTS = $(HC_OPTS) -I$(MAIN_INCLUDE_DIR)
-
-/* count the number of lines in the source files */
-count_lines ::
- ./count_lines $(ALLSRCS_LHS) $(ALLSRCS_HS)
-
-/* accumulate similar info about the sizes of object files */
-count_bytes ::
- ./count_bytes $(ALLSRCS_LHS) $(ALLSRCS_HS)
View
223 ghc/compiler/Makefile
@@ -0,0 +1,223 @@
+# -----------------------------------------------------------------------------
+# $Id: Makefile,v 1.2 1996/11/21 16:46:32 simonm Exp $
+
+TOP = ../..
+FlexSuffixRules = YES
+YaccSuffixRules = YES
+SuffixRule_WantStdOnes = NO
+include $(TOP)/ghc/mk/ghc.mk
+
+# Problem: don't know whether GhcWithHscBuiltViaC until now, so we have
+# to re-include rules.mk to get the correct suffix rules.
+
+FlexSuffixRules =
+YaccSuffixRules =
+ifeq ($(GhcWithHscBuiltViaC),YES)
+ HC = $(GHC)
+ SuffixRule_hc_o = YES
+else
+ HaskellSuffixRules = YES
+endif
+include $(TOP)/mk/rules.mk
+
+#-----------------------------------------------------------------------------
+# make libhsp.a
+
+YFLAGS = -d
+CFLAGS = -Iparser -I. -IcodeGen
+ARCHIVE = libhsp.a
+DESTDIR = $(INSTLIBDIR_GHC)
+UGN = $(wildcard parser/*.ugn)
+UGNC = $(patsubst %.ugn, %.c, $(UGN))
+UGNH = $(patsubst %.ugn, %.h, $(UGN))
+UGNHS = $(patsubst parser/%.ugn, parser/U_%.hs, $(UGN))
+LIBOBJS = \
+ $(patsubst %.c, %.o, $(UGNC)) parser/hslexer.o parser/hsparser.tab.o \
+ parser/id.o parser/infix.o parser/syntax.o parser/type2context.o \
+ parser/util.o
+
+parser/%.h parser/%.c parser/U_%.hs : parser/%.ugn
+ @$(RM) $@ parser/$*.hs parser/U_$*.hs parser/$*.h
+ $(UGEN) $< || $(RM) parser/$*.h parser/$*.hs
+ @$(MV) -f parser/$*.hs parser/U_$*.hs
+ @chmod 444 parser/$*.h parser/U_$*.hs
+
+parser/%.o : parser/%.c $(UGNH)
+ @$(RM) $@
+ $(CC) $(CFLAGS) -c $< -o $@
+
+clean ::
+ $(RM) parser/hslexer.c parser/hsparser.tab.h parser/hsparser.tab.c
+
+parser/hslexer.o : parser/hslexer.c parser/hsparser.tab.h
+
+include $(TOP)/mk/lib.mk
+
+#-----------------------------------------------------------------------------
+
+ifeq ($(IncludeTestDirsInBuild),YES)
+ SUBDIRS = tests
+endif
+
+ifeq ($(Ghc2_0),YES)
+ %.hi : %_1_3.lhi
+ $(RM) $@
+ $(GHC_UNLIT) $< $@ || ( $(RM) $@ && exit 1 )
+ @chmod 444 $@
+else
+ %.hi : %.lhi
+ $(RM) $@
+ $(GHC_UNLIT) $< $@ || ( $(RM) $@ && exit 1 )
+ @chmod 444 $@
+endif
+
+DIRS = \
+ utils basicTypes types hsSyn prelude rename typecheck deSugar coreSyn \
+ specialise simplCore stranal stgSyn simplStg codeGen absCSyn main \
+ reader profiling parser
+
+# -----------------------------------------------------------------------------
+# optional directories
+
+ifeq ($(GhcWithDeforester),YES)
+ DIRS += deforest
+endif
+
+ifeq ($(GhcWithNativeCodeGen),YES)
+ DIRS += nativeGen
+else
+ ifeq ($(GhcWithHscBuiltViaC),YES)
+ # If building via C, we *assume* that it is the distributed C files,
+ # which do not have a native-code generator in them
+ else
+ DIRS += nativeGen
+ endif
+endif
+
+# -----------------------------------------------------------------------------
+# wildcard to get the lists of sources/objects
+
+INCLUDEDIRS = $(foreach dir,$(DIRS),-i$(dir))
+SRCS = \
+ $(foreach dir,$(DIRS),$(wildcard $(dir)/*.lhs)) \
+ $(UGNHS) rename/ParseIface.hs
+LOOPS = $(patsubst %.lhi, %.hi, $(wildcard */*.lhi))
+HCS = $(patsubst %.hs, %.hc, $(patsubst %.lhs, %.hc, $(SRCS)))
+OBJS = \
+ $(patsubst %.hc, %.o, $(HCS)) rename/ParseIface.o \
+ parser/hsclink.o parser/hschooks.o libhsp.a
+
+# -----------------------------------------------------------------------------
+# options for the Haskell compiler
+
+MAKEFLAGS += --no-builtin-rules
+
+HC_OPTS += \
+ -cpp $(HcMaxHeapFlag) $(HcMaxStackFlag) -fhaskell-1.3 \
+ -fglasgow-exts -DCOMPILING_GHC -Rghc-timing -I. -IcodeGen \
+ -InativeGen -Iparser $(INCLUDEDIRS)
+
+# expect 12 shift/reduce conflicts and 0 reduce/reduce conflicts
+
+ifeq ($(GhcWithHscDebug),YES)
+ HC_OPTS += -DDEBUG
+ CFLAGS += -DDEBUG
+endif
+
+ifneq ($(Ghc2_0),YES)
+ HC_OPTS += -fomit-derived-read -fomit-reexported-instances
+endif
+
+ifeq ($(GhcWithHscOptimised),YES)
+ HC_OPTS += -O -fshow-import-specs
+endif
+
+ifeq ($(GhcWithDeforester),NO)
+ HC_OPTS += -DOMIT_DEFORESTER
+endif
+
+# ----------------------------------------------------------------------------
+
+all :: hsc libhsp.a
+
+hsc : $(OBJS)
+ $(HC) $(HC_OPTS) -o $@ $^
+
+parser/hschooks.o : parser/hschooks.c
+ @$(RM) $@
+ $(HC) -c -o $@ $(HCFLAGS) parser/hschooks.c
+
+rename/ParseIface.hs : rename/ParseIface.y
+ @$(RM) rename/ParseIface.hs rename/ParseIface.hinfo
+ happy -g rename/ParseIface.y
+ @chmod 444 rename/ParseIface.hs
+
+# ----------------------------------------------------------------------------
+# Special flags for particular modules
+
+absCSyn/AbsCSyn_flags = -fno-omit-reexported-instances
+hsSyn/HsExpr_flags = -K2m
+hsSyn/HsSyn_flags = -fno-omit-reexported-instances
+main/Main_flags = -fvia-C
+basicTypes/IdInfo_flags = -K2m
+main/CmdLineOpts_flags = -fvia-C
+coreSyn/AnnCoreSyn_flags = -fno-omit-reexported-instances
+nativeGen/PprMach_flags = -K2m
+parser/UgenAll_flags = -fvia-C '-\#include"hspincl.h"'
+parser/UgenUtil_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_constr_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_binding_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_pbinding_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_entidt_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_list_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_literal_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_maybe_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_either_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_qid_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_tree_flags = -fvia-C '-\#include"hspincl.h"'
+parser/U_ttype_flags = -fvia-C '-\#include"hspincl.h"'
+prelude/PrimOp_flags = -K3m
+reader/ReadPrefix_flags = -fvia-C '-\#include"hspincl.h"'
+rename/ParseIface_flags = -Onot -H16m
+rename/RnMonad_flags = -fvia-C
+rename/RnSource_flags = -H12m
+rename/RnIfaces_flags = -H8m
+rename/RnNames_flags = -H12m
+specialise/Specialise_flags = -Onot -H12m
+stgSyn/StgSyn_flags = -fno-omit-reexported-instances
+typecheck/TcMonad_flags = -fvia-C
+typecheck/TcGenDeriv_flags = -H10m
+typecheck/TcExpr_flags = -H10m
+utils/Argv_flags = -fvia-C
+utils/CharSeq_flags = -fvia-C
+utils/SST_flags = -fvia-C
+
+#-----------------------------------------------------------------------------
+# make depend, clean, tags and install
+
+MKDEPENDHSFLAGS = -f .depend -I../includes -x HsVersions.h
+ifeq ($(GhcWithDeforester),NO)
+ MKDEPENDHSFLAGS += -DOMIT_DEFORESTER
+endif
+
+ifeq ($(GhcWithHscBuiltViaC),YES)
+ MKDEPENDHSFLAGS += -o .hc
+else
+ HS_DEP_SRCS = $(SRCS) # should add $(LOOPS) ?
+ include $(TOP)/mk/hsdepend.mk
+endif
+
+clean ::
+ $(RM) */*.o */*.hi $(UGNC) $(UGNH) $(UGNHS)
+ $(RM) rename/ParseIface.hs
+
+veryclean ::
+ $(RM) */*.hc
+
+tags ::
+ @$(RM) TAGS
+ @touch TAGS
+ $(HSTAGS) -I../includes $(HSTAGSFLAGS) $(SRCS)
+
+install ::
+ $(INSTALL) $(INSTBINFLAGS) hsc $(INSTLIBDIR_GHC)
View
2  ghc/compiler/simplCore/SimplCore.lhs
@@ -66,7 +66,7 @@ import Unique ( Unique{-instance Eq-} )
import UniqSupply ( splitUniqSupply )
import Util ( panic{-ToDo:rm-} )
-#if ! OMIT_DEFORESTER
+#ifndef OMIT_DEFORESTER
import Deforest ( deforestProgram )
import DefUtils ( deforestable )
#endif
View
13 ghc/docs/Jmakefile
@@ -1,13 +0,0 @@
-#define IHaveSubdirs
-
-/* just documents here */
-#define NoAllTargetForSubdirs
-#define NoDependTargetForSubdirs
-#define NoRunTestsTargetForSubdirs
-#define NoInstallTargetForSubdirs
-#define NoTagTargetForSubdirs
-
-SUBDIRS = users_guide \
- install_guide \
- release_notes \
- state_interface
View
6 ghc/docs/Makefile
@@ -0,0 +1,6 @@
+TOP = ../..
+include $(TOP)/ghc/mk/ghc.mk
+
+SUBDIRS = users_guide install_guide release_notes state_interface
+
+include $(TOP)/mk/subdir.mk
View
3  ghc/docs/install_guide/Jmakefile
@@ -1,3 +0,0 @@
-DocProcessingSuffixRules()
-
-LitDocRootTarget(installing,lit)
View
5 ghc/docs/install_guide/Makefile
@@ -0,0 +1,5 @@
+TOP = ../../..
+LiterateSuffixRules = YES
+DocProcessingSuffixRules = YES
+include $(TOP)/ghc/mk/ghc.mk
+#TARGETS = installing.texi installing.dvi
View
10 ghc/docs/release_notes/Jmakefile
@@ -1,10 +0,0 @@
-/* there are rules to make this piece of "the book"
- * as a standalone document,
- * but nothing to "install" it
- */
-
-LiterateSuffixRules()
-DocProcessingSuffixRules()
-
-/* no space between the two args! */
-LitDocRootTarget(release,lit)
View
6 ghc/docs/release_notes/Makefile
@@ -0,0 +1,6 @@
+TOP = ../../..
+LiterateSuffixRules = YES
+include $(TOP)/ghc/mk/ghc.mk
+
+#DocProcessingSuffixRules()
+#LitDocRootTarget(release,lit)
View
8 ghc/docs/state_interface/Jmakefile → ghc/docs/state_interface/Makefile
@@ -1,7 +1,9 @@
+TOP = ../../..
+include $(TOP)/ghc/mk/ghc.mk
+
state-interface.dvi : state-interface.tex
- $(RM) state-interface.dvi
- latex state-interface.tex
+ $(LATEX) state-interface.tex
state-interface.tex : state-interface.verb
- $(RM) state-interface.tex
+ @$(RM) state-interface.tex
expand state-interface.verb | verbatim > state-interface.tex
View
6 ghc/docs/users_guide/Jmakefile
@@ -1,6 +0,0 @@
-LiterateSuffixRules()
-DocProcessingSuffixRules()
-
-/* no space between the args! */
-/*LitDocRootTarget(profiling,lit)*/
-LitDocRootTarget(user,lit)
View
7 ghc/docs/users_guide/Makefile
@@ -0,0 +1,7 @@
+TOP = ../../..
+LiterateSuffixRules = YES
+include $(TOP)/ghc/mk/ghc.mk
+
+#DocProcessingSuffixRules()
+#LitDocRootTarget(profiling,lit)
+#LitDocRootTarget(user,lit)
View
44 ghc/driver/Jmakefile
@@ -1,44 +0,0 @@
-/* stuff to have before we get going */
-MsubNeededHere(ghc)
-UnlitNeededHere(depend)
-
-DYN_LOADABLE_BITS = \
- ghc-asm.prl \
- ghc-recomp.prl \
- ghc-iface.prl \
- ghc-consist.prl \
- ghc-split.prl
-
-/* Literate-pgmming suffix rules used herein */
-UnlitSuffixRule(.lprl,.prl)
-
-MsubMakefileDependentProgramScriptTarget(PerlCmd,ghc,ghc.prl,/*no flags*/,/*Makefile*/)
-AllTarget( $(DYN_LOADABLE_BITS) )
-
-/* installation is hackish: because we may want to install w/ a diff name */
-#if DoInstallGHCSystem == YES
-MakeDirectories(install, $(INSTBINDIR_GHC) $(INSTLIBDIR_GHC))
-
-InstallMsubbedScriptTarget(PerlCmd,ghc-v-temp-name,ghc.prl,$(INSTBINDIR_GHC))
-/* and continuing ... */
-install::
- $(MV) $(INSTBINDIR_GHC)/ghc-v-temp-name $(INSTBINDIR_GHC)/$(GHC_DRIVER_INST_NAME)
- $(RM) $(INSTBINDIR_GHC)/ghc-v-temp-name
-
-dyn_loadable_bits : $(DYN_LOADABLE_BITS)
-
-InstallMultNonExecTargets(dyn_loadable_bits, $(DYN_LOADABLE_BITS), $(INSTLIBDIR_GHC))
-
-install :: install_dyn_loadable_bits
-
-#endif /* DoInstallGHCSystem */
-
-depend::
- @echo make depend done in $(CURRENT_DIR)
-
-ExtraStuffToClean( ghc.prl $(DYN_LOADABLE_BITS) )
-
-ClearTagsFile()
-
-DYN_LOADABLE_LPRLS = $(DYN_LOADABLE_BITS:.prl=.lprl)
-PerlTagsTarget( ghc.lprl $(DYN_LOADABLE_LPRLS) )
View
34 ghc/driver/Makefile
@@ -0,0 +1,34 @@
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.2 1996/11/21 16:47:27 simonm Exp $
+
+TOP=../..
+CURRENT_DIR=ghc/driver
+UnlitSuffixRules = YES
+include $(TOP)/ghc/mk/ghc.mk
+
+DYN_LOADABLE_BITS = \
+ ghc-asm.prl \
+ ghc-recomp.prl \
+ ghc-iface.prl \
+ ghc-consist.prl \
+ ghc-split.prl
+
+PROG = ghc
+SRC = ghc.prl
+INTERP = $(PERL)
+DESTDIR = $(INSTBINDIR_GHC)
+INSTALLED_NAME = $(GHC_DRIVER_INST_NAME)
+
+all :: $(DYN_LOADABLE_BITS)
+
+install :: $(DYN_LOADABLE_BITS)
+ $(INSTALL) $(INSTDATAFLAGS) $(DYN_LOADABLE_BITS) $(INSTLIBDIR_GHC)
+
+clean::
+ $(RM) ghc.prl
+ $(RM) $(DYN_LOADABLE_BITS)
+
+# DYN_LOADABLE_LPRLS = $(DYN_LOADABLE_BITS:.prl=.lprl)
+# PerlTagsTarget( ghc.lprl $(DYN_LOADABLE_LPRLS) )
+
+include $(TOP)/mk/script.mk
View
8 ghc/driver/ghc-iface.lprl
@@ -271,7 +271,7 @@ sub calcNewModuleVersion {
sub mv_change {
local($mv, $str) = @_;
- print STDERR "$Pgm: module version changed to $mv; reason: $str\n";
+#print STDERR "$Pgm: module version changed to $mv; reason: $str\n";
return($mv);
}
@@ -287,13 +287,13 @@ sub printNewItemVersion {
local($idecl) = $Decl{"new:$item"};
if (! defined($Decl{"old:$item"})) {
- print STDERR "new: $item\n";
+#print STDERR "new: $item\n";
print NEWHI "$item $mod_version\n";
} elsif ($idecl ne $Decl{"old:$item"}) {
- print STDERR "changed: $item\n";
+#print STDERR "changed: $item\n";
print NEWHI "$item $mod_version\n";
} elsif (! defined($Version{"old:$item"}) ) {
- print STDERR "$item: no old version?!\n"
+#print STDERR "$item: no old version?!\n"
} else {
print NEWHI "$item ", $Version{"old:$item"}, "\n";
}
View
64 ghc/driver/ghc.lprl
@@ -222,7 +222,7 @@ $Oopt_FoldrBuildInline = ''; # was '-fdo-inline-foldr-build';
Things to do with C compilers/etc:
\begin{code}
-$CcRegd = 'gcc';
+$CcRegd = '$(GHC_OPT_HILEV_ASM)';
@CcBoth_flags = ('-S'); # flags for *any* C compilation
@CcInjects = ();
@@ -248,35 +248,35 @@ Prelude ({\em including} its interface file(s)).
\begin{code}
$BuildTag = ''; # default is sequential build w/ Appel-style GC
-%BuildAvail = ('', '$(GHC_BUILD_FLAG_normal)',
- '_p', '$(GHC_BUILD_FLAG_p)',
- '_t', '$(GHC_BUILD_FLAG_t)',
- '_u', '$(GHC_BUILD_FLAG_u)',
- '_mc', '$(GHC_BUILD_FLAG_mc)',
- '_mr', '$(GHC_BUILD_FLAG_mr)',
- '_mt', '$(GHC_BUILD_FLAG_mt)',
- '_mp', '$(GHC_BUILD_FLAG_mp)',
- '_mg', '$(GHC_BUILD_FLAG_mg)',
- '_2s', '$(GHC_BUILD_FLAG_2s)',
- '_1s', '$(GHC_BUILD_FLAG_1s)',
- '_du', '$(GHC_BUILD_FLAG_du)',
- '_a', '$(GHC_BUILD_FLAG_a)',
- '_b', '$(GHC_BUILD_FLAG_b)',
- '_c', '$(GHC_BUILD_FLAG_c)',
- '_d', '$(GHC_BUILD_FLAG_d)',
- '_e', '$(GHC_BUILD_FLAG_e)',
- '_f', '$(GHC_BUILD_FLAG_f)',
- '_g', '$(GHC_BUILD_FLAG_g)',
- '_h', '$(GHC_BUILD_FLAG_h)',
- '_i', '$(GHC_BUILD_FLAG_i)',
- '_j', '$(GHC_BUILD_FLAG_j)',
- '_k', '$(GHC_BUILD_FLAG_k)',
- '_l', '$(GHC_BUILD_FLAG_l)',
- '_m', '$(GHC_BUILD_FLAG_m)',
- '_n', '$(GHC_BUILD_FLAG_n)',
- '_o', '$(GHC_BUILD_FLAG_o)',
- '_A', '$(GHC_BUILD_FLAG_A)',
- '_B', '$(GHC_BUILD_FLAG_B)' );
+%BuildAvail = ('', '$(Build_normal)',
+ '_p', '$(Build_p)',
+ '_t', '$(Build_t)',
+ '_u', '$(Build_u)',
+ '_mc', '$(Build_mc)',
+ '_mr', '$(Build_mr)',
+ '_mt', '$(Build_mt)',
+ '_mp', '$(Build_mp)',
+ '_mg', '$(Build_mg)',
+ '_2s', '$(Build_2s)',
+ '_1s', '$(Build_1s)',
+ '_du', '$(Build_du)',
+ '_a', '$(Build_a)',
+ '_b', '$(Build_b)',
+ '_c', '$(Build_c)',
+ '_d', '$(Build_d)',
+ '_e', '$(Build_e)',
+ '_f', '$(Build_f)',
+ '_g', '$(Build_g)',
+ '_h', '$(Build_h)',
+ '_i', '$(Build_i)',
+ '_j', '$(Build_j)',
+ '_k', '$(Build_k)',
+ '_l', '$(Build_l)',
+ '_m', '$(Build_m)',
+ '_n', '$(Build_n)',
+ '_o', '$(Build_o)',
+ '_A', '$(Build_A)',
+ '_B', '$(Build_B)' );
%BuildDescr = ('', 'normal sequential',
'_p', 'profiling',
@@ -450,7 +450,7 @@ $Only_preprocess_C = 0; # pretty hackish
$PostprocessCcOutput = 0;
# native code-gen or via C?
-$HaveNativeCodeGen = $(GHC_WITH_NATIVE_CODEGEN);
+$HaveNativeCodeGen = $(GhcWithNativeCodeGen);
$HscOut = '-C='; # '-C=' ==> .hc output; '-S=' ==> .s output; '-N=' ==> neither
$HscOut = '-S='
if $HaveNativeCodeGen && $TargetPlatform =~ /^(alpha|sparc)-/; #ToDo: add |i386 !
@@ -1780,7 +1780,7 @@ Before continuing we check that the appropriate build is available.
\begin{code}
die "$Pgm: no BuildAvail?? $BuildTag\n" if ! $BuildAvail{$BuildTag}; # sanity
-if ( $BuildAvail{$BuildTag} =~ /^-build-.*-not-defined$/ ) {
+if ( $BuildAvail{$BuildTag} =~ /^NO$/ ) {
print STDERR "$Pgm: a `", $BuildDescr{$BuildTag},
"' \"build\" is not available with your GHC setup.\n";
print STDERR "(It was not configured for it at your site.)\n";
View
105 ghc/includes/Jmakefile
@@ -1,105 +0,0 @@
-LH_FILES = \
-RtsTypes.lh /* runtime system */ \
-RtsFlags.lh \
-\
-SMinterface.lh /* storage-management related */ \
-SMClosures.lh \
-SMInfoTables.lh \
-SMupdate.lh \
-SMcopying.lh \
-SMcompact.lh \
-SMmark.lh \
-\
-StgMacros.lh \
-StgTypes.lh \
-MachRegs.lh \
-StgRegs.lh \
-COptJumps.lh \
-COptRegs.lh \
-COptWraps.lh \
-\
-GhcConstants.lh \
-\
-Ticky.lh /* "ticky-ticky" profiling */ \
-\
-Info.lh /* Info pointer definitions */ \
-\
-CostCentre.lh /* for cost centre profiling */ \
-\
-GranSim.lh \
-Parallel.lh /* for PAR build */ \
-Threads.lh /* for threads, parallel or not */
-
-H_FILES_FROM_LH_FILES = $(LH_FILES:.lh=.h)
-
-MOST_H_FILES = $(H_FILES_FROM_LH_FILES) \
-stgdefs.h /* top-level including file */ \
-rtsdefs.h \
-\
-StgDirections.h /* other basic STG things */ \
-StgMachDeps.h \
-\
-error.h \
-ieee-flpt.h \
-\
-gmp.h \
-\
-LLC.h /* for PAR build */ \
-HLC.h /* ditto */
-
-#if GhcWithNativeCodeGen == YES
-#define __native_h $(TARGETPLATFORM).h
-#else
-#define __native_h /*no*/
-#endif
-
-H_FILES = $(MOST_H_FILES) \
-__native_h /* Must be constructed last */
-
-/* $(TARGETPLATFORM).h should probably be installed in LIB, not DATA (WDP 94/07) */
-
-PLAT_H_FILES = config.h platform.h
-
-#undef __native_h
-
-/* Literate-pgmming suffix rules used herein */
-UnlitSuffixRule(.lh,.h)
-UnlitSuffixRule(.lc,.c)
-
-all :: /* so it is first */
- @:
-
-UnlitNeededHere(depend)
-
-#if GhcWithNativeCodeGen == YES
-
-GhcDriverNeededHere(depend all mkNativeHdr.o) /* we use its C-compiling know-how */
-
-$(TARGETPLATFORM).h : mkNativeHdr
- $(RM) $@
- ./mkNativeHdr > $@ || ( rm $@ && exit 1 )
-
-mkNativeHdr.c : mkNativeHdr.lc
-
-mkNativeHdr :: mkNativeHdr.c $(MOST_H_FILES)
- $(RM) mkNativeHdr mkNativeHdr.o
- $(GHC) -c mkNativeHdr.c
- $(CC) -o mkNativeHdr mkNativeHdr.o
-
-#endif /* NativeCodeGen */
-
-all depend :: $(H_FILES)
-
-#if DoInstallGHCSystem == YES
-MakeDirectories(install, $(INSTDATADIR_GHC)/includes $(INSTLIBDIR_GHC)/includes)
-includestuff:: /* nothing */
-InstallTarget(includestuff)
-InstallMultNonExecTargets(includestuff, $(H_FILES), $(INSTDATADIR_GHC)/includes)
-InstallMultNonExecTargets(includestuff, $(PLAT_H_FILES), $(INSTLIBDIR_GHC)/includes)
-#endif
-
-ExtraStuffToClean( $(H_FILES_FROM_LH_FILES) )
-
-EtagsNeededHere(tags) /* need this to do "make tags" */
-ClearTagsFile()
-CTagsTarget( $(H_FILES) )
View
41 ghc/includes/Makefile
@@ -0,0 +1,41 @@
+TOP = ../..
+UnlitSuffixRules = YES
+include $(TOP)/ghc/mk/ghc.mk
+
+# Literate header files
+HLIT = $(patsubst %.lh, %.h, $(wildcard *.lh))
+
+# Header files built by configure
+HCONFIG = config.h platform.h
+
+# Everything else
+HFILES = stgdefs.h rtsdefs.h StgDirections.h StgMachDeps.h error.h \
+ ieee-flpt.h gmp.h LLC.h HLC.h
+
+ifeq ($(GhcWithNativeCodeGen),YES)
+ ALLFILES = $(HLIT) $(HFILES) $(TARGETPLATFORM).h
+else
+ ALLFILES = $(HLIT) $(HFILES)
+endif
+
+$(TARGETPLATFORM).h : mkNativeHdr
+ $(RM) $@
+ ./mkNativeHdr > $@ || ( rm $@ && exit 1 )
+
+mkNativeHdr : mkNativeHdr.c $(HLIT) $(HFILES)
+ $(GHC) -c mkNativeHdr.c
+ $(CC) $(CFLAGS) -o mkNativeHdr mkNativeHdr.c
+
+all :: $(ALLFILES)
+
+install :: $(ALLFILES) $(HCONFIG)
+ $(INSTALL) $(INSTDATAFLAGS) $(ALLFILES) $(INSTDATADIR_GHC)/includes
+ $(INSTALL) $(INSTDATAFLAGS) $(HCONFIG) $(INSTLIBDIR_GHC)/includes
+
+ifeq ($(GhcWithNativeCodeGen),YES)
+ clean ::
+ $(RM) $(HLIT) mkNativeHdr mkNativeHdr.c $(TARGETPLATFORM).h
+else
+ clean ::
+ $(RM) $(HLIT) mkNativeHdr mkNativeHdr.c
+endif
View
77 ghc/lib/.depend
@@ -0,0 +1,77 @@
+# DO NOT DELETE: Beginning of Haskell dependencies
+prelude/GHCbase.o : prelude/GHCbase.hs
+prelude/GHCbase.o : required/Array.hi
+prelude/GHCbase.o : required/Char.hi
+prelude/GHCbase.o : required/Ix.hi
+prelude/GHCbase.o : required/Ratio.hi
+prelude/GHCbase.o : prelude/GHCerr.hi
+prelude/GHCerr.o : prelude/GHCerr.hs
+prelude/GHCerr.o : prelude/GHCbase.hi
+prelude/GHCio.o : prelude/GHCio.hs
+prelude/GHCio.o : ../../ghc/includes/error.h
+prelude/GHCio.o : prelude/GHCbase.hi
+prelude/GHCio.o : required/Ix.hi
+prelude/GHCmain.o : prelude/GHCmain.hs
+prelude/GHCmain.o : prelude/GHCbase.hi
+prelude/GHCps.o : prelude/GHCps.hs
+prelude/GHCps.o : required/Ix.hi
+prelude/GHCps.o : required/Char.hi
+prelude/GHCps.o : prelude/GHCbase.hi
+prelude/Prelude.o : prelude/Prelude.hs
+prelude/Prelude.o : ./../includes/ieee-flpt.h
+prelude/Prelude.o : prelude/GHCbase.hi
+prelude/Prelude.o : prelude/GHCio.hi
+prelude/Prelude.o : required/Ratio.hi
+prelude/Prelude.o : required/Char.hi
+prelude/Prelude.o : required/IO.hi
+prelude/PreludeGlaST.o : prelude/PreludeGlaST.hs
+prelude/PreludeGlaST.o : prelude/GHCbase.hi
+required/Array.o : required/Array.hs
+required/Array.o : required/Ix.hi
+required/Array.o : required/List.hi
+required/Array.o : prelude/GHCbase.hi
+required/Char.o : required/Char.hs
+required/Complex.o : required/Complex.hs
+required/Directory.o : required/Directory.hs
+required/Directory.o : prelude/GHCio.hi
+required/Directory.o : prelude/PreludeGlaST.hi
+required/Directory.o : prelude/GHCps.hi
+required/IO.o : required/IO.hs
+required/IO.o : required/Ix.hi
+required/IO.o : prelude/GHCio.hi
+required/IO.o : prelude/GHCbase.hi
+required/IO.o : prelude/GHCps.hi
+required/Ix.o : required/Ix.hs
+required/List.o : required/List.hs
+required/Maybe.o : required/Maybe.hs
+required/Monad.o : required/Monad.hs
+required/Ratio.o : required/Ratio.hs
+required/System.o : required/System.hs