| [891] | 1 | #!/bin/csh | 
|---|
|  | 2 | ################################################### | 
|---|
|  | 3 | if( $#argv >= 1 ) then | 
|---|
|  | 4 | if( "$1" == "-h" ) then | 
|---|
|  | 5 | echo "mkmf [module1] [module2] [...]" | 
|---|
|  | 6 | echo "  generate documentation for all Sophya" | 
|---|
|  | 7 | echo "  or only for module [module]" | 
|---|
|  | 8 | exit 0 | 
|---|
|  | 9 | endif | 
|---|
|  | 10 | endif | 
|---|
|  | 11 |  | 
|---|
|  | 12 | ########################################## | 
|---|
|  | 13 | ######## Test de la configuration ######## | 
|---|
|  | 14 | ########################################## | 
|---|
|  | 15 |  | 
|---|
|  | 16 | # mydoxy.conf | 
|---|
|  | 17 | cp dox_sophya.conf mydoxy.conf | 
|---|
|  | 18 | foreach n ( 1 2 3 4 5 ) | 
|---|
|  | 19 | echo " " >> mydoxy.conf | 
|---|
|  | 20 | end | 
|---|
|  | 21 |  | 
|---|
|  | 22 | # doxygen ? | 
|---|
|  | 23 | which doxygen >! /dev/null | 
|---|
|  | 24 | if( $status != 0 ) then | 
|---|
|  | 25 | echo 'ERROR: doxygen is not installed...' | 
|---|
|  | 26 | exit -1 | 
|---|
|  | 27 | endif | 
|---|
|  | 28 |  | 
|---|
|  | 29 | # doxysearch ? | 
|---|
|  | 30 | which doxysearch >! /dev/null | 
|---|
|  | 31 | if( $status != 0 ) then | 
|---|
|  | 32 | echo 'ERROR: doxysearch is not installed...' | 
|---|
|  | 33 | exit -2 | 
|---|
|  | 34 | else | 
|---|
|  | 35 | set s = `which doxysearch` | 
|---|
|  | 36 | echo 'doxysearch is installed in :' | 
|---|
|  | 37 | echo $s:h | 
|---|
|  | 38 | echo 'mkmf will automatically update the config file.' | 
|---|
|  | 39 | echo "BIN_ABSPATH = $s:h" >>  mydoxy.conf | 
|---|
|  | 40 | grep 'BIN_ABSPATH' mydoxy.conf | grep -v ^\# | 
|---|
|  | 41 | endif | 
|---|
|  | 42 |  | 
|---|
|  | 43 | # partial doc ? | 
|---|
|  | 44 | if( $#argv >= 1 ) then | 
|---|
|  | 45 | echo Partial doc generation : | 
|---|
|  | 46 | set lf = | 
|---|
|  | 47 | foreach f ( $* ) | 
|---|
|  | 48 | echo "... adding ../$f to INPUT" | 
|---|
|  | 49 | set lf = ( ../$f $lf ) | 
|---|
|  | 50 | end | 
|---|
|  | 51 | echo "INPUT = $lf" >>  mydoxy.conf | 
|---|
|  | 52 | grep 'INPUT = ' mydoxy.conf | grep -v ^\# | tail -1 | 
|---|
|  | 53 | endif | 
|---|
|  | 54 |  | 
|---|
|  | 55 | ######################################### | 
|---|
|  | 56 | ######## Creation de la Makefile ######## | 
|---|
|  | 57 | ######################################### | 
|---|
|  | 58 |  | 
|---|
|  | 59 | rm -f Makefile | 
|---|
|  | 60 | touch Makefile | 
|---|
|  | 61 | chmod +x Makefile | 
|---|
|  | 62 | cat >> Makefile << EOF_ | 
|---|
|  | 63 | all: doc | 
|---|
|  | 64 |  | 
|---|
|  | 65 | clean: | 
|---|
|  | 66 | rm -rf html latex man rtf *.o dox_filter | 
|---|
|  | 67 |  | 
|---|
|  | 68 | doc: filter | 
|---|
|  | 69 | doxygen mydoxy.conf | 
|---|
|  | 70 |  | 
|---|
|  | 71 | filter: dox_filter | 
|---|
|  | 72 |  | 
|---|
|  | 73 | dox_filter : dox_filter.o | 
|---|
|  | 74 |  | 
|---|
|  | 75 | dox_filter.o : dox_filter.c | 
|---|
|  | 76 |  | 
|---|
|  | 77 | EOF_ | 
|---|
|  | 78 |  | 
|---|
|  | 79 | exit 0 | 
|---|