summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2007-02-20 21:06:07 +0000
committerishmal <ishmal@users.sourceforge.net>2007-02-20 21:06:07 +0000
commit33eb73ce15941eb2162f4c213c19b46726766c5a (patch)
treef84b2671de7feb6a4cfca7baead4770bf76bedeb /src
parentImprove null check (diff)
downloadinkscape-33eb73ce15941eb2162f4c213c19b46726766c5a.tar.gz
inkscape-33eb73ce15941eb2162f4c213c19b46726766c5a.zip
remove old *.mingw files
(bzr r2408)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.mingw125
-rw-r--r--src/Makefile.mingw.old53
-rw-r--r--src/deptool.cpp69
-rw-r--r--src/make.exclude3
-rwxr-xr-xsrc/mkdep.pl565
-rwxr-xr-xsrc/mkfiles.pl228
-rw-r--r--src/pedro/pedrogui.cpp3
7 files changed, 74 insertions, 972 deletions
diff --git a/src/Makefile.mingw b/src/Makefile.mingw
deleted file mode 100644
index 980695d0a..000000000
--- a/src/Makefile.mingw
+++ /dev/null
@@ -1,125 +0,0 @@
-###########################################################################
-# $Id$
-###########################################################################
-# Makefile for building with MinGW
-###########################################################################
-
-include ../Makefile.mingw.common
-
-all: generated outputs
-
-###################################
-# G E N E R A T E D F I L E S
-###################################
-
-generated: helper/sp-marshal.h helper/sp-marshal.cpp inkscape_version.h
-
-
-
-helper/sp-marshal.h: helper/sp-marshal.h.mingw
- $(CP) $(subst /,$(S), $<) $(subst /,$(S), $@)
-
-helper/sp-marshal.cpp: helper/sp-marshal.cpp.mingw
- $(CP) $(subst /,$(S), $<) $(subst /,$(S), $@)
-
-inkscape_version.h: inkscape_version.h.mingw
- $(CP) inkscape_version.h.mingw inkscape_version.h
-
-
-###################################
-# D E P E N D E N C I E S
-###################################
-
-include ./make.dep
-
-INC += $(DEPTOOL_INCLUDE)
-
-OBJ = $(DEPTOOL_OBJECTS)
-
-
-
-###################################
-# O U T P U T S
-###################################
-
-outputs: inkscape.exe inkview.exe
-
-
-RES=inkres.o
-
-inkscape.exe: libinkscape.a main.o winmain.o $(RES)
- $(CXX) --export-dynamic -o inkscape.exe main.o winmain.o $(RES) libinkscape.a $(LIBS)
- $(OBJCOPY) --only-keep-debug inkscape.exe inkscape.dbg
- strip inkscape.exe
-
-# DLL version. we need to make this work
-#inkscape.exe: inkscape.dll main.o winmain.o $(RES)
-# $(CXX) -o inkscape.exe main.o winmain.o $(RES) inkscape.la $(LIBS)
-# strip inkscape.exe
-
-inkview.exe: libinkscape.a inkview.o $(RES)
- $(CXX) -o inkview.exe inkview.o $(RES) libinkscape.a $(LIBS)
- $(OBJCOPY) --only-keep-debug inkview.exe inkview.dbg
- strip inkview.exe
-
-# DLL version. we need to make this work
-# inkview.exe: inkscape.dll inkview.o $(RES)
-# $(CXX) -o inkview.exe inkview.o $(RES) libinkscapedll.a $(LIBS)
-# strip inkview.exe
-
-inkres.o: inkscape.rc
- $(WINDRES) inkscape.rc $(RES)
-
-inkscape.dll: libinkscape.a inkscape.def
- $(DLLWRAP) --output-lib=inkscape.la \
- --def=inkscape.def --driver-name=g++ \
- -o inkscape.dll libinkscape.a $(LIBS)
-
-inkscape.def: libinkscape.a
- perl makedef.pl
-
-libinkscape.a: $(OBJ)
- -$(RM) libinkscape.a
- ar crv libinkscape.a $(OBJ)
- $(RANLIB) libinkscape.a
-
-inkscape.la: inkscape.dll
-
-
-
-###################################
-# P L U G I N S
-###################################
-
-.o.dll: $<
- $(DLLWRAP) --def=plugin.def --driver-name=g++ \
- -o $@ $< $(LIBS)
-
-PLUGS = extension/plugin/gimpgrad.dll
-
-plugins: $(PLUGS)
-
-extension/plugin/gimpgrad.dll: extension/plugin/gimpgrad.o inkscape.la
- $(DLLWRAP) --def=plugin.def --driver-name=g++ \
- -dllname $@ $< inkscape.la $(LIBS) -lgc
- strip $@
-
-
-
-
-###################################
-# C L E A N U P
-###################################
-
-clean:
- $(foreach a, $(OBJ), $(shell $(RM) $(subst /,$(S), $(a))))
- -$(RM) main.o winmain.o inkview.o
- -$(RM) *.a
- -$(RM) *.la
- -$(RM) inkscape.def
- -$(RM) *.dll
- -$(RM) extension$(S)plugin$(S)*.o
- -$(RM) extension$(S)plugin$(S)*.dll
- -$(RM) inkscape.exe inkview.exe inkscape.dbg inkview.dbg
-
-
diff --git a/src/Makefile.mingw.old b/src/Makefile.mingw.old
deleted file mode 100644
index 1483746c8..000000000
--- a/src/Makefile.mingw.old
+++ /dev/null
@@ -1,53 +0,0 @@
-###########################################################################
-# $Id$
-###########################################################################
-# Makefile for building with MinGW
-###########################################################################
-
-include ../Makefile.mingw.common
-
-
-
-#Check for 'generated' files
-all: helper/sp-marshal.h helper/sp-marshal.cpp inkscape_version.h inkscape.exe
-
-helper/sp-marshal.h: helper/sp-marshal.h.mingw
- $(CP) $(subst /,$(S), $<) $(subst /,$(S), $@)
-
-helper/sp-marshal.cpp: helper/sp-marshal.cpp.mingw
- $(CP) $(subst /,$(S), $<) $(subst /,$(S), $@)
-
-inkscape_version.h: inkscape_version.h.mingw
- $(CP) inkscape_version.h.mingw inkscape_version.h
-
-include ./make.ofiles
-include ./make.dep
-
-INC += $(INCLUDEPATH)
-
-OBJ = $(OBJECTS)
-
-RES=inkres.o
-
-inkscape.exe: libinkscape.a main.o winmain.o $(RES)
- $(CXX) -o inkscape.exe main.o winmain.o $(RES) libinkscape.a $(LIBS)
-# strip inkscape.exe
-
-inkview.exe: libinkscape.a inkview.o $(RES)
- $(CXX) -o inkview.exe inkview.o $(RES) libinkscape.a $(LIBS)
- strip inkview.exe
-
-inkres.o: inkscape.rc
- $(WINDRES) inkscape.rc $(RES)
-
-libinkscape.a: $(OBJ)
- $(RM) libinkscape.a
- ar crv libinkscape.a $(OBJ)
- $(RANLIB) libinkscape.a
-
-
-clean:
- $(foreach a, $(OBJ), $(shell $(RM) $(subst /,$(S), $(a))))
- $(RM) *.a
-
-
diff --git a/src/deptool.cpp b/src/deptool.cpp
index 044d197ff..ffb533981 100644
--- a/src/deptool.cpp
+++ b/src/deptool.cpp
@@ -292,6 +292,11 @@ private:
/**
*
*/
+ bool saveCmakeFile();
+
+ /**
+ *
+ */
bool saveRefFile(bool doXml);
/**
@@ -1006,6 +1011,7 @@ bool DepTool::run()
if (!generateDependencies())
return false;
saveDepFile(false);
+ saveCmakeFile();
//saveRefFile(true);
return true;
}
@@ -1362,6 +1368,69 @@ bool DepTool::saveRefFile(bool doXml)
}
+/**
+ * This is a new thing. It creates a cmake file that should be able to
+ * build the entire thing.
+ */
+bool DepTool::saveCmakeFile()
+{
+ time_t tim;
+ time(&tim);
+
+ FILE *f = fopen("CMakeLists.txt", "w");
+ if (!f)
+ {
+ trace("cannot open 'CMakeLists.txt' for writing");
+ }
+ fprintf(f, "########################################################\n");
+ fprintf(f, "## File: CMakeLists.txt\n");
+ fprintf(f, "## Generated by DepTool at :%s", ctime(&tim));
+ fprintf(f, "########################################################\n");
+
+ fprintf(f, "\n\n");
+
+ fprintf(f, "\n\n\n");
+ fprintf(f, "########################################################\n");
+ fprintf(f, "## P R O J E C T\n");
+ fprintf(f, "########################################################\n");
+ fprintf(f, "project (INKSCAPE)\n");
+ fprintf(f, "\n\n\n");
+ fprintf(f, "########################################################\n");
+ fprintf(f, "## O B J E C T S\n");
+ fprintf(f, "########################################################\n");
+ fprintf(f, "set (INKSCAPE_SRCS\n");
+
+ std::map<String, FileRec *>::iterator oiter;
+ for (oiter=allFiles.begin() ; oiter!=allFiles.end() ; oiter++)
+ {
+ FileRec *frec = oiter->second;
+ if (frec->type == FileRec::CFILE)
+ {
+ //fprintf(f, " \\\n");
+ String fname = frec->path;
+ if (fname.size()>0)
+ fname.append("/");
+ fname.append(frec->baseName);
+ fname.append(".");
+ fname.append(frec->suffix);
+ fprintf(f, "%s\n", fname.c_str());
+ }
+ }
+ fprintf(f, ")\n\n");
+
+ fprintf(f, "add_executable (inkscape ${INKSCAPE_SRCS})\n");
+
+ fprintf(f, "\n\n\n");
+ fprintf(f, "########################################################\n");
+ fprintf(f, "## E N D\n");
+ fprintf(f, "########################################################\n");
+
+ fclose(f);
+
+ return true;
+}
+
+
diff --git a/src/make.exclude b/src/make.exclude
index 6ded4d0d5..8db9537b7 100644
--- a/src/make.exclude
+++ b/src/make.exclude
@@ -15,6 +15,7 @@ dialogs/filedialog-win32.cpp
display/testnr.cpp
display/bezier-utils-test.cpp
dom/work
+dom/jsdombind.cpp
dom/odf/SvgOdg.cpp
extension/api.cpp
extension/dxf2svg
@@ -56,7 +57,7 @@ pedro/work
###############################################
# Bob:
-# For the moment, DO NOT remove these from cvs
+# For the moment, DO NOT remove these from svn
# until those files compile everywhere
###############################################
ui/dialog/session-player.cpp
diff --git a/src/mkdep.pl b/src/mkdep.pl
deleted file mode 100755
index 98b74829a..000000000
--- a/src/mkdep.pl
+++ /dev/null
@@ -1,565 +0,0 @@
-#!/usr/bin/perl
-############################################################################
-#
-# Creates make.dep - a list of all dependencies.
-# Uses make.files as input; mkfiles.pl should be run before mkdep.pl.
-#
-############################################################################
-
-$obj_ext = "o";
-$linebreak = "\\";
-$dir_sep = "/";
-$nodepend = 0;
-$tolower = 1; # lowercase all filenames
-$include_path = "";
-
-#
-# main - top level code
-#
-
-if ( @ARGV ) { # parse command line args
- foreach $a ( @ARGV ) {
- if ( $a eq "-w" ) {
- $warnon = 1;
- }
- elsif ( ( $a eq "-?" ) || ( $a eq "-h" ) ) {
- print "usage: perl mkdep.pl includedirs...\"\n\n" .
- "\"includedirs\" is any number of include directories that are located\n".
- "outside of your project directory tree.\n\n".
- "example:\n perl mkdep.pl s:\\ w:\\include\n";
- exit 1;
- }
- else {
- push @extradirs, $a;
- $include_path = $include_path . $a . ";";
- }
- }
- print "Includepath used: ".join(" ",@extradirs)."\n";
-}
-
-&make_files;
-&make_dep;
-
-exit 0;
-
-
-#
-# make_files: read "make.files", create "make.ofiles"
-#
-
-sub make_files {
-
- # create output file (now, to check for permissions)
- open OFILES, ">make.ofiles" or
- die("Can't create make.ofiles");
-
- # read file list
- #open FILES,"<make.files" or
- # die "Can't open make.files";
- #@lines = <FILES>;
- #close FILES;
-
- open FILES, "<make.files" or
- die "Can't open make.files: $!";
- while (<FILES>)
- {
- $line = $_;
- #Trim whitespace from ends
- $line =~ s/^\s|\t|\n//;
- #Ignore if no text in line
- next if ( length($line) < 1 );
- #Ignore if starts with '#'
- next if ( $line =~ /^#/ );
- # print $line, "\n";
- push @lines, $line;
- }
- close FILES;
-
- # sort out header and source files
- @hdr = sort grep(/\.(h|hpp|icc|ia|xpm)$/i,@lines);
- @src = sort grep(/\.(c|cpp|cc|s)$/i,@lines);
-
- print STDERR scalar @lines ." files found (".scalar @src." sources and ".scalar @hdr." headers) in \"make.files\".\n";
-
- # scan specified include dirs
- for ( @extradirs ) {
- push @extrafiles, &find_files($_,"\.*",1);
- }
- # add external includefiles to file list
- push @lines, @extrafiles;
-
- print STDERR scalar @lines . " files found everywhere.\n";
-
- # create @inc and %full_path
- $last = "";
- for ( @lines ) {
- m/^(.*\/)([^\/]*)$/ || m/^()(.*)$/;
- $path = $1;
- $filepart = $2;
- if ( $path ne $last ) {
- # store dir path
- if (length($path) > 0) {
- push (@inc, $path );
- }
- $last = $path;
- }
-
- # remove any newlines at end of line
- $filepart =~ s/(.*)\n+$/$1/g;
-
- # store full path for all include files
- if ( !defined $full_path{ lc $filepart } ) {
- $full_path{lc $filepart} = $path.$filepart;
- }
- }
-
- $includes = join (" \\\n\t-I", @inc);
- $includes =~ s/\/ \\/ \\/g; # remove trailing slashes
-
- # save source list for use by make_depend
- $sourcelist = join(" ",@src);
-
- # create object list from source list
- $objects = &Objects( $sourcelist );
-
- # save object list for use by make_depend
- $objectlist = $objects;
-
- # make a "lints" list for linting
- $lints = $objects;
- $lints =~ s/\.${obj_ext}/\.lint/g;
- $lints =~ s/ / \\\n\t/g;
-
- # put newline+tab on all files (to make nice lists)
- $objects =~ s/ / \\\n\t/g;
-
- # print file
- $datestr = gmtime();
- print OFILES "########################################################\n";
- print OFILES "## File: make.ofiles\n";
- print OFILES "## Purpose: Object file listing for use by Makefiles\n";
- print OFILES "## Generated by mkdep.pl at :$datestr\n";
- print OFILES "## Do not edit this file! Changes will be lost.\n";
- print OFILES "########################################################\n\n";
- print OFILES "OBJECTS = \\\n\t" . $objects . "\n\n";
- print OFILES "LINTS = \\\n\t" . $lints . "\n\n";
- if ( $includes ne "" ) {
- print OFILES "INCLUDEPATH = \\\n\t-I" . $includes . "\n";
- }
-
- close OFILES;
-}
-
-
-
-#
-# Finds files.
-#
-# Examples:
-# find_files("/usr","\.cpp$",1) - finds .cpp files in /usr and below
-# find_files("/tmp","^#",0) - finds #* files in /tmp
-#
-
-sub find_files {
- my($dir,$match,$descend) = @_;
- my($file,$p,@files);
- local(*D);
- $dir =~ s=\\=/=g;
- ($dir eq "") && ($dir = ".");
-
- if ( opendir(D,$dir) ) {
- if ( $dir eq "." ) {
- $dir = "";
- } else {
- ($dir =~ /\/$/) || ($dir .= "/");
- }
- foreach $file ( readdir(D) ) {
-
- next if ( $file =~ /^\.\.?$/ );
- $p = $dir . $file;
-# ($file =~ /$match/i) && (push @files, ($tolower==0 ? $p : lc($p)));
- ($file =~ /$match/i) && (push @files, $p );
- if ( $descend && -d $p && ! -l $p ) {
- push @files, &find_files($p,$match,$descend);
- }
- }
- closedir(D);
- }
- return @files;
-}
-
-
-#
-# strip_project_val(tag)
-#
-# Strips white space from project value strings.
-#
-
-sub strip_project_val {
- my($v) = @_;
- $v =~ s/^\s+//; # trim white space
- $v =~ s/\s+$//;
- return $v;
-}
-
-#
-# Objects(files)
-#
-# Replaces any extension with .o ($obj_ext).
-#
-
-sub Objects {
- local($_) = @_;
- my(@a);
- @a = split(/\s+/,$_);
- foreach ( @a ) {
- s-\.\w+$-.${obj_ext}-;
- }
- return join(" ",@a);
-}
-
-
-sub make_dep {
-
- $outfile = "make.dep";
-
- print STDERR "Parsing source files...\n";
-
- open(DEP,">" . fix_path($outfile)) or
- die ("Can't create \"$outfile\"");
-
- &BuildObj( $objectlist, $sourcelist );
-
- $datestr = gmtime();
- print DEP "########################################################\n";
- print DEP "## File: make.dep\n";
- print DEP "## Purpose: Dependency listing for use by Makefiles\n";
- print DEP "## Generated by mkdep.pl at :$datestr\n";
- print DEP "## Do not edit this file! Changes will be lost.\n";
- print DEP "########################################################\n\n";
- print DEP $text;
- close DEP;
- print STDERR "\n";
-
-
- if ( $warnon && (keys %missing) ) {
- # print out missing files
- if ( !open MISSING, ">makemiss.txt" ) {
- print "Couldn't create \"makemiss.txt\": $!\n";
- print "Printing on screen.\n";
- *MISSING = *STDOUT;
- }
-
- print MISSING "Missing files: (Note: only the first miss for each file is logged)\n\n";
- printf MISSING "%-32s %s\n","<file>","<included from>";
- printf MISSING "%-32s %s\n","------","---------------";
- @missingfiles = sort @missingfiles;
- foreach ( @missingfiles ) {
- @a = split( ",", $_ );
- printf MISSING "%-32s %s\n",$a[0],$a[1];
- }
- close MISSING;
-
- print STDOUT "(missing files written to \"makemiss.txt\")\n";
- }
-}
-
-
-#
-# BuildObj(objects,sources)
-#
-# Builds the object files.
-#
-
-sub uniq (@) {
- if ($#_ <= 0) {
- return @_;
- }
- my $prev = shift(@_);
- my @ret = ($prev);
- while(@_) {
- my $curr = shift(@_);
- if ($curr ne $prev) {
- push @ret, $curr;
- $prev = $curr;
- }
- }
- return @ret;
-}
-
-sub BuildObj {
- my($obj,$src) = @_;
- my(@objv,$srcv,$i,$s,$o,$d,$c,$comp,$cimp);
- $text = "";
- @objv = split(/\s+/,$obj);
- @srcv = split(/\s+/,$src);
- $tot = $#objv;
-
- # fix dependpath
- if ( ! $depend_path_fixed ) {
- $depend_path_fixed = 1;
- $depend_path = $include_path;
- $count = 0;
-
- while ( $count < 100 ) {
- if ( $depend_path =~ s/(\$[\{\(]?\w+[\}\)]?)/035/ ) {
- $_ = $1;
- s/[\$\{\}\(\)]//g;
- $depend_path =~ s/035/$ENV{$_}/g;
- } else {
- $count = 100;
- }
- }
- @dep_path = &split_path($depend_path);
- unshift @dep_path, ""; # current dir first
- }
-
- %missing = ();
- # go through file list
- for $i ( 0..$#objv ) {
- $s = $srcv[$i];
- $o = $objv[$i];
- next if $s eq "";
-
- if ( $warnon ) {
- print STDERR "\r" . ($i+1) . " missing files: ". scalar keys %missing;
- }
- else {
- print STDERR "\r" . ($i+1);
- }
-
- @incfiles = ();
- $d = &make_depend(lc $s);
-
- for ( @incfiles ) {
- push @ifiles, $full_path{$n};
- }
-
- $text .= $o . ": ${linebreak}\n\t" . $s;
-
- @incpath = ();
- for ( @incfiles ) {
- if ( defined $full_path{$_} ) {
- push @incpath, $full_path{$_};
- }
- }
- @incpath = uniq sort @incpath;
- for ( @incpath ) {
- $text .= " ${linebreak}\n\t" . $_;
- }
- $text .= "\n\n";
-
- # -----------------------------
-# print "\n". $text;
-# exit;
- }
- chop $text;
-}
-
-
-#
-# build_dep() - Internal for make_depend()
-#
-
-sub build_dep {
- my($file) = @_;
- my(@i,$a,$n);
- $a = "";
-
- if ( !defined $depend_dict{$file} ) {
- return $a;
- }
-
- @i = split(/ /,$depend_dict{$file});
-# print "INC2: ($file) ".$depend_dict{$file}."\n";
-
- for $n ( @i ) {
-# if ( (!defined $dep_dict{$n}) && defined($full_path{$n}) ) {
- if ( !defined $dep_dict{$n} ) {
- $dep_dict{$n} = 1;
- push @incfiles, $n;
-# $a .= $full_path{$n} . " " . &build_dep($n);
- &build_dep($n);
- }
- }
-# print "INCFILES ($file): ".@incfiles."\n";
- return $a;
-}
-
-
-#
-# make_depend(file)
-#
-# Returns a list of included files.
-# Uses the global $depend_path variable.
-#
-
-sub make_depend {
- my($file) = @_;
- my($i,$count);
- if ( $nodepend ) {
- return "";
- }
-
- @cur_dep_path = @dep_path;
- if ( $file =~ /(.*[\/\\])/ ) {
- $dep_curdir = $1;
- splice( @cur_dep_path, 0, 0, $dep_curdir );
- } else {
- $dep_curdir = "";
- }
- $dep_file = $file;
- &canonical_dep($file);
- %dep_dict = ();
-
-
- $i = &build_dep($file);
-# chop $i;
-
- $i =~ s=/=$dir_sep=g unless $is_unix;
- $i =~ s=([a-zA-Z]):/=//$1/=g if (defined($gnuwin32) && $gnuwin32);
-# @l = sort split(/ /,$i);
- @l = split(/ /,$i);
- return join(" ${linebreak}\n\t", @l );
-# return $i; # all on one line!
-}
-
-#
-# canonical_dep(file) - Internal for make_depend()
-#
-# Reads the file and all included files recursively.
-# %depend_dict associates a file name to a list of included files.
-#
-
-sub canonical_dep {
- my($file) = @_;
- my(@inc,$i);
- push @sfile, $file;
- # -----------------------------
-# print "FILE: $file\n";
- @inc = &scan_dep($file);
-
- if ( @inc ) {
- $depend_dict{$file} = join(" ",@inc);
-
- # recursively scan all files not already scanned
- for $i ( @inc ) {
- if ( ! defined( $depend_dict{$i} ) ) {
- &canonical_dep($i);
-
- # still nothing defined?
- if ( ! defined( $depend_dict{$i} ) ) {
- # insert dummy string, so we don't parse the file again
- $depend_dict{$i} = "";
- }
-# print "CACHE: $i: $depend_dict{$i}\n";
- }
- }
- }
- pop @sfile, $file;
-}
-
-#
-# scan_dep(file) - Internal for make_depend()
-#
-# Returns an array of included files.
-#
-
-sub scan_dep {
- my($file) = @_;
- my($dir,$path,$found,@allincs,@includes,%incs);
- $path = ($file eq $dep_file) ? $file : $dep_curdir . $file;
- @includes = ();
-
-# print STDERR "SCAN_DEP $file\n";
-
- # replace backslash with regular slash
- $file =~ s-\\-/-g;
-
- # look in the file list
- if ( !defined $full_path{$file} ) {
- # file not in list - some special case
-
- # handle explicit path'ed includes (such as #include "common/bsp821.h")
- if ( $file =~ /[\/\\]([^\\\/]+)$/ ) {
- $full_path{$file} = $full_path{$1};
- }
- }
-
- $open = open TMP,fix_path( $full_path{$file} );
-
- if ( $open ) {
- @source = <TMP>;
-
- # find all lines with include as first text in line (no comments allowed)
- @allincs = grep(/^\s*[\#\.]\s*include/,@source);
-
-# print "SCAN_ALLINC: $#allincs include lines found\n";
-
- # iterate all include lines
- foreach ( @allincs ) {
- # parse out filename
- if ( !(/\s*[\#\.]\s*include\s+[<\"]([^>\"]*)[>\"]/) || defined($incs{$1}) ) {
- next;
- }
- push(@includes, ($tolower==0 ? $1 : lc($1)));
-
-# print "SCAN_INC: $1\n";
-
- $incs{$1} = "1";
- }
-
- # -----------------------------
-# print "INC: ".join( ",", @includes)."\n";
- close(TMP);
- }
- else {
- &add_missing( $file );
- }
- $/ = "\n";
- return @includes;
-}
-
-
-sub add_missing {
- my($file) = @_;
- @s = @sfile;
- pop @s;
- push @missingfiles, $file.",".join(" -> ",@s);
- $missing{$file} = 1;
-}
-
-#
-# split_path(path)
-#
-# Splits a path containing : (Unix) or ; (MSDOS, NT etc.) separators.
-# Returns an array.
-#
-
-sub split_path {
- my($p) = @_;
- return "" if !defined($p);
- $p =~ s=:=;=g if $is_unix;
- $p =~ s=[/\\]+=/=g;
- $p =~ s=([^/:]);=$1/;=g;
- $p =~ s=([^:;/])$=$1/=;
- $p =~ s=/=$dir_sep=g unless $is_unix;
- return split(/;/,$p);
-}
-
-#
-# fix_path(path)
-#
-# Converts all '\' to '/' if this really seems to be a Unix box.
-#
-
-sub fix_path {
- my($p) = @_;
-# if ( $really_unix ) {
-# $p =~ s-\\-/-g;
-# } else {
-# $p =~ s-/-\\-g;
- $p =~ s-\\-/-g;
-# }
- return $p;
-}
diff --git a/src/mkfiles.pl b/src/mkfiles.pl
deleted file mode 100755
index 100e54b5b..000000000
--- a/src/mkfiles.pl
+++ /dev/null
@@ -1,228 +0,0 @@
-#!/usr/bin/perl
-############################################################################
-#
-# Creates make.files - a list of all source files
-#
-############################################################################
-
-#
-# main - top level code
-#
-
-if ( @ARGV ) { # parse command line args
- print "usage: perl mkfiles.pl\n\n";
- exit 1;
-}
-
-$tolower = 0; #Do we want to convert items in make.files to lower case?
-$verbose = 1; #Do we want to list the files?
-
-
-
-print "###########################\n";
-print "## Generating make.files ##\n";
-print "###########################\n";
-
-&doMakeFiles(); #Do your magic!
-
-print "###########################\n";
-print "## make.files done ##\n";
-print "###########################\n";
-
-exit 0;
-
-
-
-############################################################################
-#
-# Main routine. Read make.exclude, then search the current directory
-# recursively for source code items, rejecting those listed in make.exclude
-#
-############################################################################
-sub doMakeFiles
-{
- my $excludes; #list of files to exclude
- my @excluded; #list of files that were actually excluded
- my @irrelevant; #list of files in make.exclude that were not found
- my $line; #current line from make.exclude
- my $patterns; #The extensions for which to search
- my @files; #Result of find_files()
- my @codefiles; #Sorted list of @files
- my $datestr; #Current date
- local(*MAKE_DOT_EXCLUDE);
- local(*MAKE_DOT_FILES);
-
- if ( -r "make.exclude" )
- {
- open MAKE_DOT_EXCLUDE, "make.exclude" or
- die "make.exclude: $!";
- while (<MAKE_DOT_EXCLUDE>)
- {
- $line = $_;
- #Trim whitespace from ends
- # $line =~ s/^\s|\t|\n//;
-+ $line =~ s/^\s+//;
-+ $line =~ s/\s+$//;
- #Ignore if no text in line
- next if ( length($line) < 1 );
- #Ignore if starts with '#'
- next if ( $line =~ /^#/ );
- # print $line, "\n";
- $excludes->{$line} = 1;
- }
- close MAKE_DOT_EXCLUDE;
- }
-
- #while ( my ($key, $value) = each(%{$excludes}) )
- # {
- # print "$key => $value\n";
- # }
-
- $patterns = '.c$|.cpp$|.h$|.hpp$|.xpm$';
-
- @files = &find_files(".", $patterns, $excludes, \@excluded);
-
- # Print the list of files excluded
- print "###EXCLUDED: ", scalar(@excluded), " files/directories rejected by request\n";
- @excluded = sort(@excluded);
- foreach (@excluded)
- {
- if ($verbose)
- {
- print " $_\n";
- }
- #mark the item in the hash table , so we know it occurred
- $excludes->{$_} = 0;
- }
-
- # Count how many files in make.exclude were not used
- foreach (keys(%{$excludes}))
- {
- #if still a 1, then it was not used
- if ($excludes->{$_} !=0)
- {
- push @irrelevant, $_;
- }
- }
-
- # Print the list of file in make.exclude, but not used.
- if (scalar(@irrelevant)>0)
- {
- @irrelevant = sort(@irrelevant);
- print "###IRRELEVANT: ", scalar(@irrelevant), " entries in make.exclude that were not found\n";
- foreach (@irrelevant)
- {
- if ($verbose)
- {
- print " $_\n";
- }
- }
- }
-
- @codefiles = sort(@files);
-
- $datestr = gmtime();
- open MAKE_DOT_FILES, ">make.files" or
- die("make.files: $!");
- print MAKE_DOT_FILES "########################################################\n";
- print MAKE_DOT_FILES "## File: make.files\n";
- print MAKE_DOT_FILES "## Purpose: Used by mkdep.pl\n";
- print MAKE_DOT_FILES "## Generated by mkfiles.pl at :$datestr\n";
- print MAKE_DOT_FILES "########################################################\n\n";
- foreach (@codefiles)
- {
- next if (length($_)<1);
- print MAKE_DOT_FILES "$_\n";
- }
- close MAKE_DOT_FILES;
-
-} # doMakeFiles
-
-
-
-
-############################################################################
-#
-# Search the current directory recursively, checking rejecting items from
-# make.exclude, or adding those that match the extensions in $patterns.
-# @param $dir the current directory being searched
-# @param $patterns the file extensions for which we are searching
-# @param $excludes a hash of the files which should be rejected
-# @param $excluded an array in which to store a record of all files rejected
-#
-############################################################################
-sub find_files
-{
- my($dir, $patterns, $excludes, $excluded) = @_;
- my $file;
- my $p;
- my @files = ();
- my @file_result;
- local(*DIR);
-
-
- $dir =~ s=\\=/=g;
-
- # Check for 0-length
- if (length($dir)<1)
- {
- $dir = '.';
- }
-
- # Process a directory of files
- if ( opendir(DIR,$dir) )
- {
- # Remove leading .
- if ( $dir eq '.' )
- {
- $dir = '';
- }
-
- foreach $file ( readdir(DIR) )
- {
- # Don't allow '..'
- next if ( $file =~ /^\.\.?$/ );
- next if ( length($file)<1 );
-
- if (length($dir)>0)
- {
- $p = $dir . '/' . $file;
- }
- else
- {
- $p = $file;
- }
-
- if ($tolower != 0)
- {
- $p = lc($p);
- }
-
- #print "File:$p\n";
-
- # Check if it is an excluded file
- if (defined($excludes->{$p}))
- {
- #print "EXCLUDED:$p\n";
- push @{$excluded}, $p;
- next;
- }
- # Check for a desired extension
- if ($p =~ /$patterns/i)
- {
- #print "match:$p\n";
- push @files, $p;
- next;
- }
- #We have seen '0' inserted from a null result. This
- #should avoid this problem
- @file_result = &find_files($p, $patterns, $excludes, $excluded);
- if (scalar(@file_result)>0)
- {
- push @files, @file_result;
- }
- }
- closedir(DIR);
- }
- return @files;
-}
diff --git a/src/pedro/pedrogui.cpp b/src/pedro/pedrogui.cpp
index 4b4bccbaa..66673e8fa 100644
--- a/src/pedro/pedrogui.cpp
+++ b/src/pedro/pedrogui.cpp
@@ -2482,6 +2482,9 @@ void PedroGui::disconnectCallback()
void PedroGui::quitCallback()
{
+ client.disconnect();
+ //hide();
+ //Severe overkill! :-)
Gtk::Main::quit();
}