Wait, the diff was not against the original nbuild ...

# diff -u nbuild_orig nbuild_my-debug
--- nbuild_orig Sat Jun  7 16:26:43 2008
+++ nbuild_my-debug     Sat Jun  7 19:52:03 2008
@@ -1540,7 +1540,7 @@
 # Additional user vars may be specified on the command line.
 #
 Clear_env() {
-       for v in Nothing $(/bin/env | sed -ne 's/=.*//p'); do
+       for v in Nothing $(/bin/env | egrep '^[A-Z]' | sed -ne
's/=.*//p'); do
                case "$v" in

MAKE|MAKEFLAGS|MAKETOOLS|HOME|LOGNAME|USER|OS|TEAMWARE|OPTHOME|WEBBASE)
                        ;;
@@ -1746,6 +1746,8 @@
 typeset +x CAT MV RM CP

 Set_env "$@"
+set
+exit
 Main
 Cleanup
 exit $XSTAT



Piotr Jasiukajtis / estibi pisze:
> Binu Jose Philip pisze:
>> On Sat, Jun 7, 2008 at 11:25 AM, Piotr Jasiukajtis / estibi
>> <estseg at gmail.com> wrote:
>>> Ok, I modified nbuild and write the script which exports all variables
>>> made by nbuild.
>>> Now I can use 'dmake' directly.
>> Great. It would be nice if you could share the script. We have
>> internal scripts that does the same, Of the top of my head, I
>> don't know if those were open sourced too.
> Ok, it's far from perfect, but it works ;) and sorry for the /bin/bash
> 
> 
> 
> # cat my_export_env
> #! /bin/bash
> 
> for i in `/opt/scbld/bin/nbuild_my-debug | sed '/PS2/d' | sed '/PS4/d' |
> sed '/PPID/d' | \
>         sed '/PPID/d' | sed "/^'$/d" | sed '/IFS/d' | sed '/MAKETYPE/d'
> | sed '/ENVLDLIBS1/d' | \
>         sed '/nbuild_my-debug/d'`
> do
>         echo "ENV: ${i}" && export "${i}"
> done
> 
> export MAKETYPE='parallel dmake'
> export ENVLDLIBS1='-L${CODEMGR_WS}/proto/root_i386/usr/lib
> -L${CODEMGR_WS}/proto/root_i386/usr/ccs/lib'
> 
> mkdir ${DMAKE_ODIR} ${NBTMPDIR}
> 
> # EOF
> 
> 
> 
> 
> 
> /opt/scbld/bin# diff -u nbuild nbuild_my-debug
> --- nbuild      Sat Jun  7 16:28:58 2008
> +++ nbuild_my-debug     Sat Jun  7 19:52:03 2008
> @@ -1746,6 +1746,8 @@
>  typeset +x CAT MV RM CP
> 
>  Set_env "$@"
> +set
> +exit
>  Main
>  Cleanup
>  exit $XSTAT
> 
> 
> 
> 
> 
> # pwd
> /export/code/ohac/ohac
> 
> # . ./my_export_env
> ENV: ATLOG=/export/code/ohac/ohac+5.11+i386/log
> ENV: CAT=/bin/cat
> ENV: CHK=chk
> ENV: CODEMGR_WS=/export/code/ohac/ohac+5.11+i386
> ENV: CP=/bin/cp
> ENV: DEFAULT_CODEMGR_WS=/export/code/ohac/ohac+5.11+i386
> [...]
> 
> 
> # cd usr/src/
> # dmake -ek install
> Copying closed binaries from
> /opt/scbld/ref_proto/ohac-closed-bins/Sol_11/root_i386
> install -s -d -m 0775
> /export/code/ohac/ohac+5.11+i386/proto/Sol_11/root_i386/etc
> install -s -d -m 0775
> /export/code/ohac/ohac+5.11+i386/proto/Sol_11/root_i386/etc/cluster
> install -s -d -m 0775
> /export/code/ohac/ohac+5.11+i386/proto/Sol_11/root_i386/etc/cluster/ccr
> install -s -d -m 0775
> /export/code/ohac/ohac+5.11+i386/proto/Sol_11/root_i386/etc/cluster/clpl
> install -s -d -m 0775
> [...]
> 


-- 
Regards,
Piotr Jasiukajtis | estibi | SCA OS0072
http://estseg.blogspot.com

Reply via email to