[gstreamermm] Removed local copy of generate_wrap_init.pl.
- From: José Alburquerque <jaalburqu src gnome org>
- To: svn-commits-list gnome org
- Subject: [gstreamermm] Removed local copy of generate_wrap_init.pl.
- Date: Mon, 18 May 2009 15:59:43 -0400 (EDT)
commit 86cd798cf3f4dd4ba22b704b5b530f64cc520ff2
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Mon May 18 15:57:13 2009 -0400
Removed local copy of generate_wrap_init.pl.
---
ChangeLog | 8 +
build_shared/Makefile_gensrc.am_fragment | 7 +-
configure.ac | 1 -
tools/generate_wrap_init.pl.in | 397 ------------------------------
4 files changed, 11 insertions(+), 402 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cc6193c..5276f51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-18 José Alburquerque <jaalburqu svn gnome org>
+
+ * build_shared/Makefile_gensrc.am_fragment:
+ * configure.ac:
+ * tools/generate_wrap_init.pl.in: Removed local copy of
+ generate_wrap_init.pl.
+ * tools/generate_gst_wrap_init.pl.in: Removed execute permissions.
+
2009-05-17 José Alburquerque <jaalburqu svn gnome org>
* gstreamer/src/baseaudiosink.hg:
diff --git a/build_shared/Makefile_gensrc.am_fragment b/build_shared/Makefile_gensrc.am_fragment
index 1bf891d..e57a43d 100644
--- a/build_shared/Makefile_gensrc.am_fragment
+++ b/build_shared/Makefile_gensrc.am_fragment
@@ -44,10 +44,9 @@ gmmproc_args = -I $(tools_dir_m4) --defs $(srcdir)
run_gmmproc = $(gmmproc_path) $(gmmproc_args)
# The normal Glib::wrap() table initialization:
-gen_wrap_init_in = $(tools_dir)/generate_wrap_init.pl.in
-gen_wrap_init_path = $(tools_dir)/generate_wrap_init.pl
+gen_wrap_init_path = $(gmmproc_dir)/generate_wrap_init.pl
gen_wrap_init_args = --namespace=$(sublib_namespace) --parent_dir=$(sublib_parentdir)
-run_gen_wrap_init = $(PERL_PATH) $(gen_wrap_init_path) $(gen_wrap_init_args)
+run_gen_wrap_init = $(gen_wrap_init_path) $(gen_wrap_init_args)
# The Gst::wrap() table initialization:
gen_gst_wrap_init_in = $(tools_dir)/generate_gst_wrap_init.pl.in
@@ -142,7 +141,7 @@ $(destdir_stamp_dir)/stamp-%: $(gensrc_destdir)/%.h
files_hg_with_path = $(patsubst %.hg,$(srcdir)/%.hg,$(files_all_hg))
-$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_in) $(files_hg_with_path) \
+$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_path) $(files_hg_with_path) \
$(files_all_plugin_hg_with_path)
$(run_gen_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) \
$(files_all_plugin_hg:%.hg=$(srcdir)/%.hg) > $@
diff --git a/configure.ac b/configure.ac
index 8853cb5..8d9da40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -402,7 +402,6 @@ AC_CONFIG_FILES([
gstreamer/gstreamermm/private/Makefile
tools/Makefile
- tools/generate_wrap_init.pl
tools/generate_gst_wrap_init.pl
tools/m4/Makefile
tools/extra_defs_gen/Makefile
diff --git a/tools/generate_gst_wrap_init.pl.in b/tools/generate_gst_wrap_init.pl.in
old mode 100755
new mode 100644
diff --git a/tools/generate_wrap_init.pl.in b/tools/generate_wrap_init.pl.in
deleted file mode 100644
index 730dede..0000000
--- a/tools/generate_wrap_init.pl.in
+++ /dev/null
@@ -1,397 +0,0 @@
-#! @PERL_PATH@
-#
-# @configure_input@
-#
-
-use strict;
-
-my @namespace_whole = (); # list of strings.
-my $function_prefix = "";
-my $parent_dir = ""; # e.g. gtkmm
-my $path = "gtk--";
-my $debug = 0;
-my @filenames_headers = ();
-my %objects = ();
-my %exceptions = ();
-my %namespaces = (); # hashmap of lists of strings.
-my %basenames = ();
-my %win32_nowrap = ();
-my %deprecated = ();
-my %is_gstreamermm_plugin = ();
-
-# Loop through command line arguments, setting variables:
-while ($ARGV[0] =~ /^-/)
-{
- if ($ARGV[0] =~ /--namespace=(\S+)/)
- {
- push(@namespace_whole, $1);
-
- if($parent_dir eq "")
- { $parent_dir = lc($1) . "mm"; }
- }
- elsif ($ARGV[0] =~ /--function_prefix=(\S+)/)
- {
- $function_prefix = "$1";
- }
- elsif ($ARGV[0] =~ /--parent_dir=(\S+)/)
- {
- $parent_dir = "$1";
- }
- elsif
- (
- $ARGV[0] =~ /--debug/) {$debug = 1;
- }
- elsif ($ARGV[0] =~ /--path=(\S+)/)
- {
- $path = "$1";
- }
- else
- {
- print "Error: unknown option $ARGV[0]\n";
- exit;
- }
-
- shift @ARGV;
-}
-
-
-
-while ($ARGV[0])
-{
- if ($debug) {warn "Processing file : $ARGV[0]\n";}
-
- my $filename = $ARGV[0];
- open FILE, $filename or die "Couldn't open file $ARGV[0] : $!\n";
-
- # my $file = $ARGV[0];
- # $file =~ s/.*\/([^\/]+)$/$1/;
- # $file =~ s/\.hg//;
- my @tmpnamespace = @namespace_whole;
- my $cppname = "";
- my $cname = "";
- my $ccast = "";
- while (<FILE>)
- {
- if (/CLASS_START\((\w+)\)/) #We need a new way to get the namespace.
- {
- print "generate_wrap_init: namespace found: $1\n";
- push(@tmpnamespace, $1);
- }
- elsif (/_CLASS_GOBJECT\s*\(/) #TODO: There is duplication of code here.
- {
- my $line = $_;
- while ($line !~ /\)/ && ($_ = <FILE>))
- {
- $line .= $_;
- }
-
- $line =~ s/^.*_CLASS_GOBJECT\s*\(//;
- $line =~ s/\s+//g;
- ($cppname, $cname, $ccast) = split(/,/, $line);
-
- $objects{$cppname} = $cname;
- @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
- $basenames{$cppname} = lc($ccast);
- }
- elsif (/_CLASS_GTKOBJECT\s*\(/)
- {
- my $line = $_;
- while ($line !~ /\)/ && ($_ = <FILE>))
- {
- $line .= $_;
- }
-
- $line =~ s/^.*_CLASS_GTKOBJECT\s*\(//;
- $line =~ s/\s+//g;
- ($cppname, $cname, $ccast) = split(/,/, $line);
-
- #TODO: Remove this hack eventually.
- if( ($cname ne "GtkTree") && ($cname ne "GtkTreeItem") && ($cname ne "GtkText") )
- {
- $objects{$cppname} = $cname;
- @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
- $basenames{$cppname} = lc($ccast);
- }
- }
- elsif (/_WRAP_GERROR\s*\(/) #TODO: There is duplication of code here.
- {
- my $line = $_;
- while ($line !~ /\)/ && ($_ = <FILE>))
- {
- $line .= $_;
- }
-
- $line =~ s/^.*_WRAP_GERROR\s*\(//;
- $line =~ s/\s+//g;
- $line =~ s/\)//;
- ($cppname, $cname, $ccast) = split(/,/, $line);
-
- $exceptions{$cppname} = $cname;
- @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
- $basenames{$cppname} = lc($ccast);
- }
- elsif (/_GTKMMPROC_WIN32_NO_WRAP/)
- {
- $win32_nowrap{$cppname} = 1;
- }
- elsif (/_IS_DEPRECATED/)
- {
- $deprecated{$cppname} = 1;
- }
- elsif (/_IS_GSTREAMERMM_PLUGIN/)
- {
- $is_gstreamermm_plugin{$cppname} = 1;
- }
- }
-
- # Store header filename so that we can #include it later:
- my $filename_header = $filename;
- $filename_header =~ s/.*\/([^\/]+)\.hg/$1.h/;
- push(@filenames_headers, $filename_header);
-
- shift @ARGV;
- close(FILE);
-}
-
-# my $namespace_whole_lower = lc($namespace_whole);
-
-print << "EOF";
-
-#include <glib.h>
-
-// Disable the 'const' function attribute of the get_type() functions.
-// GCC would optimize them out because we don't use the return value.
-#undef G_GNUC_CONST
-#define G_GNUC_CONST /* empty */
-
-#include <${parent_dir}/wrap_init.h>
-#include <glibmm/error.h>
-#include <glibmm/object.h>
-
-// #include the widget headers so that we can call the get_type() static methods:
-
-EOF
-
-foreach( @filenames_headers )
-{
- print "#include \"" . $_ . "\"\n";
-}
-
-print "\n";
-
-# Here we have to be subtle. The gtkmm objects are easy, they all go
-# into the Gtk namespace. But in gnomemm, some go into the Gnome
-# namespace (most of them), and some into the Gtk one (because the
-# corresponding widget is Gtk-prefixed, e.g. GtkTed, GtkDial, etc...
-
-# First, the Gtk namespace
-
-print "extern \"C\"\n";
-print "{\n";
-print "\n//Declarations of the *_get_type() functions:\n\n";
-
-my $i = 0;
-foreach $i (sort keys %objects)
-{
- if( $deprecated{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
- }
-
- #On Win32, these classes are not compiled:
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#ifndef G_OS_WIN32\n"
- }
-
- print "GType $basenames{$i}_get_type(void);\n";
-
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#endif //G_OS_WIN32\n"
- }
-
- if( $deprecated{$i} eq 1 )
- {
- print "#endif // *_DISABLE_DEPRECATED\n"
- }
-}
-
-print "\n//Declarations of the *_error_quark() functions:\n\n";
-
-my $i = 0;
-foreach $i (sort keys %exceptions)
-{
- print "GQuark $basenames{$i}_quark(void);\n";
-}
-
-print "} // extern \"C\"\n";
-print "\n";
-
-print "\n//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:\n\n";
-
-my $i = 0;
-foreach $i (sort keys %objects)
-{
- if( $deprecated{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
- }
-
- #On Win32, these classes are not compiled:
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#ifndef G_OS_WIN32\n"
- }
-
- my $namespace_declarations = "";
- my $namespace_close = "";
- foreach ( @{$namespaces{$i}} )
- {
- $namespace_declarations .= "namespace $_ { ";
- $namespace_close .= " }";
- }
-
- print "${namespace_declarations} class ${i}_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; ${namespace_close}\n";
-
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#endif //G_OS_WIN32\n"
- }
-
- if( $deprecated{$i} eq 1 )
- {
- print "#endif // *_DISABLE_DEPRECATED\n"
- }
-}
-
-# print "\n//Declarations of the *Error::throw_func() methods:\n\n";
-#
-# my $i = 0;
-# foreach $i (sort keys %exceptions)
-# {
-# my $namespace_declarations = "";
-# my $namespace_close = "";
-# foreach ( @{$namespaces{$i}} )
-# {
-# $namespace_declarations .= "namespace $_ { ";
-# $namespace_close .= " }";
-# }
-#
-# print "${namespace_declarations} class ${i} { public: static void throw_func(GError*); }; ${namespace_close}\n";
-# }
-
-my $namespace_whole_declarations = "";
-my $namespace_whole_close = "";
-foreach( @namespace_whole )
-{
- $namespace_whole_declarations .= "namespace " . $_ ." { ";
- $namespace_whole_close = "} //" . $_ . "\n" . $namespace_whole_close;
-}
-
-print "\n";
-print "$namespace_whole_declarations\n";
-print "\n";
-print "void " .$function_prefix . "wrap_init()\n{\n";
-
-
-# Generate namespace::wrap_init() body
-#
-
-print " // Register Error domains:\n";
-
-foreach $i (sort keys %exceptions)
-{
- my $namespace_prefix = "";
- foreach( @{$namespaces{$i}} )
- {
- $namespace_prefix .= $_ ."::";
- }
-
- print " Glib::Error::register_domain($basenames{$i}_quark(), &", "${namespace_prefix}${i}::throw_func);\n";
-}
-
-print "\n";
-print "// Map gtypes to gtkmm wrapper-creation functions:\n";
-
-foreach $i (sort keys %objects)
-{
- if( $deprecated{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
- }
-
- #On Win32, these classes are not compiled:
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#ifndef G_OS_WIN32\n"
- }
-
- my $namespace_prefix = "";
- foreach( @{$namespaces{$i}} )
- {
- $namespace_prefix .= $_ ."::";
- }
-
- print " Glib::wrap_register($basenames{$i}_get_type(), &", "${namespace_prefix}${i}_Class::wrap_new);\n";
-
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#endif //G_OS_WIN32\n"
- }
-
- if( $deprecated{$i} eq 1 )
- {
- print "#endif // *_DISABLE_DEPRECATED\n"
- }
-}
-
-print "\n";
-print " // Register the gtkmm gtypes:\n";
-
-foreach $i (sort keys %objects)
-{
- if( $deprecated{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
- }
-
- #On Win32, these classes are not compiled:
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#ifndef G_OS_WIN32\n"
- }
-
- my $namespace_prefix = "";
- foreach( @{$namespaces{$i}} )
- {
- $namespace_prefix .= $_ ."::";
- }
-
- print " ${namespace_prefix}${i}::get_type();\n";
-
- if( $win32_nowrap{$i} eq 1 )
- {
- print "#endif //G_OS_WIN32\n"
- }
-
- if( $deprecated{$i} eq 1 )
- {
- print "#endif // *_DISABLE_DEPRECATED\n"
- }
-}
-
-print << "EOF";
-
-} // wrap_init()
-
-$namespace_whole_close
-
-EOF
-
-exit 0;
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]