prep_kdevelop.php

Go to the documentation of this file.
00001 #!/usr/bin/php -q
00002 <?php
00003 //apt-get install php5.cli
00043 $makefile_header= '#Dummy Makefile.am for Elphel camera KDevelop project';
00044 $HOME_DIR=        trim(shell_exec('cd ~ ; pwd'));
00045 $PWD=             trim(shell_exec('pwd'));
00046 $TAG_FILE=        "$PWD/tags";
00047 $TAG_EXCLUDE_FILE="$PWD/ctags_excludes";
00048 //$KDEVELOP_RC_FILE='~/.kde/share/config/kdeveloprc'; //'~/' does not work with file_exists :-(
00049 $KDEVELOP_RC_FILE="$HOME_DIR/.kde/share/config/kdeveloprc";
00050 $PROJECT_KDEVELOP='elphel353.kdevelop';
00051 $DOXYFILE=        'Doxyfile';
00052 $REVISION=        trim(shell_exec('grep "JIMAGEID =" Makefile | sed -n -e "s/JIMAGEID = //p"'));
00053 $HWID=            trim(shell_exec('grep "HWID =" Makefile | sed -n -e "s/HWID = //p"'));
00054 $DOXYGEN_EXTENSIONS=array ('c',  'cc',  'cxx','cpp', 'c++','d',  'java','ii', 'ixx',
00055                            'ipp','i++', 'inl','h',   'hh', 'hxx','hpp', 'h++','idl',
00056                            'odl','cs',  'php','php3','inc','m',  'mm',  'dox','py',
00057                            'C',  'CC',  'C++','II',  'I++','H',  'HH',  'H++','CS',
00058                            'PHP','PHP3','M',  'MM',  'PY');
00059 
00061 $PROJECT_SOURCES =array ('c', 'cc',  'cxx','cpp', 'c++', 'C',  'CC',  'C++');
00062 $PROJECT_HEADERS =array ('h', 'H',);
00063 $PROJECT_SCRIPTS =array ('php', 'php3', 'PHP', 'PHP3');
00064 
00065 
00067   if (phpversion() < '5.0.0') {
00068     echo "You need PHP version of at least 5.0.0 to run $argv[0]\n";
00069     exit (1);
00070   }
00071   if ((array_search("--verbose",$argv)===false) && (array_search("-v",$argv)===false)) {
00072     echo "You may use --verbose or -v command line option to show information about created Makefile.am files\n";
00073   }
00074   if ((array_search("--strict",$argv)===false) && (array_search("-s",$argv)===false)) {
00075     echo "You may use --strict or -s command line option to stop if any of the required KDevelop-related programs is missing\n";
00076   }
00077   if (array_search("--force",$argv)===false) {
00078     echo "You may use --force command line option to force overwriting existent files (created by $argv[0])\n";
00079   }
00080   if (array_search("--clean",$argv)===false) {
00081     echo "You may use --clean command line option to delete most files created by $argv[0]\n";
00082   }
00083 
00084   echo "\nThis script ($argv[0]) prepares Elphel cameras software to be used with KDevelop\n";
00085   echo "integrated development environment. You may need to install additional packages for that.\n";
00086   echo "Looking for required programs...\n";
00087   $all_installed  = true;
00088   $all_installed &= test_kdevelop_depend('kdevelop','kdevelop');
00089   $all_installed &= test_kdevelop_depend('ctags',   'ctags');
00090   $all_installed &= test_kdevelop_depend('doxygen', 'doxygen');
00091   $all_installed &= test_kdevelop_depend('dot',     'graphviz');
00092   if ($all_installed) echo "All required programs are found in your system\n";
00093   else if ((array_search("--strict",$argv)!==false) || (array_search("-s",$argv)!==false)) {
00094     echo "Some needed programs are missing, and you required 'strict'.\n";
00095     exit (1);
00096   }
00097 
00098   $list=file('src.list');
00099   array_walk($list,'walk_src_nolinks');
00100   $list=array_filter  ($list); // remove empty lines
00101   sort ($list);
00103   $files=array();
00104   foreach ($list as $line) {
00105     $path=explode ('/',$line);
00106     if ($path[0]=='.') $path=array($path[1]);
00107     $pointer=&$files;
00108     for ($i=0; $i<(count($path)-1); $i++) {
00109       if (!is_array($pointer[$path[$i]])) $pointer[$path[$i]]=array();
00110       $pointer=&$pointer[$path[$i]];
00111     }
00112     $pointer[]=$path[(count($path)-1)];
00113   }
00115    make_Makefile_am ($files,'.');
00117    create_templates();
00119    if (file_exists($PROJECT_KDEVELOP) && (array_search("--force",$argv)===false)) {
00120      echo "$PROJECT_KDEVELOP already exists, skipping initialization.\n";
00121      echo "Please delete $PWD/$PROJECT_KDEVELOP and rerun $argv[0] if you would like $PROJECT_KDEVELOP to be regenerated.\n";
00122      echo "You may also rerun $argv[0] with --force command line option.\n\n";
00123    } else {
00124      file_put_contents  ($PROJECT_KDEVELOP, create_elphel353_kdevelop());
00125      echo "Created $PWD/$PROJECT_KDEVELOP\n\n";
00126    }
00129    if (array_search("--clean",$argv)===false) {
00130      if (shell_exec ("which ctags")) {
00131        if (file_exists($TAG_EXCLUDE_FILE) && (array_search("--force",$argv)===false)) {
00132          echo "$TAG_EXCLUDE_FILE already exists, skipping initialization.\n";
00133          echo "Please delete $TAG_EXCLUDE_FILE and rerun $argv[0] if you would like $TAG_EXCLUDE_FILE to be regenerated.\n";
00134          echo "You may also rerun $argv[0] with --force command line option.\n\n";
00135        } else {
00136          file_put_contents  ($TAG_EXCLUDE_FILE, create_elphel353_ctags_exclusions());
00137          echo "Created CTAGS exclusions file $TAG_EXCLUDE_FILE\n\n";
00138        }
00139        echo "Creating CTAGS file $TAG_FILE (you may regenerate it from KDevelop: CTags tab, Regenarate button))\n\n";
00140        shell_exec ("ctags -R --c++-types=+px --excmd=pattern --exclude=Makefile --exclude=. --exclude=@$PWD/ctags_excludes -f $TAG_FILE  $PWD");
00142        if (file_exists($KDEVELOP_RC_FILE)) {
00143          $kdeveloprc=file_get_contents($KDEVELOP_RC_FILE);
00144          $kdevelop_rc_file=fopen($KDEVELOP_RC_FILE,"a");
00145           if (strpos($kdeveloprc,"[CTAGS]")===false) {
00146            fwrite($kdevelop_rc_file, "[CTAGS]\n");
00147            fwrite($kdevelop_rc_file, "JumpToFirst=false\n");
00148            fwrite($kdevelop_rc_file, "ShowDeclaration=true\n");
00149            fwrite($kdevelop_rc_file, "ShowDefinition=true\n");
00150            fwrite($kdevelop_rc_file, "ShowLookup=true\n");
00151            fwrite($kdevelop_rc_file, "ctags binary=".trim(shell_exec("which ctags"))."\n");
00152            echo "$KDEVELOP_RC_FILE is modified to include CTAGS executable\n\n";
00153          }
00154          fclose($kdevelop_rc_file);
00155        } else echo "$KDEVELOP_RC_FILE is not found - it can be created by opening/closing KDevelop\n"; 
00156      }
00157    } else {
00158      echo "Deleting CTAGS file $TAG_FILE\n";
00159      @unlink($TAG_FILE);
00160      echo "Deleting CTAGS exclusions file $TAG_EXCLUDE_FILE\n";
00161      @unlink($TAG_EXCLUDE_FILE);
00162    }
00164    if (array_search("--clean",$argv)===false) {
00165      if (file_exists($DOXYFILE) && (array_search("--force",$argv)===false)) {
00166        echo "$DOXYFILE already exists, skipping initialization.\n";
00167        echo "Please delete $PWD/$DOXYFILE and rerun $argv[0] if you would like $DOXYFILE to be regenerated.\n";
00168        echo "You may also rerun $argv[0] with --force command line option.\n\n";
00169      } else {
00170        file_put_contents  ($DOXYFILE, create_doxyfile());
00171        echo "Created $PWD/$DOXYFILE\n\n";
00172      }
00173    } else {
00174      echo "Deleting $PWD/$DOXYFILE\n\n";
00175      @unlink ("$PWD/$DOXYFILE");
00176    }
00177    echo "\n";
00178    echo "#############################################################################################################################\n";
00179    echo "# You may open project in KDevelop by clicking on the $PROJECT_KDEVELOP in file manager                                     #\n";
00180    echo "# In the KDevelop, 'build'    means run top 'make' (rebuild flash image)                                                    #\n";
00181    echo "#                  'compile' means run 'make install' in the directory of the current source file - works with applications #\n";
00182    echo "# You may create documentation with 'Build'->Build API documentation.                                                       #\n";
00183    echo "#############################################################################################################################\n\n";
00184 
00185   exit (0);
00186 
00187   
00199 
00200 function make_Makefile_am ($tree,$path) { 
00201   global $makefile_header;
00202   global $PROJECT_SOURCES, $PROJECT_HEADERS, $PROJECT_SCRIPTS;
00203   global $argv;
00204   $subdirs=array();
00205   $files=array(
00206                 'sources'=> array(),
00207                 'headers'=> array(),
00208                 'scripts'=> array(),
00209                 'other'  => array()
00210               );
00211   foreach ($tree as $name=>$entry) {
00212     if (is_array($entry)) $subdirs[]=$name; 
00213 //    else $files[]=$entry;                   /// regular files
00214     else { // sort
00215       if (($pos=strrpos($entry,'.'))) {
00216         $ext=substr($entry,$pos+1);
00217         if      ((array_search ( $ext,$PROJECT_SOURCES)) !==false) $files['sources'][]=$entry;
00218         else if ((array_search ( $ext,$PROJECT_HEADERS)) !==false) $files['headers'][]=$entry;
00219         else if ((array_search ( $ext,$PROJECT_SCRIPTS)) !==false) $files['scripts'][]=$entry;
00220         else $files['other'][]=$entry;                   
00221       } else $files['other'][]=$entry;                   
00222     }
00223   }
00224   if (array_search("--clean",$argv)===false) {
00225     $makefile=$makefile_header."\n".
00226             "INCLUDES = \n".
00227             "METASOURCES = AUTO\n";
00228     if (count($subdirs)){
00229       $makefile.='SUBDIRS = ';
00230       for ($i=0; $i<count($subdirs)-1; $i++) $makefile.=$subdirs[$i]." \\\n";
00231       $makefile.=$subdirs[count($subdirs)-1]."\n";
00232     }
00233     if (count($files['sources'])){
00234       $esc_path=trim(str_replace('-' , '_', str_replace('.' , '_', str_replace('/' , '_', $path ))),"_");
00235       $makefile.="bin_PROGRAMS = {$esc_path}\n{$esc_path}_SOURCES = ";
00236       for ($i=0; $i<count($files['sources'])-1; $i++) $makefile.=$files['sources'][$i]." \\\n";
00237       $makefile.=$files['sources'][count($files['sources'])-1]."\n";
00238     }
00239     if (count($files['headers'])){
00240 //    $makefile.="include_HEADERS = ";
00241       $makefile.="noinst_HEADERS = ";
00242       for ($i=0; $i<count($files['headers'])-1; $i++) $makefile.=$files['headers'][$i]." \\\n";
00243       $makefile.=$files['headers'][count($files['headers'])-1]."\n";
00244     }
00245     if (count($files['scripts'])){
00246       $makefile.="bin_SCRIPTS = ";
00247       for ($i=0; $i<count($files['scripts'])-1; $i++) $makefile.=$files['scripts'][$i]." \\\n";
00248       $makefile.=$files['scripts'][count($files['scripts'])-1]."\n";
00249     }
00250     if (count($files['other'])){
00251       $makefile.="bin_DATA = ";
00252       for ($i=0; $i<count($files['other'])-1; $i++) $makefile.=$files['other'][$i]." \\\n";
00253       $makefile.=$files['other'][count($files['other'])-1]."\n";
00254     }
00255   }
00257   $makefile_path=$path."/Makefile.am";
00258   $old_makefile="";
00259   if (file_exists ($makefile_path)) $old_makefile=file_get_contents($makefile_path);
00260   if (($old_makefile!="") && (strpos($old_makefile,$makefile_header)===false)) {
00261     if ((array_search("--verbose",$argv)!==false) || (array_search("-v",$argv)!==false)) {
00262       echo "\"Real\" Makefile.am ($makefile_path) exists, using to ${makefile_path}.elphel\n";
00263     }
00264     $makefile_path.=".elphel";
00265   }
00266   if (array_search("--clean",$argv)===false) {
00267     if ((array_search("--verbose",$argv)!==false) || (array_search("-v",$argv)!==false)) {
00268       echo "Writing to $makefile_path\n";
00269     }
00270     file_put_contents  ( $makefile_path, $makefile);
00271   } else {
00272     if ((array_search("--verbose",$argv)!==false) || (array_search("-v",$argv)!==false)) {
00273       echo "Deleting $makefile_path\n";
00274     }
00275     @unlink ($makefile_path);
00276   }
00278   foreach ($subdirs as $subdir)  make_Makefile_am ($tree[$subdir],$path.'/'.$subdir);
00279 }
00280 
00281 function walk_src_nolinks(&$line) {
00282     $pos=strpos($line,'#');
00283     if ($pos!==false) $line=substr($line,0,$pos);
00284     $line=ltrim($line);
00285     if (strpos($line,'===')!==false) $line="";
00286     if (strpos($line,'->')!==false)  $line=""; // remove links
00287     $pos=strpos($line,' ');
00288     if ($pos!==false) $line=substr($line,0,$pos);
00289     $line=rtrim($line);
00290     if (($line!='') && (strpos($line,'/')===false)) $line='./'.$line;
00291 }
00292 
00293 function create_templates() {
00294   global $argv;
00295   $fool_cvs='$Log';
00296   if (file_exists ("templates")) {
00297     echo "File templates directory already exists. If you would like to regenerate all file templates - \n";
00298     echo "delete $PWD/templates directory and re-run $argv[0]\n";
00299     echo "You may also rerun $argv[0] with --force command line option.\n\n";
00300   } else {
00301     echo "Creating $PWD/templates directory\n";
00302     mkdir ("templates");
00303   }
00304   $template_c= <<<TEMPLATE_C
00328 TEMPLATE_C;
00329 
00330   $template_cpp= <<<TEMPLATE_CPP
00354 TEMPLATE_CPP;
00355 
00356   $template_h= <<<TEMPLATE_H
00380 TEMPLATE_H;
00381 
00382   $template_php= <<<TEMPLATE_PHP
00383 #!/usr/local/sbin/php -q
00384 <?php
00408 ?>
00409 
00410 TEMPLATE_PHP;
00411 
00412   $template_v= <<<TEMPLATE_V
00437 TEMPLATE_V;
00438 
00439   $template_tf= <<<TEMPLATE_TF
00464 TEMPLATE_TF;
00465 
00466   $template_ucf= <<<TEMPLATE_UCF
00467 ##
00468 ## HDL user constraints file
00469 ## FILE NAME  : \$MODULE\$.ucf
00470 ## DESCRIPTION: 
00471 ## AUTHOR     : \$AUTHOR\$
00472 ## Copyright (C) \$YEAR\$ Elphel, Inc
00473 ## -----------------------------------------------------------------------------
00474 ##
00475 ##  This program is free software: you can redistribute it and/or modify
00476 ##  it under the terms of the GNU General Public License as published by
00477 ##  the Free Software Foundation, either version 3 of the License, or
00478 ##  (at your option) any later version.
00479 ##
00480 ##  This program is distributed in the hope that it will be useful,
00481 ##  but WITHOUT ANY WARRANTY; without even the implied warranty of
00482 ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00483 ##  GNU General Public License for more details.
00484 ##
00485 ##  You should have received a copy of the GNU General Public License
00486 ##  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00487 ## -----------------------------------------------------------------------------
00488 ##  $fool_cvs:\$MODULE\$.ucf,v $
00489 ##
00490 
00491 TEMPLATE_UCF;
00492 
00493   write_template('templates/c',  $template_c);
00494   write_template('templates/cpp',$template_cpp);
00495   write_template('templates/h',  $template_h);
00496   write_template('templates/php',$template_php);
00497   write_template('templates/v',  $template_v);
00498   write_template('templates/tf', $template_tf);
00499   write_template('templates/ucf',$template_ucf);
00500 }
00501 
00502 function write_template($path,$content) {
00503   global $argv;
00504   if (array_search("--clean",$argv)===false) {
00505     if (file_exists ($path) && (array_search("--force",$argv)===false)) {
00506       echo "File template $path already exists, skipping generation.\n";
00507     } else {
00508       echo "Generating file template $path\n";
00509       file_put_contents  ( $path, $content);
00510     }
00511   } else {
00512       echo "Deleting template file $path\n";
00513       @unlink( $path);
00514   }
00515 }
00516 function create_elphel353_kdevelop() {
00517   global $HWID,$REVISION,$PWD,$argv;
00518 
00519   return <<<KDEVELOP
00520 <?xml version = '1.0'?>
00521 <kdevelop>
00522   <general>
00523     <author>Elphel, Inc.</author>
00524     <email>support@elphel.com</email>
00525     <version>$REVISION</version>
00526     <projectmanagement>KDevAutoProject</projectmanagement>
00527     <primarylanguage>C++</primarylanguage>
00528     <ignoreparts/>
00529     <projectname>elphel$HWID</projectname>
00530     <projectdirectory>.</projectdirectory>
00531     <absoluteprojectpath>false</absoluteprojectpath>
00532     <description/>
00533     <defaultencoding/>
00534     <versioncontrol>kdevcvsservice</versioncontrol>
00535   </general>
00536   <kdevautoproject>
00537     <general>
00538       <activetarget>apps/web/imgsrv/dummy</activetarget>
00539       <useconfiguration>default</useconfiguration>
00540     </general>
00541     <configurations>
00542       <optimized>
00543         <builddir>optimized</builddir>
00544         <ccompiler>GccOptions</ccompiler>
00545         <cxxcompiler>GppOptions</cxxcompiler>
00546         <f77compiler>G77Options</f77compiler>
00547         <cxxflags>-O2 -g0</cxxflags>
00548       </optimized>
00549       <debug>
00550         <configargs>--enable-debug=full</configargs>
00551         <builddir/>
00552         <ccompiler>kdevgccoptions</ccompiler>
00553         <cxxcompiler>kdevgppoptions</cxxcompiler>
00554         <f77compiler>kdevpgf77options</f77compiler>
00555         <cxxflags>-O0 -g3</cxxflags>
00556         <envvars/>
00557         <topsourcedir/>
00558         <cppflags/>
00559         <ldflags/>
00560         <ccompilerbinary>gcc-cris</ccompilerbinary>
00561         <cxxcompilerbinary/>
00562         <f77compilerbinary/>
00563         <cflags/>
00564         <f77flags/>
00565       </debug>
00566       <default>
00567         <envvars/>
00568       </default>
00569     </configurations>
00570     <make>
00571       <envvars/>
00572       <abortonerror>true</abortonerror>
00573       <runmultiplejobs>false</runmultiplejobs>
00574       <numberofjobs>1</numberofjobs>
00575       <dontact>false</dontact>
00576       <makebin>DDD=`command pwd` ; while [ ! -f init_env ] ; do cd .. ; done ; . ./init_env ; if [ `echo \$DDD | grep "/os/"` ] ; then  cd packages/os/linux-2.6-R1_4_2 ; make install ; else cd \$DDD ; if [ -f init_env ] ; then make ; else make install ; fi ; fi ; echo ignoring</makebin>
00577       <prio>0</prio>
00578     </make>
00579     <run>
00580       <mainprogram></mainprogram>
00581       <programargs/>
00582       <globaldebugarguments/>
00583       <globalcwd></globalcwd>
00584       <useglobalprogram>false</useglobalprogram>
00585       <terminal>false</terminal>
00586       <autocompile>false</autocompile>
00587       <autoinstall>false</autoinstall>
00588       <autokdesu>false</autokdesu>
00589       <envvars/>
00590     </run>
00591   </kdevautoproject>
00592   <kdevdebugger>
00593     <general>
00594       <dbgshell>libtool</dbgshell>
00595       <gdbpath/>
00596       <configGdbScript/>
00597       <runShellScript/>
00598       <runGdbScript/>
00599       <breakonloadinglibs>true</breakonloadinglibs>
00600       <separatetty>false</separatetty>
00601       <floatingtoolbar>false</floatingtoolbar>
00602     </general>
00603     <display>
00604       <staticmembers>false</staticmembers>
00605       <demanglenames>true</demanglenames>
00606       <outputradix>10</outputradix>
00607     </display>
00608   </kdevdebugger>
00609   <kdevdoctreeview>
00610     <ignoretocs>
00611       <toc>ada</toc>
00612       <toc>ada_bugs_gcc</toc>
00613       <toc>bash</toc>
00614       <toc>bash_bugs</toc>
00615       <toc>clanlib</toc>
00616       <toc>fortran_bugs_gcc</toc>
00617       <toc>gnome1</toc>
00618       <toc>gnustep</toc>
00619       <toc>gtk</toc>
00620       <toc>gtk_bugs</toc>
00621       <toc>haskell</toc>
00622       <toc>haskell_bugs_ghc</toc>
00623       <toc>java_bugs_gcc</toc>
00624       <toc>java_bugs_sun</toc>
00625       <toc>kde2book</toc>
00626       <toc>opengl</toc>
00627       <toc>pascal_bugs_fp</toc>
00628       <toc>php</toc>
00629       <toc>php_bugs</toc>
00630       <toc>perl</toc>
00631       <toc>perl_bugs</toc>
00632       <toc>python</toc>
00633       <toc>python_bugs</toc>
00634       <toc>qt-kdev3</toc>
00635       <toc>ruby</toc>
00636       <toc>ruby_bugs</toc>
00637       <toc>sdl</toc>
00638       <toc>sw</toc>
00639       <toc>w3c-dom-level2-html</toc>
00640       <toc>w3c-svg</toc>
00641       <toc>w3c-uaag10</toc>
00642       <toc>wxwidgets_bugs</toc>
00643     </ignoretocs>
00644     <ignoreqt_xml>
00645       <toc>Guide to the Qt Translation Tools</toc>
00646       <toc>Qt Assistant Manual</toc>
00647       <toc>Qt Designer Manual</toc>
00648       <toc>Qt Reference Documentation</toc>
00649       <toc>qmake User Guide</toc>
00650     </ignoreqt_xml>
00651     <ignoredoxygen>
00652       <toc>KDE Libraries (Doxygen)</toc>
00653     </ignoredoxygen>
00654   </kdevdoctreeview>
00655   <kdevfilecreate>
00656     <filetypes>
00657       <type icon="php" ext="php" create="template" name="PHP" >
00658         <descr>A new empty PHP source file.</descr>
00659       </type>
00660       <type icon="source_c" ext="c" create="template" name="C Source" >
00661         <descr>A new empty C file.</descr>
00662       </type>
00663       <type icon="source_h" ext="h" create="template" name="C/C++ Header" >
00664         <descr>A new empty header file for C or C++.</descr>
00665       </type>
00666       <type icon="source_cpp" ext="cpp" create="template" name="C++ Source" >
00667         <descr>A new empty C++ file.</descr>
00668       </type>
00669       <type icon="" ext="v" create="template" name="Verilog HDL" >
00670         <descr>A new emptyVerilog HDL file.</descr>
00671       </type>
00672       <type icon="" ext="tf" create="template" name="Verilog test fixture" >
00673         <descr>A new empty Verilog HDL test fixture file.</descr>
00674       </type>
00675       <type icon="" ext="ucf" create="template" name="HDL User constraints file" >
00676         <descr>New HDL User constraints file</descr>
00677       </type>
00678     </filetypes>
00679     <useglobaltypes/>
00680   </kdevfilecreate>
00681   <kdevcppsupport>
00682     <qt>
00683       <used>false</used>
00684       <version>3</version>
00685       <includestyle>3</includestyle>
00686       <root>/usr/share/qt3</root>
00687       <designerintegration>EmbeddedKDevDesigner</designerintegration>
00688       <qmake>/usr/bin/qmake-qt3</qmake>
00689       <designer></designer>
00690       <designerpluginpaths/>
00691     </qt>
00692     <codecompletion>
00693       <automaticCodeCompletion>false</automaticCodeCompletion>
00694       <automaticArgumentsHint>true</automaticArgumentsHint>
00695       <automaticHeaderCompletion>true</automaticHeaderCompletion>
00696       <codeCompletionDelay>250</codeCompletionDelay>
00697       <argumentsHintDelay>400</argumentsHintDelay>
00698       <headerCompletionDelay>250</headerCompletionDelay>
00699       <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
00700       <completionBoxItemOrder>0</completionBoxItemOrder>
00701       <howEvaluationContextMenu>true</howEvaluationContextMenu>
00702       <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
00703       <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
00704       <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
00705       <processPrimaryTypes>true</processPrimaryTypes>
00706       <processFunctionArguments>false</processFunctionArguments>
00707       <preProcessAllHeaders>false</preProcessAllHeaders>
00708       <parseMissingHeaders>false</parseMissingHeaders>
00709       <resolveIncludePaths>true</resolveIncludePaths>
00710       <alwaysParseInBackground>true</alwaysParseInBackground>
00711       <usePermanentCaching>true</usePermanentCaching>
00712       <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
00713       <includePaths>.;</includePaths>
00714     </codecompletion>
00715     <creategettersetter>
00716       <prefixGet/>
00717       <prefixSet>set</prefixSet>
00718       <prefixVariable>m_,_</prefixVariable>
00719       <parameterName>theValue</parameterName>
00720       <inlineGet>true</inlineGet>
00721       <inlineSet>true</inlineSet>
00722     </creategettersetter>
00723     <splitheadersource>
00724       <enabled>true</enabled>
00725       <synchronize>true</synchronize>
00726       <orientation>Vertical</orientation>
00727     </splitheadersource>
00728     <references/>
00729   </kdevcppsupport>
00730   <cppsupportpart>
00731     <filetemplates>
00732       <interfacesuffix>.h</interfacesuffix>
00733       <implementationsuffix>.cpp</implementationsuffix>
00734     </filetemplates>
00735   </cppsupportpart>
00736   <kdevdocumentation>
00737     <projectdoc>
00738       <docsystem>Doxygen Documentation Collection</docsystem>
00739       <docurl>docs/html/index.html</docurl>
00740       <usermanualurl/>
00741     </projectdoc>
00742   </kdevdocumentation>
00743   <kdevfileview>
00744     <groups>
00745       <hidenonprojectfiles>false</hidenonprojectfiles>
00746       <hidenonlocation>false</hidenonlocation>
00747     </groups>
00748     <tree>
00749       <hidepatterns>*.o,*.lo,CVS,*~</hidepatterns>
00750       <hidenonprojectfiles>true</hidenonprojectfiles>
00751       <showvcsfields>false</showvcsfields>
00752     </tree>
00753   </kdevfileview>
00754   <ctagspart>
00755     <customArguments>-R --c++-types=+px --excmd=pattern --links=no --exclude=Makefile --exclude=. --exclude=@$PWD/ctags_excludes</customArguments>
00756     <customTagfilePath>$PWD/tags</customTagfilePath>
00757     <activeTagsFiles/>
00758   </ctagspart>
00759   <kdevcvsservice>
00760     <recursivewhenupdate>true</recursivewhenupdate>
00761     <prunedirswhenupdate>true</prunedirswhenupdate>
00762     <createdirswhenupdate>true</createdirswhenupdate>
00763     <recursivewhencommitremove>true</recursivewhencommitremove>
00764     <revertoptions>-C</revertoptions>
00765   </kdevcvsservice>
00766 </kdevelop>
00767 
00768 KDEVELOP;
00769 }
00770 
00771 
00772 function create_elphel353_ctags_exclusions() {
00773   global $PWD;
00774   return <<<EXCLUSIONS
00775 $PWD/target/*
00776 $PWD/os/*/arch/alpha/*
00777 $PWD/os/*/arch/arm/*
00778 $PWD/os/*/arch/arm26/*
00779 $PWD/os/*/arch/avr32/*
00780 $PWD/os/*/arch/cris/arch-v10/*
00781 $PWD/os/*/arch/frv/*
00782 $PWD/os/*/arch/h8300/*
00783 $PWD/os/*/arch/i386/*
00784 $PWD/os/*/arch/ia64/*
00785 $PWD/os/*/arch/list/*
00786 $PWD/os/*/arch/m32r/*
00787 $PWD/os/*/arch/m68k/*
00788 $PWD/os/*/arch/m68knommu/*
00789 $PWD/os/*/arch/mips/*
00790 $PWD/os/*/arch/parisc/*
00791 $PWD/os/*/arch/powerpc/*
00792 $PWD/os/*/arch/ppc/*
00793 $PWD/os/*/arch/s390/*
00794 $PWD/os/*/arch/sh/*
00795 $PWD/os/*/arch/sh64/*
00796 $PWD/os/*/arch/sparc/*
00797 $PWD/os/*/arch/sparc64/*
00798 $PWD/os/*/arch/um/*
00799 $PWD/os/*/arch/v850/*
00800 $PWD/os/*/arch/x86_64/*
00801 $PWD/os/*/arch/xtensa/*
00802 $PWD/os/*/include/asm-alpha/*
00803 $PWD/os/*/include/asm-arm/*
00804 $PWD/os/*/include/asm-arm26/*
00805 $PWD/os/*/include/asm-avr32/*
00806 $PWD/os/*/include/asm-frv/*
00807 $PWD/os/*/include/asm-generic/*
00808 $PWD/os/*/include/asm-h8300/*
00809 $PWD/os/*/include/asm-i386/*
00810 $PWD/os/*/include/asm-ia64/*
00811 $PWD/os/*/include/asm-m32r/*
00812 $PWD/os/*/include/asm-m68k/*
00813 $PWD/os/*/include/asm-m68knommu/*
00814 $PWD/os/*/include/asm-mips/*
00815 $PWD/os/*/include/asm-parisc/*
00816 $PWD/os/*/include/asm-powerpc/*
00817 $PWD/os/*/include/asm-ppc/*
00818 $PWD/os/*/include/asm-s390/*
00819 $PWD/os/*/include/asm-sh/*
00820 $PWD/os/*/include/asm-sh64/*
00821 $PWD/os/*/include/asm-sparc/*
00822 $PWD/os/*/include/asm-sparc64/*
00823 $PWD/os/*/include/asm-um/*
00824 $PWD/os/*/include/asm-v850/*
00825 $PWD/os/*/include/asm-x86_64/*
00826 $PWD/os/*/include/asm-xtensa/*
00827 $PWD/os/linux-2.6/*
00828 $PWD/os/*/arch/cris/arch/*
00829 $PWD/os/*/arch/cris/drivers/*
00830 $PWD/os/*/usr/include/*
00831 
00832 EXCLUSIONS;
00833 }
00834 
00835 
00836 function test_kdevelop_depend($executable,$package) {
00837    if (($path=trim(shell_exec ("which $executable")))=="") {
00838      echo "You need $executable to be installed in your system.\n";
00839      echo "In Ubuntu you can install it with a command:\n";
00840      echo "sudo apt-get install $package\n\n";
00841      return false;
00842    } else {
00843      echo "$path found.\n";
00844      return true;
00845    }
00846 
00847 }
00848 
00849 function walk_src_doxyfiles(&$line) { /// removes unrecognized by Doxygen file types
00850    global $DOXYGEN_EXTENSIONS;
00851    $pos=strpos($line,'#');
00852    if ($pos!==false) $line=substr($line,0,$pos);
00853    $line=ltrim($line);
00854    if (strpos($line,'===')!==false) $line="";
00855 //   if (strpos($line,'->')!==false)  $line=""; // remove links - leave for now
00856    $pos=strpos($line,' ');
00857    if ($pos!==false) $line=substr($line,0,$pos);
00858    $line=rtrim($line);
00860    if (($pos=strrpos($line,'.'))) {
00861      $ext=substr($line,$pos+1);
00862      $good=false;
00863      foreach ($DOXYGEN_EXTENSIONS as $extension) if ($ext==$extension) {
00864        $good=true;
00865        break;
00866      }
00867      if (!$good) $line="";
00868    } else $line="";
00869    if (($line!='') && (strpos($line,'/')===false)) $line='./'.$line;
00870 }
00871 
00872 
00873 function create_doxyfile() {
00874    global $PWD, $DOXYGEN_EXTENSIONS;
00875    $file_patterns=   "";
00876    for ($i=0; $i< (count($DOXYGEN_EXTENSIONS) -1);$i++) {
00877      $file_patterns.="                         *.".$DOXYGEN_EXTENSIONS[$i]." \\\n";
00878    }
00879    $file_patterns.=  "                         *.".$DOXYGEN_EXTENSIONS[count($DOXYGEN_EXTENSIONS) -1]."\n";
00880 
00881    $list=file('src.list');
00882    array_walk($list,'walk_src_doxyfiles');
00883    $list=array_filter  ($list); // remove empty lines
00884    sort ($list);
00885    $files_list="";
00886    for ($i=0; $i< (count($list) -1);$i++) {
00887      $files_list.="                         ".$list[$i]." \\\n";
00888    }
00889    $files_list.=  "                         ".$list[count($list) -1]."\n";
00890 
00891    return <<<EOT
00892 # Doxyfile 1.5.1-KDevelop
00893 
00894 #---------------------------------------------------------------------------
00895 # Project related configuration options
00896 #---------------------------------------------------------------------------
00897 PROJECT_NAME           = elphel$HWID
00898 PROJECT_NUMBER         = $REVISION
00899 OUTPUT_DIRECTORY       = docs/
00900 CREATE_SUBDIRS         = NO
00901 OUTPUT_LANGUAGE        = English
00902 USE_WINDOWS_ENCODING   = NO
00903 BRIEF_MEMBER_DESC      = YES
00904 REPEAT_BRIEF           = YES
00905 ABBREVIATE_BRIEF       = "The \$name class" \
00906                          "The \$name widget" \
00907                          "The \$name file" \
00908                          is \
00909                          provides \
00910                          specifies \
00911                          contains \
00912                          represents \
00913                          a \
00914                          an \
00915                          the
00916 ALWAYS_DETAILED_SEC    = NO
00917 INLINE_INHERITED_MEMB  = NO
00918 FULL_PATH_NAMES        = YES
00919 STRIP_FROM_PATH        = $PWD
00920 STRIP_FROM_INC_PATH    = 
00921 SHORT_NAMES            = NO
00922 JAVADOC_AUTOBRIEF      = NO
00923 MULTILINE_CPP_IS_BRIEF = NO
00924 DETAILS_AT_TOP         = NO
00925 INHERIT_DOCS           = YES
00926 SEPARATE_MEMBER_PAGES  = NO
00927 TAB_SIZE               = 8
00928 ALIASES                = 
00929 OPTIMIZE_OUTPUT_FOR_C  = YES
00930 OPTIMIZE_OUTPUT_JAVA   = NO
00931 BUILTIN_STL_SUPPORT    = NO
00932 DISTRIBUTE_GROUP_DOC   = NO
00933 SUBGROUPING            = YES
00934 #---------------------------------------------------------------------------
00935 # Build related configuration options
00936 #---------------------------------------------------------------------------
00937 EXTRACT_ALL            = YES
00938 EXTRACT_PRIVATE        = YES
00939 EXTRACT_STATIC         = YES
00940 EXTRACT_LOCAL_CLASSES  = YES
00941 EXTRACT_LOCAL_METHODS  = NO
00942 HIDE_UNDOC_MEMBERS     = NO
00943 HIDE_UNDOC_CLASSES     = NO
00944 HIDE_FRIEND_COMPOUNDS  = NO
00945 HIDE_IN_BODY_DOCS      = NO
00946 INTERNAL_DOCS          = NO
00947 CASE_SENSE_NAMES       = YES
00948 HIDE_SCOPE_NAMES       = NO
00949 SHOW_INCLUDE_FILES     = YES
00950 INLINE_INFO            = YES
00951 SORT_MEMBER_DOCS       = YES
00952 SORT_BRIEF_DOCS        = NO
00953 SORT_BY_SCOPE_NAME     = NO
00954 GENERATE_TODOLIST      = YES
00955 GENERATE_TESTLIST      = YES
00956 GENERATE_BUGLIST       = YES
00957 GENERATE_DEPRECATEDLIST= YES
00958 ENABLED_SECTIONS       = 
00959 MAX_INITIALIZER_LINES  = 30
00960 SHOW_USED_FILES        = YES
00961 SHOW_DIRECTORIES       = NO
00962 FILE_VERSION_FILTER    = 
00963 #---------------------------------------------------------------------------
00964 # configuration options related to warning and progress messages
00965 #---------------------------------------------------------------------------
00966 QUIET                  = NO
00967 WARNINGS               = YES
00968 WARN_IF_UNDOCUMENTED   = YES
00969 WARN_IF_DOC_ERROR      = YES
00970 WARN_NO_PARAMDOC       = NO
00971 WARN_FORMAT            = "\$file:\$line: \$text"
00972 WARN_LOGFILE           = 
00973 #---------------------------------------------------------------------------
00974 # configuration options related to the input files
00975 #---------------------------------------------------------------------------
00976 INPUT                  = \
00977 $files_list
00978 FILE_PATTERNS          = \
00979 $file_patterns
00980 RECURSIVE              = YES
00981 EXCLUDE                = 
00982 EXCLUDE_SYMLINKS       = NO
00983 EXCLUDE_PATTERNS       = 
00984 EXAMPLE_PATH           = 
00985 EXAMPLE_PATTERNS       = *
00986 EXAMPLE_RECURSIVE      = NO
00987 IMAGE_PATH             = 
00988 INPUT_FILTER           = 
00989 FILTER_PATTERNS        = 
00990 FILTER_SOURCE_FILES    = NO
00991 #---------------------------------------------------------------------------
00992 # configuration options related to source browsing
00993 #---------------------------------------------------------------------------
00994 SOURCE_BROWSER         = YES
00995 INLINE_SOURCES         = NO
00996 STRIP_CODE_COMMENTS    = YES
00997 REFERENCED_BY_RELATION = YES
00998 REFERENCES_RELATION    = YES
00999 REFERENCES_LINK_SOURCE = YES
01000 USE_HTAGS              = NO
01001 VERBATIM_HEADERS       = YES
01002 #---------------------------------------------------------------------------
01003 # configuration options related to the alphabetical class index
01004 #---------------------------------------------------------------------------
01005 ALPHABETICAL_INDEX     = YES
01006 COLS_IN_ALPHA_INDEX    = 5
01007 IGNORE_PREFIX          = 
01008 #---------------------------------------------------------------------------
01009 # configuration options related to the HTML output
01010 #---------------------------------------------------------------------------
01011 GENERATE_HTML          = YES
01012 HTML_OUTPUT            = html
01013 HTML_FILE_EXTENSION    = .html
01014 HTML_HEADER            = 
01015 HTML_FOOTER            = 
01016 HTML_STYLESHEET        = 
01017 HTML_ALIGN_MEMBERS     = YES
01018 GENERATE_HTMLHELP      = NO
01019 CHM_FILE               = 
01020 HHC_LOCATION           = 
01021 GENERATE_CHI           = NO
01022 BINARY_TOC             = NO
01023 TOC_EXPAND             = NO
01024 DISABLE_INDEX          = NO
01025 ENUM_VALUES_PER_LINE   = 4
01026 GENERATE_TREEVIEW      = YES
01027 TREEVIEW_WIDTH         = 250
01028 #---------------------------------------------------------------------------
01029 # configuration options related to the LaTeX output
01030 #---------------------------------------------------------------------------
01031 GENERATE_LATEX         = YES
01032 LATEX_OUTPUT           = latex
01033 LATEX_CMD_NAME         = latex
01034 MAKEINDEX_CMD_NAME     = makeindex
01035 COMPACT_LATEX          = NO
01036 PAPER_TYPE             = a4wide
01037 EXTRA_PACKAGES         = 
01038 LATEX_HEADER           = 
01039 PDF_HYPERLINKS         = YES
01040 USE_PDFLATEX           = YES
01041 LATEX_BATCHMODE        = NO
01042 LATEX_HIDE_INDICES     = NO
01043 #---------------------------------------------------------------------------
01044 # configuration options related to the RTF output
01045 #---------------------------------------------------------------------------
01046 GENERATE_RTF           = YES
01047 RTF_OUTPUT             = rtf
01048 COMPACT_RTF            = NO
01049 RTF_HYPERLINKS         = NO
01050 RTF_STYLESHEET_FILE    = 
01051 RTF_EXTENSIONS_FILE    = 
01052 #---------------------------------------------------------------------------
01053 # configuration options related to the man page output
01054 #---------------------------------------------------------------------------
01055 GENERATE_MAN           = YES
01056 MAN_OUTPUT             = man
01057 MAN_EXTENSION          = .3
01058 MAN_LINKS              = NO
01059 #---------------------------------------------------------------------------
01060 # configuration options related to the XML output
01061 #---------------------------------------------------------------------------
01062 GENERATE_XML           = YES
01063 XML_OUTPUT             = xml
01064 XML_SCHEMA             = 
01065 XML_DTD                = 
01066 XML_PROGRAMLISTING     = YES
01067 #---------------------------------------------------------------------------
01068 # configuration options for the AutoGen Definitions output
01069 #---------------------------------------------------------------------------
01070 GENERATE_AUTOGEN_DEF   = NO
01071 #---------------------------------------------------------------------------
01072 # configuration options related to the Perl module output
01073 #---------------------------------------------------------------------------
01074 GENERATE_PERLMOD       = NO
01075 PERLMOD_LATEX          = NO
01076 PERLMOD_PRETTY         = YES
01077 PERLMOD_MAKEVAR_PREFIX = 
01078 #---------------------------------------------------------------------------
01079 # Configuration options related to the preprocessor   
01080 #---------------------------------------------------------------------------
01081 ENABLE_PREPROCESSING   = YES
01082 MACRO_EXPANSION        = NO
01083 EXPAND_ONLY_PREDEF     = NO
01084 SEARCH_INCLUDES        = YES
01085 INCLUDE_PATH           = 
01086 INCLUDE_FILE_PATTERNS  = 
01087 PREDEFINED             = 
01088 EXPAND_AS_DEFINED      = 
01089 SKIP_FUNCTION_MACROS   = YES
01090 #---------------------------------------------------------------------------
01091 # Configuration::additions related to external references   
01092 #---------------------------------------------------------------------------
01093 TAGFILES               = 
01094 GENERATE_TAGFILE       = 
01095 ALLEXTERNALS           = NO
01096 EXTERNAL_GROUPS        = YES
01097 PERL_PATH              = /usr/bin/perl
01098 #---------------------------------------------------------------------------
01099 # Configuration options related to the dot tool   
01100 #---------------------------------------------------------------------------
01101 CLASS_DIAGRAMS         = NO
01102 HIDE_UNDOC_RELATIONS   = YES
01103 HAVE_DOT               = YES
01104 CLASS_GRAPH            = YES
01105 COLLABORATION_GRAPH    = YES
01106 GROUP_GRAPHS           = YES
01107 UML_LOOK               = NO
01108 TEMPLATE_RELATIONS     = NO
01109 INCLUDE_GRAPH          = YES
01110 INCLUDED_BY_GRAPH      = YES
01111 CALL_GRAPH             = NO
01112 CALLER_GRAPH           = NO
01113 GRAPHICAL_HIERARCHY    = YES
01114 DIRECTORY_GRAPH        = YES
01115 DOT_IMAGE_FORMAT       = png
01116 DOT_PATH               = 
01117 DOTFILE_DIRS           = 
01118 MAX_DOT_GRAPH_WIDTH    = 1024
01119 MAX_DOT_GRAPH_HEIGHT   = 1024
01120 MAX_DOT_GRAPH_DEPTH    = 1000
01121 DOT_TRANSPARENT        = YES
01122 DOT_MULTI_TARGETS      = NO
01123 GENERATE_LEGEND        = YES
01124 DOT_CLEANUP            = YES
01125 #---------------------------------------------------------------------------
01126 # Configuration::additions related to the search engine   
01127 #---------------------------------------------------------------------------
01128 SEARCHENGINE           = YES
01129 
01130 EOT;
01131 }
01132 
01133 
01134 
01135 ?>
01136 

Generated on Fri Nov 28 00:06:25 2008 for elphel by  doxygen 1.5.1