updateTree-1.0/README This is `updateTree', a program for managing multiple CVS build and source trees for the Glasgow Haskell Compiler. It consists of two files, Main.lhs being the main program and Config.lhs an attempt at a configuration-file library. RegexString.lhs is in the GHC misc library as of GHC 4.03; it's included here for convenience. BUILDING: ~~~~~~~~~ To build, edit the default configuration in Config.getDefaultConfig (see below), and then type: ghc-4.02 Main.lhs Config.lhs RegexString.lhs -o updateTree or similar. TREE STRUCTURE: ~~~~~~~~~~~~~~~ updateTree knows about three types of CVS tree: source trees, build trees, and local trees. A source tree is what a CVS checkout gives you, and is shared among multiple builds. A build tree is specific to a single build, and consists of symlinks into the source tree, plus the files added during the build. It also contains some symlinks to files in the local tree, which may override links to the source tree. Thus the local tree is also specific to the build. The most common use of the local tree is to contain the file mk/build.mk which specifies build-specific options. As explained in the GHC documentation, this is the best way to configure a GHC build, because it means you can delete the entire build tree without losing anything. CONFIGURATION: ~~~~~~~~~~~~~~ Once updateTree is built, updateTree -r will display the current configuration: updateTree about to perform [report] ===***=== updateTree: report ===***=== Fri Jul 2 13:47:38 UTC 1999 Configuration settings: home = /homes/kw217 archName = ix86_linux gnuArchName = i386-unknown-linux treeName = fptools-4.xx-current buildName = -w402 srcRoot = /homes/kw217/Own/fptools-4.xx-current buildRoot = /homes/kw217/Scratch/Builds/i386-unknown-linux/fptools-4.xx-current-w402 localRoot = /homes/kw217/Own/builddata/i386-unknown-linux/fptools-4.xx-current-w402 prefix = /homes/kw217/Scratch/Builds/Inst execPrefix = /homes/kw217/Scratch/Builds/Inst/ix86_linux subPkgs = ["ghc","nofib"] subDirs = ["mk","glafp-utils","ghc","nofib"] libDirs = ["std","exts","concurrent","misc","posix"] logFile = /homes/kw217/lib/update-tree.log mayNeedPass = False Fri Jul 2 13:47:38 UTC 1999 ---***--- done report ---***--- updateTree done. These parameters are derived from the default ones, specified either in Config.getDefaultConfig at build time, or in a file $HOME/.updateTreerc such as the following: # updateTree rc file # # Keith Wansbrough 1999-04-26..1999-05-05 # home=$HOME # archName=$LONGARCH # gnuArchName=i386-unknown-linux treeName=fptools-4.xx-current buildName=-w402 # srcRoot=$home/Own/$treeName # buildRoot=$home/Scratch/Builds/$gnuArchName/$treeName$buildName # localRoot=$home/Own/builddata/$gnuArchName/$treeName$buildName # prefix=$home/Scratch/Builds/Inst # execPrefix=$prefix/$archName # subPkgs=["ghc","nofib"] # subDirs=["mk","glafp-utils","ghc","nofib"] # libDirs=["std","exts","concurrent","misc","posix"] # logFile=$HOME/lib/update-tree.log # mayNeedPass=False Lines beginning with `#' are comments; blank lines are ignored. Other lines are variable=value pairs. Shell variables (such as $HOME) may be mentioned, and other variables also may be mentioned ($treeName for example). Be careful not to create cyclic dependencies! Odd things may happen. Settings in the .updateTreerc file override those built into the executable; the .updateTreerc file settings can themselves be overridden on the command line, using the syntax --set=VAR=VAL, eg, updateTree --set=buildName=-w302 OPERATION: ~~~~~~~~~~ Operation should be fairly self-explanatory. updateTree with no arguments displays the following help: updateTree: must specify at least one action Usage: updateTree [OPTION...] --set=VAR=VAL specify parameter -r --report report configuration -K --nuke-build nuke the entire build tree -N --new-source new source tree (and relink) -u --update update source tree (and relink) -l --link relink build tree to source tree -C --reconfigure do autoconf and configure -c --configure do configure -L --clean-lib make clean in ghc/lib/ -B --full-build make boot and make all -b --build make all -M --full-build-comp make boot and make all in ghc/compiler only -m --build-comp make all in ghc/compiler only -t --build-tickylib make ticky libs -i --install do install These should be fairly self-explanatory. To start a new CVS source tree, and link a build tree to it, type: updateTree -N To build GHC in the build tree, type: updateTree -CB To update the source tree to the latest sources, and then rebuild (this is my most common use of the program), type: updateTree -uCB To install the executable, type: updateTree -i To nuke the build tree and start again (without altering the source tree), type: updateTree -K updateTree -uCB Notice that a fresh build tree will be created if necessary by -u, but a fresh source tree must be explicitly created by -N. So you can start another build tree off the current source tree by typing: updateTree --set=buildName=-w302 -u At this point, you should of course modify $localRoot/mk/build.mk to set the build-specific options. Then type: updateTree -uCB (the extra -u is necessary to link any files (such as build.mk) you created in the local tree). You can speed up the build in several ways. If you don't think aclocal.m4 has changed, use a lowercase `c' rather than a capital `C'. If you don't think you need to reconfigure at all, omit it entirely. If you don't want to do make boot but just make all, use a lowercase `b'. If you want to build just in ghc/compiler, use `-m'. Have fun! *Please* send me success stories, queries, and bug reports. I'm keen to improve this. --KW 8-) 1999-07-02 -- : Keith Wansbrough, MSc, BSc(Hons) (Auckland) ------------------------: : PhD Student, Computer Laboratory, University of Cambridge, England. : : (and recently of the University of Glasgow, Scotland. [><] ) : : Native of Antipodean Auckland, New Zealand: 174d47' E, 36d55' S. : : http://www.cl.cam.ac.uk/users/kw217/ mailto:kw217@cl.cam.ac.uk : :---------------------------------------------------------------------: