| 1 | #!/bin/csh | 
|---|
| 2 | # $Id: mkmflien,v 1.8 2000-04-21 16:32:48 ansari Exp $ | 
|---|
| 3 |  | 
|---|
| 4 | # WARNING : mkmflien has to be runned FROM Mgr/ | 
|---|
| 5 | # usage : mkmflien [-c] [dir_dest] | 
|---|
| 6 | #  -copy : includes are copied (if not they are linked) | 
|---|
| 7 | #  dir_dest : link/copy to dir_dest/ | 
|---|
| 8 | #             default : $DPCDEVREP/Include | 
|---|
| 9 |  | 
|---|
| 10 | ####################### | 
|---|
| 11 | #### Decodage arguments | 
|---|
| 12 | ####################### | 
|---|
| 13 | unset dst | 
|---|
| 14 | set cpln = "ln -sf" | 
|---|
| 15 | if( $?DPCDEVREP ) then | 
|---|
| 16 | set dst = $DPCDEVREP/Include | 
|---|
| 17 | endif | 
|---|
| 18 |  | 
|---|
| 19 | while( $#argv > 0 ) | 
|---|
| 20 | if( "$1" == "-copy" ) then | 
|---|
| 21 | set cpln = "cp" | 
|---|
| 22 | else | 
|---|
| 23 | set dst = $1 | 
|---|
| 24 | endif | 
|---|
| 25 | shift | 
|---|
| 26 | end | 
|---|
| 27 |  | 
|---|
| 28 | if( ! $?dst ) then | 
|---|
| 29 | echo "Variable DPCDEVREP must be set" | 
|---|
| 30 | echo "OR you must give a directory for linking/copying" | 
|---|
| 31 | exit -1 | 
|---|
| 32 | endif | 
|---|
| 33 |  | 
|---|
| 34 | ############################################################# | 
|---|
| 35 | #### repertoire contenant les liens a creer pour les includes | 
|---|
| 36 | ############################################################# | 
|---|
| 37 | if ( ! -d $dst/ ) then | 
|---|
| 38 | echo repertoire $dst inconnu | 
|---|
| 39 | exit -1 | 
|---|
| 40 | endif | 
|---|
| 41 |  | 
|---|
| 42 | ######################################################### | 
|---|
| 43 | #### repertoire contenant les repertoires du code+include | 
|---|
| 44 | ######################################################### | 
|---|
| 45 | pushd ../. > /dev/null | 
|---|
| 46 | set src = `pwd | sed 's?/tmp_mnt??'` | 
|---|
| 47 | set src = `echo $src | sed 's?/.automount/dapservfic/root??'` | 
|---|
| 48 | popd       > /dev/null | 
|---|
| 49 |  | 
|---|
| 50 | ######################################################### | 
|---|
| 51 | ### Les includes a mettre dans Include pour les Makefiles | 
|---|
| 52 | ######################################################### | 
|---|
| 53 | if( -d $src/Mgr ) then | 
|---|
| 54 | cd $src/Mgr/. | 
|---|
| 55 | echo $cpln from Mgr | 
|---|
| 56 | set FILE = ( Makefile.h Makefile.slb MakefileUser.h ) | 
|---|
| 57 | pushd $dst/. > /dev/null | 
|---|
| 58 | rm -f $FILE | 
|---|
| 59 | foreach f ( $FILE ) | 
|---|
| 60 | if( -e $src/Mgr/$f ) then | 
|---|
| 61 | $cpln $src/Mgr/$f ./ | 
|---|
| 62 | endif | 
|---|
| 63 | end | 
|---|
| 64 | popd       > /dev/null | 
|---|
| 65 | endif | 
|---|
| 66 |  | 
|---|
| 67 | ############################################# | 
|---|
| 68 | ####  Les includes de Blitz++ lien ds Include | 
|---|
| 69 | ############################################# | 
|---|
| 70 | if( -d $src/Blitz ) then | 
|---|
| 71 | cd $src/Blitz/. | 
|---|
| 72 | foreach d ( blitz blitz/meta blitz/array ) | 
|---|
| 73 | if( -d $d ) then | 
|---|
| 74 | echo $cpln from Blitz/$d | 
|---|
| 75 | if( ! -d $dst/$d ) mkdir $dst/$d | 
|---|
| 76 | pushd $d > /dev/null | 
|---|
| 77 | set FILE = ( *.h *.cc ) | 
|---|
| 78 | popd     > /dev/null | 
|---|
| 79 | pushd $dst/$d/. > /dev/null | 
|---|
| 80 | rm -f $FILE | 
|---|
| 81 | $cpln $src/Blitz/$d/*.h ./ | 
|---|
| 82 | $cpln $src/Blitz/$d/*.cc ./ | 
|---|
| 83 | popd       > /dev/null | 
|---|
| 84 | endif | 
|---|
| 85 | end | 
|---|
| 86 | endif | 
|---|
| 87 |  | 
|---|
| 88 | #################################################### | 
|---|
| 89 | ####  Les includes du code C++ a mettre dans Include | 
|---|
| 90 | #################################################### | 
|---|
| 91 | foreach d (`cat ../Mgr/libdirs` `cat ../Mgr/extlibdirs` PI PIext  ) | 
|---|
| 92 | if ( -d $src/$d ) then | 
|---|
| 93 | cd $src/$d/. | 
|---|
| 94 | echo $cpln from $d | 
|---|
| 95 | set FILE = ( *.h ) | 
|---|
| 96 | pushd $dst/. > /dev/null | 
|---|
| 97 | rm -f $FILE | 
|---|
| 98 | $cpln $src/$d/*.h ./ | 
|---|
| 99 | popd       > /dev/null | 
|---|
| 100 | endif | 
|---|
| 101 | end | 
|---|
| 102 |  | 
|---|
| 103 | exit 0 | 
|---|