Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:37

0001 #!/bin/tcsh
0002 ##############################################################################################
0003 # Create default doc/xxx.doc file for a CMSSW package, assuming that none currently exists.  #
0004 # You should run it in the package's doc/ directory.                                         #
0005 #                                                                                            #
0006 # You are recommended to add further documentation by hand to this default outline.          #
0007 #                                                                                            #
0008 # Author: Ian Tomalin                                                                        #
0009 # Date  : 3rd April 2006                                                                     #
0010 # Update: Mantas Stankevicius                                                                #
0011 # Date  : 2013 June 7                                                                        #
0012 ##############################################################################################
0013 
0014 # Check that we are in the doc/ directory
0015 set checkDir = `echo $PWD | awk -F/ '{print $NF}'`
0016 if ( `basename $PWD` != "doc" ) then
0017   echo "You should be in the doc/ directory of the package before running this script."
0018   exit 1
0019 endif
0020 
0021 # Get the package and project names.
0022 set dirRoot     = `dirname $PWD`
0023 set packageName = `basename $dirRoot`
0024 set dirRoot2    = `dirname $dirRoot`
0025 set projectName = `basename $dirRoot2`
0026 
0027 # Hence define name of .doc file.
0028 set fileName = ${packageName}.doc
0029 
0030 # Check if .doc file already exists.
0031 
0032 if ( -e $fileName ) then
0033 
0034   echo "$fileName already exists, so will do nothing." 
0035   echo "Delete it by hand if you wish to replace it."
0036 
0037 else
0038 
0039   echo "Creating $fileName"
0040 
0041 #  set Date = `date +%D`
0042 
0043 # Produce .doc file.
0044 cat > $fileName <<@EOF
0045 
0046 /*!
0047 
0048 \page ${projectName}_${packageName} Package ${projectName}/${packageName}
0049 
0050 
0051 \section desc Description
0052 <!-- Short description of what this package is supposed to provide -->
0053 
0054 (THE PACKAGE ADMINISTATOR SHOULD REPLACE THIS SENTENCE WITH HAND-WRITTEN DOCUMENTATION SAYING WHAT THE PACKAGE DOES.)
0055 
0056 \subsection interface Public interface
0057 <!-- List the classes that are provided for use in other packages (if any) -->
0058 
0059 @EOF
0060 
0061 # Include list of interface classes here, stripping of directory name and .h 
0062 ls -1 ../interface/*.h | awk -F/interface/ '{print $2}' | awk -F. '{print "- " $1}' >> $fileName
0063 
0064 # Remainder of .doc file.
0065 
0066 cat >> $fileName <<@EOF
0067 
0068 
0069 \subsection pluginai Plugins
0070 <!-- List the plugins that are provided for use in other packages (if any) -->
0071 
0072 @EOF
0073 
0074 # Include list of plugins classes here, stripping of directory name and .h 
0075 ls -1 ../plugins/*.h | awk -F/plugins/ '{print $2}' | awk -F. '{print "- " $1}' >> $fileName
0076 
0077 # Remainder of .doc file.
0078 
0079 cat >> $fileName <<@EOF
0080 
0081 
0082 
0083 \subsection modules Modules
0084 <!-- Describe modules implemented in this package and their parameter set -->
0085 
0086 @EOF
0087 
0088 #Include list of modules here, stripping DEFINE_FWK_MODULE keyword.
0089 grep -h '^DEFINE_FWK_MODULE' ../src/*.cc | awk -F'(' '{print $2}' | awk -F ')' '{print "- " $1}' >> $fileName
0090 grep -h '^DEFINE_FWK_EVENTSETUP_MODULE' ../src/*.cc | awk -F'(' '{print $2}' | awk -F ')' '{print "- " $1}' >> $fileName
0091 
0092 # Remainder of .doc file.
0093 
0094 cat >> $fileName <<@EOF
0095 
0096 \subsection tests Unit tests and examples
0097 <!-- Describe cppunit tests and example configuration files -->
0098 Unknown
0099 
0100 \section status Status and planned development
0101 <!-- e.g. completed, stable, missing features -->
0102 Unknown
0103 
0104 <hr>
0105 Last updated:
0106 @DATE@  Author: computer-generated.
0107 */
0108 
0109 @EOF