source: Sophya/trunk/ArchTOIPipe/smkmflien@ 2398

Last change on this file since 2398 was 1980, checked in by ansari, 23 years ago

fichiers SMakefile(s) et script (smkmxxx) pour la construction d'ArchTOIPipe avec SOPHYA - base sur les scripts SOPHYA - Reza 03/05/2002

  • Property svn:executable set to *
File size: 2.8 KB
RevLine 
[1980]1#!/bin/csh
2# $Id: smkmflien,v 1.1 2002-05-03 15:05:31 ansari Exp $
3
4# ################## ArchTOIPipe-With-Sophya ####################
5#Adaptation SOPHYA/Mgr/mkmflien a smkmflien pour ArchTOIPipe
6# Reza - Mai 2002
7# usage : smkmflien [-copy] [dir_dest]
8# -copy : includes are copied (if not they are linked)
9# -clean : after copy/link file are deleted if not existing (empty link)
10# dir_dest : link/copy to dir_dest/
11# default : $ARCHPDEVREP/Include
12
13#######################
14#### Decodage arguments
15#######################
16unset dst
17set cpln = "ln -sf"
18unset clln
19if( $?ARCHPDEVREP ) then
20 set dst = $ARCHPDEVREP/Include
21endif
22
23while( $#argv > 0 )
24 if( "$1" == "-copy" ) then
25 set cpln = "cp"
26 else if( "$1" == "-clean" ) then
27 set clln
28 else
29 set dst = $1
30 endif
31 shift
32end
33
34if( ! $?dst ) then
35 echo "Variable ARCHPDEVREP must be set"
36 echo "OR you must give a directory for linking/copying"
37 exit -1
38endif
39
40#############################################################
41#### repertoire contenant les liens a creer pour les includes
42#############################################################
43if ( ! -d $dst/ ) then
44 echo repertoire $dst inconnu
45 exit -1
46endif
47
48#########################################################
49#### repertoire contenant les repertoires du code+include
50#########################################################
51#RZCOMM--- pushd ../. > /dev/null
52set src = `pwd | sed 's?/tmp_mnt??'`
53set src = `echo $src | sed 's?/.automount/dapservfic/root??'`
54#RZCOMM--- popd > /dev/null
55
56#########################################################
57### Les includes a mettre dans Include pour les Makefiles
58#########################################################
59if( -d $src ) then
60 cd $src/.
61 echo $cpln from src
62 set FILE = ( SMakefile.h )
63 pushd $dst/. > /dev/null
64 rm -f $FILE
65 foreach f ( $FILE )
66 if( -e $src/$f ) then
67 $cpln $src/$f ./
68 endif
69 end
70 popd > /dev/null
71endif
72
73
74####################################################
75#### Les includes du code C++ a mettre dans Include
76####################################################
77foreach d (Kernel Processors ProcWSophya )
78 if ( -d $src/$d ) then
79 cd $src/$d/.
80 echo $cpln from $d
81 set FILE = ( *.h )
82 pushd $dst/. > /dev/null
83 rm -f $FILE
84 $cpln $src/$d/*.h ./
85 popd > /dev/null
86 endif
87end
88
89############################################
90#### Le cas particulier de sophya_config.h
91############################################
92if ( -e $src/sophya_config.h ) then
93 echo $cpln from $src/sophya_config.h
94 $cpln $src/sophya_config.h $dst/config.h
95endif
96
97###############################
98#### Nettoyage des liens vides
99###############################
100if( $?clln ) then
101 foreach f ( $dst/*.h )
102 if( ! -e $f ) then
103 echo remove empty link : $f
104 rm -f $f
105 endif
106 end
107endif
108
109exit 0
Note: See TracBrowser for help on using the repository browser.