1 # -----------------------------------------------------------------------------
2 # Main compiler Makefile
6 # all builds stage1 compiler
8 # boot stage=N generate build dirs and dependencies for stage N.
9 # NB. Must be done before 'make stageN'.
10 # NB. Cannot 'make boot stage=2' until stage1 has
11 # been built (similarly for stage3).
13 # stage1 (or stage=1) builds stage1 compiler
14 # stage2 (or stage=2) builds stage2 compiler
15 # stage3 (or stage=3) builds stage3 compiler
24 include $(TOP)/mk/boilerplate.mk
25 include $(TOP)/mk/cabal-flags.mk
27 ifeq "$(GhcThreaded) $(GhcProfiled)" "YES YES"
28 $(error Cannot make GHC both threaded and profiled)
31 CONFIG_HS = main/Config.hs
32 PRIMOP_BITS = primop-data-decl.hs-incl \
35 primop-has-side-effects.hs-incl \
36 primop-out-of-line.hs-incl \
37 primop-commutable.hs-incl \
38 primop-needs-wrapper.hs-incl \
39 primop-can-fail.hs-incl \
40 primop-strictness.hs-incl \
41 primop-primop-info.hs-incl
43 boot:: boot.stage.$(stage)
45 all:: build.stage.$(stage)
47 doc:: doc.stage.$(stage)
59 -$(CABAL) clean --distpref dist-stage1
60 -$(CABAL) clean --distpref dist-stage2
61 -$(CABAL) clean --distpref dist-stage3
62 $(RM) -f Makefile-stage1
63 $(RM) -f Makefile-stage2
64 $(RM) -f Makefile-stage3
65 $(RM) -f prelude/primops.txt
66 $(RM) -f $(PRIMOP_BITS)
68 $(RM) -f parser/Parser.y
69 $(RM) -rf stage1 stage2plus
70 $(RM) -f $(STAGE3_PACKAGE_CONF)
72 CONFIGURE_FLAGS_STAGE1 += --flags=stage1
73 CONFIGURE_FLAGS_STAGE2 += --flags=-stage1
75 CONFIGURE_FLAGS_STAGE1 += --flags=-ghci
77 ifeq "$(GhcWithInterpreter)" "YES"
78 CONFIGURE_FLAGS_STAGE2 += --flags=ghci
80 # If we are going to use dynamic libraries instead of .o files for ghci,
81 # we will need to always retain CAFs in the compiler.
82 # ghci/keepCAFsForGHCi contains a GNU C __attribute__((constructor))
83 # function which sets the keepCAFs flag for the RTS before any Haskell
85 ifeq "$(GhcBuildDylibs)" "YES"
86 CONFIGURE_FLAGS_STAGE2 += --flags=dynlibs
88 CONFIGURE_FLAGS_STAGE2 += --flags=-dynlibs
91 ifeq "$(GhcEnableTablesNextToCode) $(GhcUnregisterised)" "YES NO"
92 # Should GHCI be building info tables in the TABLES_NEXT_TO_CODE style
94 # XXX This should logically be a CPP option, but there doesn't seem to
96 CONFIGURE_FLAGS_STAGE2 += --ghc-option=-DGHCI_TABLES_NEXT_TO_CODE
99 # Should the debugger commands be enabled?
100 ifeq "$(GhciWithDebugger)" "YES"
101 CONFIGURE_FLAGS_STAGE2 += --ghc-option=-DDEBUGGER
104 # Enable editline if either:
105 # - we're building stage 1 and $(GhcHasEditline)="YES"
106 # - we're building stage 2/3, and we have built the editline package
108 # But we don't enable editline on Windows, as Windows terminals have
109 # editline-like support builtin.
111 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
112 CONFIGURE_FLAGS_STAGE1 += --flags=-editline
113 CONFIGURE_FLAGS_STAGE2 += --flags=-editline
115 ifeq "$(GhcHasEditline)" "YES"
116 CONFIGURE_FLAGS_STAGE1 += --flags=editline
118 CONFIGURE_FLAGS_STAGE1 += --flags=-editline
120 ifeq "$(wildcard $(FPTOOLS_TOP_ABS)/libraries/editline/unbuildable)" ""
121 CONFIGURE_FLAGS_STAGE2 += --flags=editline
123 CONFIGURE_FLAGS_STAGE2 += --flags=-editline
128 CONFIGURE_FLAGS_STAGE2 += --flags=-ghci
131 ifeq "$(GhcWithNativeCodeGen)" "NO"
132 # XXX This should logically be a CPP option, but there doesn't seem to
134 COMMON_CONFIGURE_FLAGS += --ghc-option=-DOMIT_NATIVE_CODEGEN
137 ifeq "$(TargetOS_CPP)" "openbsd"
138 COMMON_CONFIGURE_FLAGS += --ld-options="-Xlinker -E"
141 ifeq "$(GhcUnregisterised)" "NO"
142 ifeq "$(HOSTPLATFORM)" "ia64-unknown-linux"
143 # needed for generating proper relocation in large binaries: trac #856
144 COMMON_CONFIGURE_FLAGS += --ld-option=-Wl,--relax
148 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
149 # The #include is vital for the via-C route with older compilers, else the C
150 # compiler doesn't realise that the stcall foreign imports are indeed
151 # stdcall, and doesn't generate the Foo@8 name for them
152 # As it's only important for older compilers we don't need to do anything
154 CONFIGURE_FLAGS_STAGE1 += --ghc-option='-\#include' \
155 --ghc-option='"<windows.h>"' \
156 --ghc-option='-\#include' \
157 --ghc-option='"<process.h>"'
160 # ghc_strlen percolates through so many modules that it is easier to get its
161 # prototype via a global option instead of a myriad of per-file OPTIONS.
162 # Again, this is only important for older compilers, so we don't do it in
164 CONFIGURE_FLAGS_STAGE1 += --ghc-options='-\#include "cutils.h"'
166 CONFIGURE_FLAGS_STAGE3 = $(CONFIGURE_FLAGS_STAGE2)
167 CONFIGURE_FLAGS_STAGE1 += $(USE_BOOT_CONFIGURE_FLAGS)
168 CONFIGURE_FLAGS_STAGE2 += $(USE_STAGE1_CONFIGURE_FLAGS)
169 CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS)
171 boot.stage.%: $(PRIMOP_BITS) $(CONFIG_HS) parser/Parser.y
172 test -e $(STAGE3_PACKAGE_CONF) || echo "[]" > $(STAGE3_PACKAGE_CONF)
173 $(CABAL) configure --distpref dist-stage$* \
174 $(CONFIGURE_FLAGS_STAGE$*) \
175 $(INSTALL_DIRS_CONFIGURE_FLAGS) \
176 $(COMMON_CONFIGURE_FLAGS) \
177 --ghc-option=-DSTAGE=$*
178 $(RM) -f Makefile-stage$*
179 $(CABAL) makefile --distpref dist-stage$* -f Makefile-stage$*
182 $(MAKE) -f Makefile-stage$* stage=$*
183 $(CABAL) register --distpref dist-stage$* --inplace
186 $(CABAL) haddock --distpref dist-stage$*
188 # XXX We ought to actually install the (stage 2) library
192 # -----------------------------------------------------------------------------
193 # Create compiler configuration
195 # The 'echo' commands simply spit the values of various make variables
196 # into Config.hs, whence they can be compiled and used by GHC itself
198 $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk
199 @$(RM) -f $(CONFIG_HS)
200 @echo "Creating $(CONFIG_HS) ... "
201 @echo "module Config where" >>$(CONFIG_HS)
202 @echo "cProjectName :: String" >> $(CONFIG_HS)
203 @echo "cProjectName = \"$(ProjectName)\"" >> $(CONFIG_HS)
204 @echo "cProjectVersion :: String" >> $(CONFIG_HS)
205 @echo "cProjectVersion = \"$(ProjectVersion)\"" >> $(CONFIG_HS)
206 @echo "cProjectVersionInt :: String" >> $(CONFIG_HS)
207 @echo "cProjectVersionInt = \"$(ProjectVersionInt)\"" >> $(CONFIG_HS)
208 @echo "cProjectPatchLevel :: String" >> $(CONFIG_HS)
209 @echo "cProjectPatchLevel = \"$(ProjectPatchLevel)\"" >> $(CONFIG_HS)
210 @echo "cBooterVersion :: String" >> $(CONFIG_HS)
211 @echo "cBooterVersion = \"$(GhcVersion)\"" >> $(CONFIG_HS)
212 @echo "cStage :: String" >> $(CONFIG_HS)
213 @echo "cStage = show (STAGE :: Int)" >> $(CONFIG_HS)
214 @echo "cHscIfaceFileVersion :: String" >> $(CONFIG_HS)
215 @echo "cHscIfaceFileVersion = \"$(HscIfaceFileVersion)\"" >> $(CONFIG_HS)
216 @echo "cSplitObjs :: String" >> $(CONFIG_HS)
217 @echo "cSplitObjs = \"$(SplitObjs)\"" >> $(CONFIG_HS)
218 @echo "cGhcWithInterpreter :: String" >> $(CONFIG_HS)
219 @echo "cGhcWithInterpreter = \"$(GhcWithInterpreter)\"" >> $(CONFIG_HS)
220 @echo "cGhcWithNativeCodeGen :: String" >> $(CONFIG_HS)
221 @echo "cGhcWithNativeCodeGen = \"$(GhcWithNativeCodeGen)\"" >> $(CONFIG_HS)
222 @echo "cGhcWithSMP :: String" >> $(CONFIG_HS)
223 @echo "cGhcWithSMP = \"$(GhcWithSMP)\"" >> $(CONFIG_HS)
224 @echo "cGhcRTSWays :: String" >> $(CONFIG_HS)
225 @echo "cGhcRTSWays = \"$(GhcRTSWays)\"" >> $(CONFIG_HS)
226 @echo "cGhcUnregisterised :: String" >> $(CONFIG_HS)
227 @echo "cGhcUnregisterised = \"$(GhcUnregisterised)\"" >> $(CONFIG_HS)
228 @echo "cGhcEnableTablesNextToCode :: String" >> $(CONFIG_HS)
229 @echo "cGhcEnableTablesNextToCode = \"$(GhcEnableTablesNextToCode)\"" >> $(CONFIG_HS)
230 @echo "cLeadingUnderscore :: String" >> $(CONFIG_HS)
231 @echo "cLeadingUnderscore = \"$(LeadingUnderscore)\"" >> $(CONFIG_HS)
232 @echo "cRAWCPP_FLAGS :: String" >> $(CONFIG_HS)
233 @echo "cRAWCPP_FLAGS = \"$(RAWCPP_FLAGS)\"" >> $(CONFIG_HS)
234 @echo "cGCC :: String" >> $(CONFIG_HS)
235 @echo "cGCC = \"$(WhatGccIsCalled)\"" >> $(CONFIG_HS)
236 @echo "cMKDLL :: String" >> $(CONFIG_HS)
237 @echo "cMKDLL = \"$(BLD_DLL)\"" >> $(CONFIG_HS)
238 @echo "cLdIsGNULd :: String" >> $(CONFIG_HS)
239 @echo "cLdIsGNULd = \"$(LdIsGNULd)\"" >> $(CONFIG_HS)
240 @echo "cLD_X :: String" >> $(CONFIG_HS)
241 @echo "cLD_X = \"$(LD_X)\"" >> $(CONFIG_HS)
242 @echo "cGHC_DRIVER_DIR_REL :: String" >> $(CONFIG_HS)
243 @echo "cGHC_DRIVER_DIR_REL = \"$(GHC_DRIVER_DIR_REL)\"" >> $(CONFIG_HS)
244 @echo "cGHC_TOUCHY_PGM :: String" >> $(CONFIG_HS)
245 @echo "cGHC_TOUCHY_PGM = \"$(GHC_TOUCHY_PGM)\"" >> $(CONFIG_HS)
246 @echo "cGHC_TOUCHY_DIR_REL :: String" >> $(CONFIG_HS)
247 @echo "cGHC_TOUCHY_DIR_REL = \"$(GHC_TOUCHY_DIR_REL)\"" >> $(CONFIG_HS)
248 @echo "cGHC_UNLIT_PGM :: String" >> $(CONFIG_HS)
249 @echo "cGHC_UNLIT_PGM = \"$(GHC_UNLIT_PGM)\"" >> $(CONFIG_HS)
250 @echo "cGHC_UNLIT_DIR_REL :: String" >> $(CONFIG_HS)
251 @echo "cGHC_UNLIT_DIR_REL = \"$(GHC_UNLIT_DIR_REL)\"" >> $(CONFIG_HS)
252 @echo "cGHC_MANGLER_PGM :: String" >> $(CONFIG_HS)
253 @echo "cGHC_MANGLER_PGM = \"$(GHC_MANGLER_PGM)\"" >> $(CONFIG_HS)
254 @echo "cGHC_MANGLER_DIR_REL :: String" >> $(CONFIG_HS)
255 @echo "cGHC_MANGLER_DIR_REL = \"$(GHC_MANGLER_DIR_REL)\"" >> $(CONFIG_HS)
256 @echo "cGHC_SPLIT_PGM :: String" >> $(CONFIG_HS)
257 @echo "cGHC_SPLIT_PGM = \"$(GHC_SPLIT_PGM)\"" >> $(CONFIG_HS)
258 @echo "cGHC_SPLIT_DIR_REL :: String" >> $(CONFIG_HS)
259 @echo "cGHC_SPLIT_DIR_REL = \"$(GHC_SPLIT_DIR_REL)\"" >> $(CONFIG_HS)
260 @echo "cGHC_SYSMAN_PGM :: String" >> $(CONFIG_HS)
261 @echo "cGHC_SYSMAN_PGM = \"$(GHC_SYSMAN)\"" >> $(CONFIG_HS)
262 @echo "cGHC_SYSMAN_DIR_REL :: String" >> $(CONFIG_HS)
263 @echo "cGHC_SYSMAN_DIR_REL = \"$(GHC_SYSMAN_DIR)\"" >> $(CONFIG_HS)
264 @echo "cGHC_CP :: String" >> $(CONFIG_HS)
265 @echo "cGHC_CP = \"$(GHC_CP)\"" >> $(CONFIG_HS)
266 @echo "cGHC_PERL :: String" >> $(CONFIG_HS)
267 @echo "cGHC_PERL = \"$(GHC_PERL)\"" >> $(CONFIG_HS)
268 @echo "cEnableWin32DLLs :: String" >> $(CONFIG_HS)
269 @echo "cEnableWin32DLLs = \"$(EnableWin32DLLs)\"" >> $(CONFIG_HS)
270 @echo "cCONTEXT_DIFF :: String" >> $(CONFIG_HS)
271 @echo "cCONTEXT_DIFF = \"$(CONTEXT_DIFF)\"" >> $(CONFIG_HS)
272 @echo "cUSER_WAY_NAMES :: String" >> $(CONFIG_HS)
273 @echo "cUSER_WAY_NAMES = \"$(USER_WAY_NAMES)\"" >> $(CONFIG_HS)
274 @echo "cUSER_WAY_OPTS :: String" >> $(CONFIG_HS)
275 @echo "cUSER_WAY_OPTS = \"$(USER_WAY_OPTS)\"" >> $(CONFIG_HS)
276 @echo "cDEFAULT_TMPDIR :: String" >> $(CONFIG_HS)
277 @echo "cDEFAULT_TMPDIR = \"$(DEFAULT_TMPDIR)\"" >> $(CONFIG_HS)
278 @echo "cRelocatableBuild :: Bool" >> $(CONFIG_HS)
279 ifeq "$(RelocatableBuild)" "YES"
280 @echo "cRelocatableBuild = True" >> $(CONFIG_HS)
282 @echo "cRelocatableBuild = False" >> $(CONFIG_HS)
284 @echo "cLibFFI :: Bool" >> $(CONFIG_HS)
285 ifeq "$(UseLibFFIForAdjustors)" "YES"
286 @echo "cLibFFI = True" >> $(CONFIG_HS)
288 @echo "cLibFFI = False" >> $(CONFIG_HS)
292 # -----------------------------------------------------------------------------
293 # Create platform includes
295 # Here we generate a little header file containing CPP symbols that GHC
296 # uses to determine which platform it is building on/for. The platforms
297 # can differ between stage1 and stage2 if we're cross-compiling, so we
298 # need one of these header files per stage.
300 PLATFORM_H = ghc_boot_platform.h
302 stage1/$(PLATFORM_H) : $(FPTOOLS_TOP)/mk/config.mk
304 @echo "Creating $@..."
306 @echo "#ifndef __PLATFORM_H__" >$@
307 @echo "#define __PLATFORM_H__" >>$@
309 @echo "#define BuildPlatform_NAME \"$(BUILDPLATFORM)\"" >> $@
310 @echo "#define HostPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@
311 @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@
313 @echo "#define $(BuildPlatform_CPP)_BUILD 1" >> $@
314 @echo "#define $(HostPlatform_CPP)_HOST 1" >> $@
315 @echo "#define $(TargetPlatform_CPP)_TARGET 1" >> $@
317 @echo "#define $(BuildArch_CPP)_BUILD_ARCH 1" >> $@
318 @echo "#define $(HostArch_CPP)_HOST_ARCH 1" >> $@
319 @echo "#define $(TargetArch_CPP)_TARGET_ARCH 1" >> $@
320 @echo "#define BUILD_ARCH \"$(BuildArch_CPP)\"" >> $@
321 @echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@
322 @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@
324 @echo "#define $(BuildOS_CPP)_BUILD_OS 1" >> $@
325 @echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@
326 @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@
327 @echo "#define BUILD_OS \"$(BuildOS_CPP)\"" >> $@
328 @echo "#define HOST_OS \"$(HostOS_CPP)\"" >> $@
329 @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@
330 ifeq "$(HostOS_CPP)" "irix"
331 @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@
332 @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@
333 @echo "#endif " >> $@
336 @echo "#define $(BuildVendor_CPP)_BUILD_VENDOR 1" >> $@
337 @echo "#define $(HostVendor_CPP)_HOST_VENDOR 1" >> $@
338 @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@
339 @echo "#define BUILD_VENDOR \"$(BuildVendor_CPP)\"" >> $@
340 @echo "#define HOST_VENDOR \"$(HostVendor_CPP)\"" >> $@
341 @echo "#define TARGET_VENDOR \"$(TargetVendor_CPP)\"" >> $@
343 @echo "#endif /* __PLATFORM_H__ */" >> $@
346 # For stage2 and above, the BUILD platform is the HOST of stage1, and
347 # the HOST platform is the TARGET of stage1. The TARGET remains the same
348 # (stage1 is the cross-compiler, not stage2).
349 stage2plus/$(PLATFORM_H) : $(FPTOOLS_TOP)/mk/config.mk
350 $(MKDIRHIER) stage2plus
351 @echo "Creating $@..."
353 @echo "#ifndef __PLATFORM_H__" >$@
354 @echo "#define __PLATFORM_H__" >>$@
356 @echo "#define BuildPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@
357 @echo "#define HostPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@
358 @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@
360 @echo "#define $(HostPlatform_CPP)_BUILD 1" >> $@
361 @echo "#define $(TargetPlatform_CPP)_HOST 1" >> $@
362 @echo "#define $(TargetPlatform_CPP)_TARGET 1" >> $@
364 @echo "#define $(HostArch_CPP)_BUILD_ARCH 1" >> $@
365 @echo "#define $(TargetArch_CPP)_HOST_ARCH 1" >> $@
366 @echo "#define $(TargetArch_CPP)_TARGET_ARCH 1" >> $@
367 @echo "#define BUILD_ARCH \"$(HostArch_CPP)\"" >> $@
368 @echo "#define HOST_ARCH \"$(TargetArch_CPP)\"" >> $@
369 @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@
371 @echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@
372 @echo "#define $(TargetOS_CPP)_HOST_OS 1" >> $@
373 @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@
374 @echo "#define BUILD_OS \"$(HostOS_CPP)\"" >> $@
375 @echo "#define HOST_OS \"$(TargetOS_CPP)\"" >> $@
376 @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@
377 ifeq "$(HostOS_CPP)" "irix"
378 @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@
379 @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@
380 @echo "#endif " >> $@
383 @echo "#define $(HostVendor_CPP)_BUILD_VENDOR 1" >> $@
384 @echo "#define $(TargetVendor_CPP)_HOST_VENDOR 1" >> $@
385 @echo "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@
386 @echo "#define BUILD_VENDOR \"$(HostVendor_CPP)\"" >> $@
387 @echo "#define HOST_VENDOR \"$(TargetVendor_CPP)\"" >> $@
388 @echo "#define TARGET_VENDOR \"$(TargetVendor_CPP)\"" >> $@
390 @echo "#endif /* __PLATFORM_H__ */" >> $@
394 STAGE_PLATFORM_H = stage1/$(PLATFORM_H)
396 STAGE_PLATFORM_H = stage2plus/$(PLATFORM_H)
399 boot :: $(STAGE_PLATFORM_H)
401 # ----------------------------------------------------------------------------
402 # Generate supporting stuff for prelude/PrimOp.lhs
403 # from prelude/primops.txt
405 SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
406 SRC_CPP_OPTS += ${GhcCppOpts}
408 prelude/primops.txt parser/Parser.y: %: %.pp stage1/$(PLATFORM_H)
409 $(CPP) $(RAWCPP_FLAGS) -P $(CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
411 primop-data-decl.hs-incl: prelude/primops.txt
412 $(GENPRIMOP) --data-decl < $< > $@
413 primop-tag.hs-incl: prelude/primops.txt
414 $(GENPRIMOP) --primop-tag < $< > $@
415 primop-list.hs-incl: prelude/primops.txt
416 $(GENPRIMOP) --primop-list < $< > $@
417 primop-has-side-effects.hs-incl: prelude/primops.txt
418 $(GENPRIMOP) --has-side-effects < $< > $@
419 primop-out-of-line.hs-incl: prelude/primops.txt
420 $(GENPRIMOP) --out-of-line < $< > $@
421 primop-commutable.hs-incl: prelude/primops.txt
422 $(GENPRIMOP) --commutable < $< > $@
423 primop-needs-wrapper.hs-incl: prelude/primops.txt
424 $(GENPRIMOP) --needs-wrapper < $< > $@
425 primop-can-fail.hs-incl: prelude/primops.txt
426 $(GENPRIMOP) --can-fail < $< > $@
427 primop-strictness.hs-incl: prelude/primops.txt
428 $(GENPRIMOP) --strictness < $< > $@
429 primop-primop-info.hs-incl: prelude/primops.txt
430 $(GENPRIMOP) --primop-primop-info < $< > $@
432 # Usages aren't used any more; but the generator
433 # can still generate them if we want them back
434 primop-usage.hs-incl: prelude/primops.txt
435 $(GENPRIMOP) --usage < $< > $@
438 #-----------------------------------------------------------------------------
442 # $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler
443 # $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler/stage$(stage)
444 # echo "stage=$(stage)" > $(BIN_DIST_DIR)/compiler/Makefile
445 # cat Makefile >> $(BIN_DIST_DIR)/compiler/Makefile
446 # $(INSTALL_DATA) package.conf.in $(BIN_DIST_DIR)/compiler/
447 # set -e; for d in stage$(stage)/*/; do $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler/$$d; done
448 # set -e; for f in $(HS_IFACES); do $(INSTALL_DATA) $$f $(BIN_DIST_DIR)/compiler/$$f; done
449 #ifneq "$(INSTALL_LIBS)" ""
450 # set -e; for f in $(INSTALL_LIBS); do $(INSTALL_DATA) $$f $(BIN_DIST_DIR)/compiler/$$f; done
452 #ifneq "$(INSTALL_PROGS)" ""
453 # set -e; for f in $(INSTALL_PROGS); do $(INSTALL_PROGRAM) $$f $(BIN_DIST_DIR)/compiler/$$f; done
455 #ifneq "$(INSTALL_LIBEXECS)" ""
456 # set -e; for f in $(INSTALL_LIBEXECS); do $(INSTALL_PROGRAM) $$f $(BIN_DIST_DIR)/compiler/$$f; done