Changes between Version 7 and Version 8 of Building/Rebuilding


Ignore:
Timestamp:
Mar 31, 2009 9:23:43 AM (5 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/Rebuilding

    v7 v8  
    33= How do I rebuild GHC after updating or changing it? = 
    44 
    5 Note that after pulling new changes, the safest way to continue working is to clean the build tree and start from scratch. 
    6  
    7 In fact, it's best to clean the tree ''before'' pulling, because the new code may not know how to clean the old build tree: 
     5To pull new changes: 
    86 
    97{{{ 
    10   $ make distclean 
     8$ sh darcs-all pull 
     9$ sh darcs-all get 
    1110}}} 
    1211 
    13 Next you need to pull any new patches: 
     12(the second step is required in the event that new packages or repositories have been added to GHC). 
     13 
     14After pulling changes, the following sequence should be enough to update your build: 
    1415 
    1516{{{ 
    16   $ sh darcs-all pull 
     17$ sh boot 
     18$ ./configure 
     19$ make 
    1720}}} 
    1821 
    19 But there may have been new subrepos added to the build, so you need to grab them: 
     22== Things that might go wrong == 
    2023 
    21 {{{ 
    22   $ sh darcs-all get 
    23 }}} 
    24  
    25 Now build the tree as normal: 
    26  
    27 {{{ 
    28   $ sh boot 
    29   $ ./configure 
    30   $ make 
    31 }}} 
    32  
    33 You may be able to shortcut this procedure if you know what you're doing, or you could just take a risk and if anything goes wrong fall back to the above procedure. 
    34  
    35 -------------------- 
    36 Notes (things that might go wrong):  
    37  
    38  - watch out for distclean not cleaning properly, especially if you haven't updated for a long time, darcs-all/packages list changing due to darcs-all (meaning you need to re-run darcs-all with the now up-to-date information), missing/new packages, darcs warnings; keeping a log of darcs-all's and make's output can be helpful 
    39  
    40  - unsupported: I'm using a slightly modified darcs-all script (see attached diff) that tries to alert me to the darcs-all issues listed above by summarizing them at the end of the run, or aborting the run if it needs to be restarted due to update 
     24 * when files move around in the tree, this procedure will leave old files lying around.  The build system typically won't know how to clean up the old files.  Usually they won't cause a problem, but in the event that they do it's easy enough to wipe your build tree and start afresh, especially if you use [wiki:Building/Using#Sourcetreesandbuildtrees a separate build tree].