source: Sophya/trunk/SophyaLib/BuildMgr/mkdepend.csh@ 3845

Last change on this file since 3845 was 2739, checked in by cmv, 20 years ago

suite nouvelle structure cmv 20/05/05

  • Property svn:executable set to *
File size: 750 bytes
RevLine 
[2725]1#!/bin/csh
2# Pour ecrire les dependances a l'ecran
3
4if( $#argv < 1) then
5 echo ' Usage: mkdepend.csh [-sbase SOPHYABASE] nom_fichier.{cc,c,f}'
6 exit -1
7endif
8
9set file = $argv[$#argv]
10while ( $#argv > 0 )
11 if( "$1" == "-sbase" ) then
12 setenv SOPHYABASE $2
13 shift
14 endif
15 shift
16end
17
18if( ! $?SOPHYABASE ) then
19 echo 'ERROR: define SOPHYABASE or use script arguments'
20 exit -2
21endif
22
[2734]23set inc = `echo $SOPHYABASE/include | sed "s?//?/?g"`
[2725]24set nomsys = `uname`
25set ext = $file:e
26
27if( "$ext" == "cc" || "$ext" == "cxx" || "$ext" == "C" || "$ext" == "c" ) then
28 gcc -MM -D$nomsys -I$inc $file \
29 | sed -e 's/.*\.o/\$(SOPHYAOBJP)&/' \
30 | sed -e 's?'$inc/'?$(SOPHYAINCP)?g'
31else
[2739]32 echo "extension $ext not treated"
[2725]33endif
34
35exit 0
Note: See TracBrowser for help on using the repository browser.