X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FMakefile;h=f099ab718b9d26492dd73acf7532c64833d4a0a4;hp=3e2ae8d988eb4de7788280da3a97e4c684af9ff2;hb=e5c3b478b3cd1707cf122833822f44b2ac09b8e9;hpb=5b9164b417bd96a629adb0998796e2f9d2d5d22f diff --git a/compiler/Makefile b/compiler/Makefile index 3e2ae8d..f099ab7 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -1,443 +1,24 @@ # ----------------------------------------------------------------------------- -# Main compiler Makefile - -# Targets: -# -# all builds stage1 compiler # -# boot stage=N generate build dirs and dependencies for stage N. -# NB. Must be done before 'make stageN'. -# NB. Cannot 'make boot stage=2' until stage1 has -# been built (similarly for stage3). +# (c) 2009 The University of Glasgow # -# stage1 (or stage=1) builds stage1 compiler -# stage2 (or stage=2) builds stage2 compiler -# stage3 (or stage=3) builds stage3 compiler +# This file is part of the GHC build system. # - -TOP = .. - -ifeq "$(stage)" "" -stage=1 -endif - -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/cabal-flags.mk - -ifeq "$(GhcThreaded) $(GhcProfiled)" "YES YES" -$(error Cannot make GHC both threaded and profiled) -endif - -CONFIG_HS = main/Config.hs -PRIMOP_BITS = primop-data-decl.hs-incl \ - primop-tag.hs-incl \ - primop-list.hs-incl \ - primop-has-side-effects.hs-incl \ - primop-out-of-line.hs-incl \ - primop-commutable.hs-incl \ - primop-needs-wrapper.hs-incl \ - primop-can-fail.hs-incl \ - primop-strictness.hs-incl \ - primop-primop-info.hs-incl - -all:: build.stage.$(stage) - -stage1 :: - $(MAKE) stage=1 - -stage2 :: - $(MAKE) stage=2 - -stage3 :: - $(MAKE) stage=3 - -clean distclean:: - -$(CABAL) clean --distpref dist-stage1 - -$(CABAL) clean --distpref dist-stage2 - $(RM) -f Makefile-stage1 - $(RM) -f Makefile-stage2 - $(RM) -f prelude/primops.txt - $(RM) -f $(PRIMOP_BITS) - $(RM) -f $(CONFIG_HS) - $(RM) -f parser/Parser.y - -CONFIGURE_FLAGS_STAGE1 += --flags=stage1 -CONFIGURE_FLAGS_STAGE2 += --flags=-stage1 - -CONFIGURE_FLAGS_STAGE1 += --flags=-ghci - -ifeq "$(GhcWithInterpreter)" "YES" -CONFIGURE_FLAGS_STAGE2 += --flags=ghci - -# If we are going to use dynamic libraries instead of .o files for ghci, -# we will need to always retain CAFs in the compiler. -# ghci/keepCAFsForGHCi contains a GNU C __attribute__((constructor)) -# function which sets the keepCAFs flag for the RTS before any Haskell -# code is run. -ifeq "$(GhcBuildDylibs)" "YES" -CONFIGURE_FLAGS_STAGE2 += --flags=dynlibs -else -CONFIGURE_FLAGS_STAGE2 += --flags=-dynlibs -endif - -ifeq "$(GhcEnableTablesNextToCode) $(GhcUnregisterised)" "YES NO" -# Should GHCI be building info tables in the TABLES_NEXT_TO_CODE style -# or not? -# XXX This should logically be a CPP option, but there doesn't seem to -# be a flag for that -CONFIGURE_FLAGS_STAGE2 += --ghc-option=-DGHCI_TABLES_NEXT_TO_CODE -endif - -# Should the debugger commands be enabled? -ifeq "$(GhciWithDebugger)" "YES" -CONFIGURE_FLAGS_STAGE2 += --ghc-option=-DDEBUGGER -endif - -# Enable editline if either: -# - we're building stage 1 and $(GhcHasEditline)="YES" -# - we're building stage 2/3, and we have built the editline package -# -# But we don't enable editline on Windows, as Windows terminals have -# editline-like support builtin. -# -ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -CONFIGURE_FLAGS_STAGE1 += --flags=-editline -CONFIGURE_FLAGS_STAGE2 += --flags=-editline -else -ifeq "$(GhcHasEditline)" "YES" -CONFIGURE_FLAGS_STAGE1 += --flags=editline -else -CONFIGURE_FLAGS_STAGE1 += --flags=-editline -endif -ifeq "$(wildcard $(FPTOOLS_TOP_ABS)/libraries/editline/unbuildable)" "" -CONFIGURE_FLAGS_STAGE2 += --flags=editline -else -CONFIGURE_FLAGS_STAGE2 += --flags=-editline -endif -endif - -else -CONFIGURE_FLAGS_STAGE2 += --flags=-ghci -endif - -ifeq "$(GhcWithNativeCodeGen)" "NO" -# XXX This should logically be a CPP option, but there doesn't seem to -# be a flag for that -COMMON_CONFIGURE_FLAGS += --ghc-option=-DOMIT_NATIVE_CODEGEN -endif - -ifeq "$(TargetOS_CPP)" "openbsd" -COMMON_CONFIGURE_FLAGS += --ld-options="-Xlinker -E" -endif - -ifeq "$(GhcUnregisterised)" "NO" -ifeq "$(HOSTPLATFORM)" "ia64-unknown-linux" -# needed for generating proper relocation in large binaries: trac #856 -COMMON_CONFIGURE_FLAGS += --ld-option=-Wl,--relax -endif -endif - -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -# The #include is vital for the via-C route with older compilers, else the C -# compiler doesn't realise that the stcall foreign imports are indeed -# stdcall, and doesn't generate the Foo@8 name for them -# As it's only important for older compilers we don't need to do anything -# for stage2+. -CONFIGURE_FLAGS_STAGE1 += --ghc-option='-\#include' \ - --ghc-option='""' \ - --ghc-option='-\#include' \ - --ghc-option='""' -endif - -# ghc_strlen percolates through so many modules that it is easier to get its -# prototype via a global option instead of a myriad of per-file OPTIONS. -# Again, this is only important for older compilers, so we don't do it in -# stage 2+. -CONFIGURE_FLAGS_STAGE1 += --ghc-options='-\#include "cutils.h"' - -CONFIGURE_FLAGS_STAGE3 = $(CONFIGURE_FLAGS_STAGE2) -CONFIGURE_FLAGS_STAGE1 += $(USE_BOOT_CONFIGURE_FLAGS) -CONFIGURE_FLAGS_STAGE2 += $(USE_STAGE1_CONFIGURE_FLAGS) -CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS) - -build.stage.%: $(PRIMOP_BITS) - $(CABAL) configure --distpref dist-stage$* \ - $(CONFIGURE_FLAGS_STAGE$*) \ - $(INSTALL_DIRS_CONFIGURE_FLAGS) \ - $(COMMON_CONFIGURE_FLAGS) \ - --ghc-option=-DSTAGE=$* - $(RM) -f Makefile-stage$* - $(CABAL) makefile --distpref dist-stage$* -f Makefile-stage$* - $(MAKE) -f Makefile-stage$* stage=$* - $(CABAL) register --distpref dist-stage$* --inplace - -stage_dirs : - $(MKDIRHIER) stage$(stage) - -boot :: stage_dirs - -# ----------------------------------------------------------------------------- -# Create compiler configuration +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying # -# The 'echo' commands simply spit the values of various make variables -# into Config.hs, whence they can be compiled and used by GHC itself - -boot :: $(CONFIG_HS) - -boot :: parser/Parser.y - -$(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk - @$(RM) -f $(CONFIG_HS) - @echo "Creating $(CONFIG_HS) ... " - @echo "module Config where" >>$(CONFIG_HS) - @echo "cProjectName :: String" >> $(CONFIG_HS) - @echo "cProjectName = \"$(ProjectName)\"" >> $(CONFIG_HS) - @echo "cProjectVersion :: String" >> $(CONFIG_HS) - @echo "cProjectVersion = \"$(ProjectVersion)\"" >> $(CONFIG_HS) - @echo "cProjectVersionInt :: String" >> $(CONFIG_HS) - @echo "cProjectVersionInt = \"$(ProjectVersionInt)\"" >> $(CONFIG_HS) - @echo "cProjectPatchLevel :: String" >> $(CONFIG_HS) - @echo "cProjectPatchLevel = \"$(ProjectPatchLevel)\"" >> $(CONFIG_HS) - @echo "cBooterVersion :: String" >> $(CONFIG_HS) - @echo "cBooterVersion = \"$(GhcVersion)\"" >> $(CONFIG_HS) - @echo "cStage :: String" >> $(CONFIG_HS) - @echo "cStage = show (STAGE :: Int)" >> $(CONFIG_HS) - @echo "cHscIfaceFileVersion :: String" >> $(CONFIG_HS) - @echo "cHscIfaceFileVersion = \"$(HscIfaceFileVersion)\"" >> $(CONFIG_HS) - @echo "cSplitObjs :: String" >> $(CONFIG_HS) - @echo "cSplitObjs = \"$(SplitObjs)\"" >> $(CONFIG_HS) - @echo "cGhcWithInterpreter :: String" >> $(CONFIG_HS) - @echo "cGhcWithInterpreter = \"$(GhcWithInterpreter)\"" >> $(CONFIG_HS) - @echo "cGhcWithNativeCodeGen :: String" >> $(CONFIG_HS) - @echo "cGhcWithNativeCodeGen = \"$(GhcWithNativeCodeGen)\"" >> $(CONFIG_HS) - @echo "cGhcWithSMP :: String" >> $(CONFIG_HS) - @echo "cGhcWithSMP = \"$(GhcWithSMP)\"" >> $(CONFIG_HS) - @echo "cGhcRTSWays :: String" >> $(CONFIG_HS) - @echo "cGhcRTSWays = \"$(GhcRTSWays)\"" >> $(CONFIG_HS) - @echo "cGhcUnregisterised :: String" >> $(CONFIG_HS) - @echo "cGhcUnregisterised = \"$(GhcUnregisterised)\"" >> $(CONFIG_HS) - @echo "cGhcEnableTablesNextToCode :: String" >> $(CONFIG_HS) - @echo "cGhcEnableTablesNextToCode = \"$(GhcEnableTablesNextToCode)\"" >> $(CONFIG_HS) - @echo "cLeadingUnderscore :: String" >> $(CONFIG_HS) - @echo "cLeadingUnderscore = \"$(LeadingUnderscore)\"" >> $(CONFIG_HS) - @echo "cRAWCPP_FLAGS :: String" >> $(CONFIG_HS) - @echo "cRAWCPP_FLAGS = \"$(RAWCPP_FLAGS)\"" >> $(CONFIG_HS) - @echo "cGCC :: String" >> $(CONFIG_HS) - @echo "cGCC = \"$(WhatGccIsCalled)\"" >> $(CONFIG_HS) - @echo "cMKDLL :: String" >> $(CONFIG_HS) - @echo "cMKDLL = \"$(BLD_DLL)\"" >> $(CONFIG_HS) - @echo "cLdIsGNULd :: String" >> $(CONFIG_HS) - @echo "cLdIsGNULd = \"$(LdIsGNULd)\"" >> $(CONFIG_HS) - @echo "cLD_X :: String" >> $(CONFIG_HS) - @echo "cLD_X = \"$(LD_X)\"" >> $(CONFIG_HS) - @echo "cGHC_DRIVER_DIR_REL :: String" >> $(CONFIG_HS) - @echo "cGHC_DRIVER_DIR_REL = \"$(GHC_DRIVER_DIR_REL)\"" >> $(CONFIG_HS) - @echo "cGHC_TOUCHY_PGM :: String" >> $(CONFIG_HS) - @echo "cGHC_TOUCHY_PGM = \"$(GHC_TOUCHY_PGM)\"" >> $(CONFIG_HS) - @echo "cGHC_TOUCHY_DIR_REL :: String" >> $(CONFIG_HS) - @echo "cGHC_TOUCHY_DIR_REL = \"$(GHC_TOUCHY_DIR_REL)\"" >> $(CONFIG_HS) - @echo "cGHC_UNLIT_PGM :: String" >> $(CONFIG_HS) - @echo "cGHC_UNLIT_PGM = \"$(GHC_UNLIT_PGM)\"" >> $(CONFIG_HS) - @echo "cGHC_UNLIT_DIR_REL :: String" >> $(CONFIG_HS) - @echo "cGHC_UNLIT_DIR_REL = \"$(GHC_UNLIT_DIR_REL)\"" >> $(CONFIG_HS) - @echo "cGHC_MANGLER_PGM :: String" >> $(CONFIG_HS) - @echo "cGHC_MANGLER_PGM = \"$(GHC_MANGLER_PGM)\"" >> $(CONFIG_HS) - @echo "cGHC_MANGLER_DIR_REL :: String" >> $(CONFIG_HS) - @echo "cGHC_MANGLER_DIR_REL = \"$(GHC_MANGLER_DIR_REL)\"" >> $(CONFIG_HS) - @echo "cGHC_SPLIT_PGM :: String" >> $(CONFIG_HS) - @echo "cGHC_SPLIT_PGM = \"$(GHC_SPLIT_PGM)\"" >> $(CONFIG_HS) - @echo "cGHC_SPLIT_DIR_REL :: String" >> $(CONFIG_HS) - @echo "cGHC_SPLIT_DIR_REL = \"$(GHC_SPLIT_DIR_REL)\"" >> $(CONFIG_HS) - @echo "cGHC_SYSMAN_PGM :: String" >> $(CONFIG_HS) - @echo "cGHC_SYSMAN_PGM = \"$(GHC_SYSMAN)\"" >> $(CONFIG_HS) - @echo "cGHC_SYSMAN_DIR_REL :: String" >> $(CONFIG_HS) - @echo "cGHC_SYSMAN_DIR_REL = \"$(GHC_SYSMAN_DIR)\"" >> $(CONFIG_HS) - @echo "cGHC_CP :: String" >> $(CONFIG_HS) - @echo "cGHC_CP = \"$(GHC_CP)\"" >> $(CONFIG_HS) - @echo "cGHC_PERL :: String" >> $(CONFIG_HS) - @echo "cGHC_PERL = \"$(GHC_PERL)\"" >> $(CONFIG_HS) - @echo "cEnableWin32DLLs :: String" >> $(CONFIG_HS) - @echo "cEnableWin32DLLs = \"$(EnableWin32DLLs)\"" >> $(CONFIG_HS) - @echo "cCONTEXT_DIFF :: String" >> $(CONFIG_HS) - @echo "cCONTEXT_DIFF = \"$(CONTEXT_DIFF)\"" >> $(CONFIG_HS) - @echo "cUSER_WAY_NAMES :: String" >> $(CONFIG_HS) - @echo "cUSER_WAY_NAMES = \"$(USER_WAY_NAMES)\"" >> $(CONFIG_HS) - @echo "cUSER_WAY_OPTS :: String" >> $(CONFIG_HS) - @echo "cUSER_WAY_OPTS = \"$(USER_WAY_OPTS)\"" >> $(CONFIG_HS) - @echo "cDEFAULT_TMPDIR :: String" >> $(CONFIG_HS) - @echo "cDEFAULT_TMPDIR = \"$(DEFAULT_TMPDIR)\"" >> $(CONFIG_HS) - @echo "cRelocatableBuild :: Bool" >> $(CONFIG_HS) -ifeq "$(RelocatableBuild)" "YES" - @echo "cRelocatableBuild = True" >> $(CONFIG_HS) -else - @echo "cRelocatableBuild = False" >> $(CONFIG_HS) -endif - @echo "cLibFFI :: Bool" >> $(CONFIG_HS) -ifeq "$(UseLibFFIForAdjustors)" "YES" - @echo "cLibFFI = True" >> $(CONFIG_HS) -else - @echo "cLibFFI = False" >> $(CONFIG_HS) -endif - @echo done. - # ----------------------------------------------------------------------------- -# Create platform includes - -# Here we generate a little header file containing CPP symbols that GHC -# uses to determine which platform it is building on/for. The platforms -# can differ between stage1 and stage2 if we're cross-compiling, so we -# need one of these header files per stage. - -PLATFORM_H = ghc_boot_platform.h - -stage1/$(PLATFORM_H) : stage_dirs $(FPTOOLS_TOP)/mk/config.mk - @echo "Creating $@..." - @$(RM) $@ - @echo "#ifndef __PLATFORM_H__" >$@ - @echo "#define __PLATFORM_H__" >>$@ - @echo >> $@ - @echo "#define BuildPlatform_NAME \"$(BUILDPLATFORM)\"" >> $@ - @echo "#define HostPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ - @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ - @echo >> $@ - @echo "#define $(BuildPlatform_CPP)_BUILD 1" >> $@ - @echo "#define $(HostPlatform_CPP)_HOST 1" >> $@ - @echo "#define $(TargetPlatform_CPP)_TARGET 1" >> $@ - @echo >> $@ - @echo "#define $(BuildArch_CPP)_BUILD_ARCH 1" >> $@ - @echo "#define $(HostArch_CPP)_HOST_ARCH 1" >> $@ - @echo "#define $(TargetArch_CPP)_TARGET_ARCH 1" >> $@ - @echo "#define BUILD_ARCH \"$(BuildArch_CPP)\"" >> $@ - @echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@ - @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ - @echo >> $@ - @echo "#define $(BuildOS_CPP)_BUILD_OS 1" >> $@ - @echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@ - @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@ - @echo "#define BUILD_OS \"$(BuildOS_CPP)\"" >> $@ - @echo "#define HOST_OS \"$(HostOS_CPP)\"" >> $@ - @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@ -ifeq "$(HostOS_CPP)" "irix" - @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@ - @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@ - @echo "#endif " >> $@ -endif - @echo >> $@ - @echo "#define $(BuildVendor_CPP)_BUILD_VENDOR 1" >> $@ - @echo "#define $(HostVendor_CPP)_HOST_VENDOR 1" >> $@ - @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@ - @echo "#define BUILD_VENDOR \"$(BuildVendor_CPP)\"" >> $@ - @echo "#define HOST_VENDOR \"$(HostVendor_CPP)\"" >> $@ - @echo "#define TARGET_VENDOR \"$(TargetVendor_CPP)\"" >> $@ - @echo >> $@ - @echo "#endif /* __PLATFORM_H__ */" >> $@ - @echo "Done." - -# For stage2 and above, the BUILD platform is the HOST of stage1, and -# the HOST platform is the TARGET of stage1. The TARGET remains the same -# (stage1 is the cross-compiler, not stage2). -stage2/$(PLATFORM_H) : stage_dirs $(FPTOOLS_TOP)/mk/config.mk - @echo "Creating $@..." - @$(RM) $@ - @echo "#ifndef __PLATFORM_H__" >$@ - @echo "#define __PLATFORM_H__" >>$@ - @echo >> $@ - @echo "#define BuildPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ - @echo "#define HostPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ - @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ - @echo >> $@ - @echo "#define $(HostPlatform_CPP)_BUILD 1" >> $@ - @echo "#define $(TargetPlatform_CPP)_HOST 1" >> $@ - @echo "#define $(TargetPlatform_CPP)_TARGET 1" >> $@ - @echo >> $@ - @echo "#define $(HostArch_CPP)_BUILD_ARCH 1" >> $@ - @echo "#define $(TargetArch_CPP)_HOST_ARCH 1" >> $@ - @echo "#define $(TargetArch_CPP)_TARGET_ARCH 1" >> $@ - @echo "#define BUILD_ARCH \"$(HostArch_CPP)\"" >> $@ - @echo "#define HOST_ARCH \"$(TargetArch_CPP)\"" >> $@ - @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ - @echo >> $@ - @echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@ - @echo "#define $(TargetOS_CPP)_HOST_OS 1" >> $@ - @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@ - @echo "#define BUILD_OS \"$(HostOS_CPP)\"" >> $@ - @echo "#define HOST_OS \"$(TargetOS_CPP)\"" >> $@ - @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@ -ifeq "$(HostOS_CPP)" "irix" - @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@ - @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@ - @echo "#endif " >> $@ -endif - @echo >> $@ - @echo "#define $(HostVendor_CPP)_BUILD_VENDOR 1" >> $@ - @echo "#define $(TargetVendor_CPP)_HOST_VENDOR 1" >> $@ - @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@ - @echo "#define BUILD_VENDOR \"$(HostVendor_CPP)\"" >> $@ - @echo "#define HOST_VENDOR \"$(TargetVendor_CPP)\"" >> $@ - @echo "#define TARGET_VENDOR \"$(TargetVendor_CPP)\"" >> $@ - @echo >> $@ - @echo "#endif /* __PLATFORM_H__ */" >> $@ - @echo "Done." -STAGE_PLATFORM_H = stage$(stage)/$(PLATFORM_H) +# If the user says 'make' or 'make stage=2' here, we behave as if they were +# in the ghc directory instead, so that the executable GHC gets built. +.PHONY: default_to_ghc all_ghc +default_to_ghc : all_ghc -boot :: $(STAGE_PLATFORM_H) +dir = compiler -# ---------------------------------------------------------------------------- -# Generate supporting stuff for prelude/PrimOp.lhs -# from prelude/primops.txt +include ../mk/compiler-ghc.mk -SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) -SRC_CPP_OPTS += ${GhcCppOpts} - -prelude/primops.txt parser/Parser.y: %: %.pp stage1/$(PLATFORM_H) - $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@ - -primop-data-decl.hs-incl: prelude/primops.txt - $(GENPRIMOP) --data-decl < $< > $@ -primop-tag.hs-incl: prelude/primops.txt - $(GENPRIMOP) --primop-tag < $< > $@ -primop-list.hs-incl: prelude/primops.txt - $(GENPRIMOP) --primop-list < $< > $@ -primop-has-side-effects.hs-incl: prelude/primops.txt - $(GENPRIMOP) --has-side-effects < $< > $@ -primop-out-of-line.hs-incl: prelude/primops.txt - $(GENPRIMOP) --out-of-line < $< > $@ -primop-commutable.hs-incl: prelude/primops.txt - $(GENPRIMOP) --commutable < $< > $@ -primop-needs-wrapper.hs-incl: prelude/primops.txt - $(GENPRIMOP) --needs-wrapper < $< > $@ -primop-can-fail.hs-incl: prelude/primops.txt - $(GENPRIMOP) --can-fail < $< > $@ -primop-strictness.hs-incl: prelude/primops.txt - $(GENPRIMOP) --strictness < $< > $@ -primop-primop-info.hs-incl: prelude/primops.txt - $(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 - $(GENPRIMOP) --usage < $< > $@ - -# XXX: -#----------------------------------------------------------------------------- -# binary-dist -# -#binary-dist: -# $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler -# $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler/stage$(stage) -# echo "stage=$(stage)" > $(BIN_DIST_DIR)/compiler/Makefile -# cat Makefile >> $(BIN_DIST_DIR)/compiler/Makefile -# $(INSTALL_DATA) package.conf.in $(BIN_DIST_DIR)/compiler/ -# set -e; for d in stage$(stage)/*/; do $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler/$$d; done -# set -e; for f in $(HS_IFACES); do $(INSTALL_DATA) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#ifneq "$(INSTALL_LIBS)" "" -# set -e; for f in $(INSTALL_LIBS); do $(INSTALL_DATA) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#endif -#ifneq "$(INSTALL_PROGS)" "" -# set -e; for f in $(INSTALL_PROGS); do $(INSTALL_PROGRAM) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#endif -#ifneq "$(INSTALL_LIBEXECS)" "" -# set -e; for f in $(INSTALL_LIBEXECS); do $(INSTALL_PROGRAM) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#endif +all_ghc : + +$(TOPMAKE) all_ghc $(EXTRA_MAKE_OPTS)