| Last change
 on this file since 3430 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 | 
      
      
| Line |  | 
|---|
| 1 | #!/bin/csh | 
|---|
| 2 | # Pour ecrire les dependances a l'ecran | 
|---|
| 3 |  | 
|---|
| 4 | if( $#argv < 1) then | 
|---|
| 5 | echo ' Usage: mkdepend.csh [-sbase SOPHYABASE] nom_fichier.{cc,c,f}' | 
|---|
| 6 | exit -1 | 
|---|
| 7 | endif | 
|---|
| 8 |  | 
|---|
| 9 | set file = $argv[$#argv] | 
|---|
| 10 | while ( $#argv > 0 ) | 
|---|
| 11 | if( "$1" == "-sbase" ) then | 
|---|
| 12 | setenv SOPHYABASE $2 | 
|---|
| 13 | shift | 
|---|
| 14 | endif | 
|---|
| 15 | shift | 
|---|
| 16 | end | 
|---|
| 17 |  | 
|---|
| 18 | if( ! $?SOPHYABASE ) then | 
|---|
| 19 | echo 'ERROR:  define SOPHYABASE or use script arguments' | 
|---|
| 20 | exit -2 | 
|---|
| 21 | endif | 
|---|
| 22 |  | 
|---|
| 23 | set inc = `echo $SOPHYABASE/include | sed "s?//?/?g"` | 
|---|
| 24 | set nomsys = `uname` | 
|---|
| 25 | set ext = $file:e | 
|---|
| 26 |  | 
|---|
| 27 | if( "$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' | 
|---|
| 31 | else | 
|---|
| 32 | echo "extension $ext not treated" | 
|---|
| 33 | endif | 
|---|
| 34 |  | 
|---|
| 35 | exit 0 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.