help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help on Code Review.


From: Ramanathan
Subject: Help on Code Review.
Date: Mon, 12 May 2003 13:09:20 +0530

Hi All ,
 Could you pls. review the following code and give me your valuable feed
back ?

 Brief idea of what code does :

 cd to each sub dir in /vob/vob1 and
 copy sub-dirs / files to /auto/cwtools
 and retain permissions.

gnumake := /auto/cwtools/contrib/buildtools/gnumkae3.79.1/bin/make
export gnumake
dist_area := /auto/cwtools
dirs := retools_dist
default_local::runall
runall::
        for dir in $(dirs); do \
                (echo "---Now working in $$dir---");\
                (if [ ! -d $(dist_area)/$$dir ]; then mkdir -p
$(dist_area)/$$dir; fi;);\
                (cd $$dir; cp -rp * $(dist_area)/$$dir);\
                (chmod -R 755 $(dist_area)/$$dir);\
                (echo "---Completed working in $$dir---");\
        done

 I wanted to know how this can be done using foreach function in make (to be
honest I tried this first and then
 avoided for lack of sufficient knowledge to proceed further).

TIA,
Rams





reply via email to

[Prev in Thread] Current Thread [Next in Thread]