source: Sophya/trunk/SophyaLib/Mgr/mkmflien@ 1036

Last change on this file since 1036 was 968, checked in by ansari, 25 years ago

refonte Mgr cmv 21/4/00

  • Property svn:executable set to *
File size: 2.7 KB
RevLine 
[968]1#!/bin/csh
2# $Id: mkmflien,v 1.8 2000-04-21 16:32:48 ansari Exp $
[218]3
[968]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
[218]9
[968]10#######################
11#### Decodage arguments
12#######################
13unset dst
14set cpln = "ln -sf"
15if( $?DPCDEVREP ) then
16 set dst = $DPCDEVREP/Include
17endif
18
19while( $#argv > 0 )
20 if( "$1" == "-copy" ) then
21 set cpln = "cp"
22 else
23 set dst = $1
24 endif
25 shift
26end
27
28if( ! $?dst ) then
29 echo "Variable DPCDEVREP must be set"
30 echo "OR you must give a directory for linking/copying"
31 exit -1
32endif
33
[218]34#############################################################
35#### repertoire contenant les liens a creer pour les includes
36#############################################################
37if ( ! -d $dst/ ) then
38 echo repertoire $dst inconnu
39 exit -1
40endif
41
[968]42#########################################################
43#### repertoire contenant les repertoires du code+include
44#########################################################
45pushd ../. > /dev/null
46set src = `pwd | sed 's?/tmp_mnt??'`
47set src = `echo $src | sed 's?/.automount/dapservfic/root??'`
48popd > /dev/null
[915]49
[218]50#########################################################
51### Les includes a mettre dans Include pour les Makefiles
52#########################################################
[968]53if( -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
65endif
[218]66
[968]67#############################################
[218]68#### Les includes de Blitz++ lien ds Include
[968]69#############################################
[248]70if( -d $src/Blitz ) then
[968]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
[218]86endif
87
88####################################################
89#### Les includes du code C++ a mettre dans Include
90####################################################
[968]91foreach d (`cat ../Mgr/libdirs` `cat ../Mgr/extlibdirs` PI PIext )
[218]92 if ( -d $src/$d ) then
[968]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
[218]100 endif
101end
102
103exit 0
Note: See TracBrowser for help on using the repository browser.