summaryrefslogtreecommitdiff
path: root/rules/hi-rule.mk
Commit message (Collapse)AuthorAgeFilesLines
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-3/+3
|
* Add another chapter to the hi-rule novelIan Lynagh2013-02-221-1/+19
|
* Add separate rules for all .hi files, rather than using %.hi styleIan Lynagh2013-02-221-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a file is created by a %.hi rule, and the actual filename isn't mentioned in the makefiles, then make will treat it as an 'intermediate file' and delete it when it is finished. We'd been lucky so far that .hi files weren't actually being built due to our rules (but rather, as side-effects of the .o rules). However, when using -dynamic-too to build, we had a rule $1/$2/build/%.$$(dyn_osuf): $1/$2/build/%.$$(v_hisuf) which meant that building a .dyn_o could cause the rule for the corresponding .hi to be used, and the .hi may then be deleted later on. This was exacerbated by a bug in GNU make 3.81 which caused make to enter an infinite loop if running in parallel mode: http://lists.gnu.org/archive/html/bug-make/2013-02/msg00020.html Adding .SECONDARY: would stop make from deleting the intermediate files. However, this caused make to take a pathologically long time (it appeared to be live-locked for 2 hours before I killed it) with our build system. This patch instead creates lines like $(eval $(call hi-rule,libraries/base/dist-install/build/Unsafe/Coerce.dyn_hi libraries/base/dist-install/build/Unsafe/Coerce.hi : %hi: %o libraries/base/Unsafe/Coerce.hs)) in the .depend files, which results in a rule like libraries/base/dist-install/build/Unsafe/Coerce.dyn_hi libraries/base/dist-install/build/Unsafe/Coerce.hi : %hi: %o libraries/base/Unsafe/Coerce.hs ; which, as the files are now all named in the makefiles, means they are no longer intermediate files so do not get deleted.
* Build system: Add ExtraMakefileSanityChecks for extra safetyIan Lynagh2013-01-111-6/+15
| | | | | | | Whether we check that .hi files have actually been created is now controlled by $(ExtraMakefileSanityChecks) (defaults to NO). Also updated comments about the .hi rule.
* Enable the .hi file sanity check when not on WindowsIan Lynagh2013-01-101-9/+28
| | | | | We don't want the overhead of spawning a shell on Windows, but on other platforms it's a useful sanity check.
* Make the rule for .hi files depend on the .hs/.lhs filesIan Lynagh2013-01-101-3/+5
| | | | | make thought that it could make a .hi file for the C files in libraries, which was causing problems when using dynamic-too.
* Optimise the %.hi : %.o ruleSimon Marlow2009-06-231-17/+54
| | | | | | | | | | | | | | | Previously this rule had a sanity check for the existence of the .o file. However, the sanity check is expensive, especially on Windows, because it requires spawning a shell. So now we use an empty command here. This change reduced the time to do 'make' in an up-to-date tree on Windows from 33s to 16s for me. (the actual saving depends on how much rebuilding you've been doing, and how many .hi files are older than their .o files). The comments in this file now describe various versions of the rule that don't work.
* Remove some redundant code from hi-rule.mkIan Lynagh2009-05-301-2/+0
|
* Add a header to all build system files:Simon Marlow2009-04-281-0/+12
| | | | | | | | | | | | | | # ----------------------------------------------------------------------------- # # (c) 2009 The University of Glasgow # # This file is part of the GHC build system. # # 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 # # -----------------------------------------------------------------------------
* GHC new build system megapatchIan Lynagh2009-04-261-0/+25