[goffice] distcheck fixes



commit c46cb3e976e4328e747d58bd46be0bbe3cb51756
Author: Morten Welinder <terra gnome org>
Date:   Fri Mar 2 18:03:05 2012 -0500

    distcheck fixes

 plugins/plot_barcol/Makefile.am  |    4 ++--
 plugins/plot_distrib/Makefile.am |    4 ++--
 plugins/plot_pie/Makefile.am     |    4 ++--
 plugins/plot_radar/Makefile.am   |    4 ++--
 plugins/plot_surface/Makefile.am |    4 ++--
 plugins/plot_xy/Makefile.am      |    4 ++--
 tools/resource-embedder          |    9 +++++++++
 7 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/plugins/plot_barcol/Makefile.am b/plugins/plot_barcol/Makefile.am
index 0a1a2b8..388b1a6 100644
--- a/plugins/plot_barcol/Makefile.am
+++ b/plugins/plot_barcol/Makefile.am
@@ -28,9 +28,9 @@ endif
 plugin_resources = linegraph.xpm area.xpm bar.xpm column.xpm dropbar.xpm minmax.xpm
 pofiles = $(wildcard $(top_srcdir)/po/*.po)
 
-plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/embedder
+plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/resource-embedder
 	LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $  tmp
-	cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/resource-embedder \
+	@PERL@ $(abs_top_srcdir)/tools/resource-embedder --file-dir $(srcdir) \
 		$  tmp $@
 	rm -f $  tmp
 
diff --git a/plugins/plot_distrib/Makefile.am b/plugins/plot_distrib/Makefile.am
index 75e9797..473430f 100644
--- a/plugins/plot_distrib/Makefile.am
+++ b/plugins/plot_distrib/Makefile.am
@@ -26,9 +26,9 @@ endif
 plugin_resources = dist.xpm
 pofiles = $(wildcard $(top_srcdir)/po/*.po)
 
-plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/embedder
+plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/resource-embedder
 	LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $  tmp
-	cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/resource-embedder \
+	@PERL@ $(abs_top_srcdir)/tools/resource-embedder --file-dir $(srcdir) \
 		$  tmp $@
 	rm -f $  tmp
 
diff --git a/plugins/plot_pie/Makefile.am b/plugins/plot_pie/Makefile.am
index df41ca3..014e331 100644
--- a/plugins/plot_pie/Makefile.am
+++ b/plugins/plot_pie/Makefile.am
@@ -21,9 +21,9 @@ endif
 plugin_resources = pie.xpm doughnut.xpm
 pofiles = $(wildcard $(top_srcdir)/po/*.po)
 
-plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/embedder
+plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/resource-embedder
 	LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $  tmp
-	cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/resource-embedder \
+	@PERL@ $(abs_top_srcdir)/tools/resource-embedder --file-dir $(srcdir) \
 		$  tmp $@
 	rm -f $  tmp
 
diff --git a/plugins/plot_radar/Makefile.am b/plugins/plot_radar/Makefile.am
index 439682a..b6efb9f 100644
--- a/plugins/plot_radar/Makefile.am
+++ b/plugins/plot_radar/Makefile.am
@@ -17,9 +17,9 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
 plugin_resources = radar.xpm polar.xpm
 pofiles = $(wildcard $(top_srcdir)/po/*.po)
 
-plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/embedder
+plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/resource-embedder
 	LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $  tmp
-	cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/resource-embedder \
+	@PERL@ $(abs_top_srcdir)/tools/resource-embedder --file-dir $(srcdir) \
 		$  tmp $@
 	rm -f $  tmp
 
diff --git a/plugins/plot_surface/Makefile.am b/plugins/plot_surface/Makefile.am
index 6dbee26..40c6fc4 100644
--- a/plugins/plot_surface/Makefile.am
+++ b/plugins/plot_surface/Makefile.am
@@ -31,9 +31,9 @@ endif
 plugin_resources = contour.xpm surface.xpm
 pofiles = $(wildcard $(top_srcdir)/po/*.po)
 
-plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/embedder
+plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/resource-embedder
 	LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $  tmp
-	cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/resource-embedder \
+	@PERL@ $(abs_top_srcdir)/tools/resource-embedder --file-dir $(srcdir) \
 		$  tmp $@
 	rm -f $  tmp
 
diff --git a/plugins/plot_xy/Makefile.am b/plugins/plot_xy/Makefile.am
index 7ab0eab..08d0205 100644
--- a/plugins/plot_xy/Makefile.am
+++ b/plugins/plot_xy/Makefile.am
@@ -23,9 +23,9 @@ endif
 plugin_resources = bubble.xpm color.xpm dropbar.xpm scatter.xpm
 pofiles = $(wildcard $(top_srcdir)/po/*.po)
 
-plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/embedder
+plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/resource-embedder
 	LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $  tmp
-	cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/resource-embedder \
+	@PERL@ $(abs_top_srcdir)/tools/resource-embedder --file-dir $(srcdir) \
 		$  tmp $@
 	rm -f $  tmp
 
diff --git a/tools/resource-embedder b/tools/resource-embedder
index 1415655..7c4e2db 100755
--- a/tools/resource-embedder
+++ b/tools/resource-embedder
@@ -26,6 +26,11 @@ use English;
 my $myself = $0;
 $myself =~ s|^.*/||;
 
+my $filedir = ".";
+
+&GetOptions("file-dir=s" => \$filedir,
+    ) or die "$0: invalid usage -- inquire within\n";
+
 my $srcfile = shift @ARGV;
 my $dstfile = shift @ARGV;
 
@@ -46,6 +51,10 @@ sub read_file
 {
     my ($filename) = @_;
 
+    if ($filename !~ m|^/|) {
+	$filename = "$filedir/$filename";
+    }
+
     local (*FIL);
     local $/ = undef;
     open (*FIL, "<$filename") or die "$myself: cannot read $filename: $!\n";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]