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

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
# -----------------------------------------------------------------------------
# Main ghc/compiler Makefile
# Main compiler Makefile
# Targets:
#
......@@ -602,8 +602,6 @@ SRC_HC_OPTS += '-\#include "hschooks.h"'
# Generate supporting stuff for prelude/PrimOp.lhs
# from prelude/primops.txt
GENPOC=$(TOP)/utils/genprimopcode/genprimopcode
PRIMOP_BITS=primop-data-decl.hs-incl \
primop-tag.hs-incl \
primop-list.hs-incl \
......@@ -630,30 +628,30 @@ depend :: $(PRIMOP_BITS)
endif
primop-data-decl.hs-incl: prelude/primops.txt
$(GENPOC) --data-decl < $< > $@
$(GENPRIMOP) --data-decl < $< > $@
primop-tag.hs-incl: prelude/primops.txt
$(GENPOC) --primop-tag < $< > $@
$(GENPRIMOP) --primop-tag < $< > $@
primop-list.hs-incl: prelude/primops.txt
$(GENPOC) --primop-list < $< > $@
$(GENPRIMOP) --primop-list < $< > $@
primop-has-side-effects.hs-incl: prelude/primops.txt
$(GENPOC) --has-side-effects < $< > $@
$(GENPRIMOP) --has-side-effects < $< > $@
primop-out-of-line.hs-incl: prelude/primops.txt
$(GENPOC) --out-of-line < $< > $@
$(GENPRIMOP) --out-of-line < $< > $@
primop-commutable.hs-incl: prelude/primops.txt
$(GENPOC) --commutable < $< > $@
$(GENPRIMOP) --commutable < $< > $@
primop-needs-wrapper.hs-incl: prelude/primops.txt
$(GENPOC) --needs-wrapper < $< > $@
$(GENPRIMOP) --needs-wrapper < $< > $@
primop-can-fail.hs-incl: prelude/primops.txt
$(GENPOC) --can-fail < $< > $@
$(GENPRIMOP) --can-fail < $< > $@
primop-strictness.hs-incl: prelude/primops.txt
$(GENPOC) --strictness < $< > $@
$(GENPRIMOP) --strictness < $< > $@
primop-primop-info.hs-incl: prelude/primops.txt
$(GENPOC) --primop-primop-info < $< > $@
$(GENPRIMOP) --primop-primop-info < $< > $@
# Usages aren't used any more; but the generator
# can still generate them if we want them back
primop-usage.hs-incl: prelude/primops.txt
$(GENPOC) --usage < $< > $@
$(GENPRIMOP) --usage < $< > $@
#-----------------------------------------------------------------------------
......@@ -663,7 +661,7 @@ primop-usage.hs-incl: prelude/primops.txt
# libraries will be available from the main libraries.
ifeq "$(stage)" "1"
include $(GHC_LIB_COMPAT_DIR)/compat.mk
include $(GHC_COMPAT_DIR)/compat.mk
endif
SRC_LD_OPTS += -no-link-chk
......@@ -676,7 +674,7 @@ all :: $(odir)/ghc-inplace ghc-inplace
$(odir)/ghc-inplace : $(HS_PROG)
@$(RM) $@
echo '#!/bin/sh' >>$@
echo exec $(FPTOOLS_TOP_ABS)/ghc/compiler/$(HS_PROG) '-B$(subst \,\\,$(FPTOOLS_TOP_ABS_PLATFORM))' '"$$@"' >>$@
echo exec $(GHC_COMPILER_DIR_ABS)/$(HS_PROG) '-B$(subst \,\\,$(FPTOOLS_TOP_ABS_PLATFORM))' '"$$@"' >>$@
chmod 755 $@
ghc-inplace : stage1/ghc-inplace
......@@ -765,7 +763,7 @@ PACKAGE_CPP_OPTS += -DPKG_DEPENDS='$(PKG_DEPENDS)'
LIBOBJS = $(filter-out $(odir)/main/Main.o $(odir)/parser/hschooks.o, $(OBJS))
# disable splitting: it won't really help with GHC, and the specialised
# build system for ghc/compiler isn't set up to handle it.
# build system for compiler/ isn't set up to handle it.
SplitObjs = NO
# the package build system likes to set WAYS=$(GhcLibWays), but we don't
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment