1 # -----------------------------------------------------------------------------
3 # (c) 2009 The University of Glasgow
5 # This file is part of the GHC build system.
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
11 # -----------------------------------------------------------------------------
14 # Here's an interesting rule!
15 # The .hi file depends on the .o file,
16 # so if the .hi file is dated earlier than the .o file (commonly the case,
17 # when interfaces are stable) this rule just makes sure that the .o file,
18 # is up to date. Then it does nothing to generate the .hi file from the
19 # .o file, because the act of making sure the .o file is up to date also
20 # updates the .hi file (if necessary).
22 define hi-rule # $1 = way
23 %.$$($1_hisuf) : %.$$($1_osuf)
24 @if [ ! -f $$@ ] ; then \
25 echo Panic! $$< exists, but $$@ does not.; \
30 %.$$($1_way_)hi-boot : %.$$($1_way_)o-boot
31 @if [ ! -f $$@ ] ; then \
32 echo Panic! $$< exists, but $$@ does not.; \