mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 02:59:33 +02:00
docs: clean up
git-svn-id: trunk@31799 -
This commit is contained in:
parent
e80d33d1ce
commit
700853b40a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3107,7 +3107,6 @@ docs/xml/fcl/pngcomn.xml svneol=native#text/xml
|
||||
docs/xml/fcl/pscanvas.xml svneol=native#text/xml
|
||||
docs/xml/fcl/targacmn.xml svneol=native#text/xml
|
||||
docs/xml/fcl/xwdfile.xml svneol=native#text/xml
|
||||
docs/xml/find_cvs_fpdoc_files.pl -text svneol=native#application/x-perl
|
||||
docs/xml/ide/aboutfrm.xml svneol=native#text/plain
|
||||
docs/xml/lcl/actnlist.xml svneol=LF#text/xml eol=lf
|
||||
docs/xml/lcl/alllclunits.xml svneol=LF#text/xml eol=lf
|
||||
|
@ -11,16 +11,6 @@ perl multi_makeskel.pl -p lcl -s ../../lcl -o lcl \
|
||||
At the moment the fpdoc tool 'makeskel' is not yet capable of updating the
|
||||
files. But this will follow in a few weeks.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Finding the new files, not yet in CVS (probably obsolete now):
|
||||
|
||||
perl find_cvs_fpdoc_files.pl -s ../../lcl -o lcl -l new
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Finding old the files in CVS not needed any more (probably obsolete now):
|
||||
|
||||
perl find_cvs_fpdoc_files.pl -s ../../lcl -o lcl -l old
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
If you don't have perl installed, you can use the following command to update
|
||||
lcl/forms.xml file:
|
||||
@ -34,15 +24,8 @@ makeskel --package=lcl --input="..\..\lcl\forms.pp" --output=lcl\forms.xml
|
||||
Examples for gtk interface:
|
||||
|
||||
Creation:
|
||||
perl multi_makeskel.pl -p gtk -s ../../lcl/interfaces/gtk \
|
||||
perl multi_makeskel.pl -p lclgtk -s ../../lcl/interfaces/gtk \
|
||||
-o lcl/interfaces/gtk -i '-Fi/path/to/lazarus/lcl/interfaces/gtk' -x
|
||||
|
||||
Finding the new files, not yet in CVS:
|
||||
perl find_cvs_fpdoc_files.pl -s ../../lcl/interfaces/gtk \
|
||||
-o lcl/interfaces/gtk -l new
|
||||
|
||||
Finding old the files in CVS not needed any more:
|
||||
perl find_cvs_fpdoc_files.pl -s ../../lcl/interfaces/gtk \
|
||||
-o lcl/interfaces/gtk -l old
|
||||
|
||||
|
||||
|
@ -1,140 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# *****************************************************************************
|
||||
# * *
|
||||
# * See the file COPYING.modifiedLGPL, included in this distribution, *
|
||||
# * for details about the copyright. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
# * *
|
||||
# *****************************************************************************
|
||||
#
|
||||
# Author: Mattias Gaertner
|
||||
|
||||
use vars qw/ %opt /;
|
||||
use Getopt::Std;
|
||||
my $opt_string = 'hs:l:o:x';
|
||||
getopts( "$opt_string", \%opt ) or usage();
|
||||
usage() if $opt{h};
|
||||
|
||||
sub usage(){
|
||||
print STDERR << "EOF";
|
||||
|
||||
Create fpdoc sceletons for pascal units
|
||||
|
||||
usage: $0 [-hsolx]
|
||||
|
||||
-h : this (help) message
|
||||
-s <source directory> : the source directory with the .pp and .pas files
|
||||
-o <output directory> : the output directory for the xml files
|
||||
-l new|old : new = show new fpdoc files, not yet in CVS
|
||||
old = show old CVS files, not needed by fpdoc
|
||||
-x : call cvs
|
||||
|
||||
examples:
|
||||
find_cvs_fpdoc_files.pl -s ../../lcl -o lcl -l new
|
||||
|
||||
EOF
|
||||
exit;
|
||||
}
|
||||
|
||||
($opt{s}) || usage(); # source directory needed
|
||||
($opt{o}) || usage(); # output directory needed
|
||||
($opt{l}) || usage(); # list option needed
|
||||
($opt{l}=~/^(new|old)$/) || usage();
|
||||
|
||||
$SrcDir=$opt{s};
|
||||
(-d $SrcDir) || die "source directory $SrcDir is not a directory\n";
|
||||
$SrcDir=~s#//#/#;
|
||||
$SrcDir=~s#/$##;
|
||||
|
||||
$OutDir=$opt{o};
|
||||
(-d $OutDir) || die "output directory $OutDir is not a directory\n";
|
||||
$OutDir=~s#//#/#;
|
||||
$OutDir=~s#/$##;
|
||||
|
||||
|
||||
# get pascal units
|
||||
opendir(DIR, $SrcDir);
|
||||
@SrcFiles = grep(/\.(pas|pp)$/,readdir(DIR));
|
||||
for ($i=0; $i<=$#SrcFiles; $i++){
|
||||
($SrcFiles[$i]=~/^([a-zA-Z0-9_]+)\./);
|
||||
$SrcUnits.=" ".$1;
|
||||
}
|
||||
closedir(DIR);
|
||||
#print "$SrcUnits\n";
|
||||
|
||||
# get FPDoc xml files
|
||||
opendir(DIR, $OutDir);
|
||||
@XMLFiles = grep(/\.xml$/,readdir(DIR));
|
||||
closedir(DIR);
|
||||
|
||||
# get CVS files
|
||||
open(F, $OutDir."/CVS/Entries");
|
||||
while($line=<F>){
|
||||
($line=~/^\/([^\/]+)\//);
|
||||
$CVSEntries.="/".$1;
|
||||
}
|
||||
close(F);
|
||||
#print "$CVSEntries\n";
|
||||
|
||||
for $XMLFile(@XMLFiles){
|
||||
($XMLFile=~/^([a-zA-Z0-9_]+).xml/);
|
||||
$UnitName=$1;
|
||||
if($SrcUnits=~/\b$UnitName\b/){
|
||||
$UnitNeeded=1;
|
||||
} else {
|
||||
$UnitNeeded=0;
|
||||
}
|
||||
if($CVSEntries=~/\b$UnitName\.xml\b/){
|
||||
$UnitInCVS=1;
|
||||
} else {
|
||||
$UnitInCVS=0;
|
||||
}
|
||||
if (($UnitNeeded) && (! $UnitInCVS)){
|
||||
$NewFilesNotYetInCVS.=$OutDir."/".$XMLFile." ";
|
||||
}
|
||||
if ((! $UnitNeeded) && ($UnitInCVS)){
|
||||
$OldFilesInCVS.=$OutDir."/".$XMLFile." ";
|
||||
}
|
||||
#print $XMLFile." ".$UnitName." $UnitNeeded $UnitInCVS\n";
|
||||
}
|
||||
|
||||
if ($opt{l} eq "new"){
|
||||
print "Adding new Files:\n";
|
||||
if ($NewFilesNotYetInCVS){
|
||||
$Command="cvs -z3 add $NewFilesNotYetInCVS";
|
||||
DoIt($Command);
|
||||
}
|
||||
}
|
||||
if ($opt{l} eq "old"){
|
||||
print "Removing unneeded files:\n";
|
||||
if ($OldFilesInCVS){
|
||||
$Command="rm $OldFilesInCVS";
|
||||
DoIt($Command);
|
||||
$Command="cvs -z3 remove $OldFilesInCVS";
|
||||
DoIt($Command);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!$opt{x}){
|
||||
print "\nThis was a simulation. To really remove files and change cvs, use the -x option.\n";
|
||||
}
|
||||
|
||||
sub DoIt(){
|
||||
(my $Command)=@_;
|
||||
print $Command."\n";
|
||||
if($opt{x}){
|
||||
my $Output=`$Command`;
|
||||
if($?){
|
||||
die "Command failed:\n".$Output;
|
||||
}
|
||||
print $Output;
|
||||
}
|
||||
}
|
||||
|
||||
# end.
|
||||
|
Loading…
Reference in New Issue
Block a user