On Mon, 23 Sep 2013 03:04:42 +0200 Tina Harriott wrote:
> How do I rebuild a single object and relink all dependencies if I just
> changed one source file in ast-ksh or ast-open? I am totally new to
> ./bin/package make and nmame

as you suspect "bin/package make" is for (re)buiding packages on the largest ast
scale, typically right after after "bin/package read" or applying a patch

to do this the way dgk and I do you will need nmake
the smallest package containing nmake is ast-base
its also in ast-open

check out some docs from the nav bar at
        www.research.att.com/sw/download/
>> download => viewpaths <<
        this explains how the ast build keeps generated files separate from 
source

>> download => FAQ => build <<
        general info on building

>> download => FAQ => nmake <<
        more specific hints on nmake

and quick start hints right here

* run this to set up the build env

        bin/package use

* add this alias to navigate the viewpath hierarchy
  cv == "change view" -- if you ar in the upper arch view it cd's to the lower
  source and vice-versa

        alias cv='if [[ $PWD == $A?(/*) ]];then cd $A $P;else cd -;fi'

* suppose you are debugging changes to src/cmd/ksh93/sh/arith.c

        # cd to the arch directory
        cd ksh93
        # make an arch dir to hold the edited arith.c
        mkdir sh
        # cd to the source view
        cv
        # copy sh/arith.c to the arch view for edit/build/debug cycle
        cp sh/arith.c ~-/sh/

        # or at this point you could edit the master source sh/arith.c
        # but this is in general not a good idea because your edits
        # could get clobbered by a "bin/package read" or patch update
        # done from another window -- very easy to do with multiple
        # windows / desltop workspaces -- and if you have a setup like me
        # where my home dir holds on copy of the master source for mutiple
        # machines of varying HOSTTYPEs really very easy to clobber

        # cd to the arch view
        cv
        # to make it easier open a window for editing and another for 
build/debug
        
        # edit sh/arith.c
        your-favorite editor sh/arith.c

        # build ksh -- only for ksh must you set COSHELL -- otherwise the
        # build may attempt to clobber a running ksh executable
        COSHELL=path-to-some-sh-other-than-$SHELL nmake all

        # if the build worked you will have a new ./ksh to play with

        # at some point you may want to install ksh (within the build tree)
        # for testing with the other packages
        COSHELL=path-to-some-sh-other-than-$SHELL nmake install

        # the final step for me on the master build / source tree is
        # this appends a unified diff to the OFFICIAL file in the source view
        # and then moves all build level view source changes to the source view
        nmake official

this should get you started

_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to