[libsigc++2] Refresh doc-install and doc-postprocess copies
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsigc++2] Refresh doc-install and doc-postprocess copies
- Date: Sun, 9 Aug 2009 15:12:50 +0000 (UTC)
commit 2f72da11b557b102bf080b15f2f7bdd39d098a6f
Author: Daniel Elstner <danielk openismus com>
Date: Sun Aug 9 17:11:00 2009 +0200
Refresh doc-install and doc-postprocess copies
* scripts/doc-install.pl, scripts/doc-postprocess.pl: Copy
latest versions from the mm-common module.
* docs/Makefile.am (doc_install), (doc_postprocess): Include
$(PERL) interpreter command in front of the script name.
ChangeLog | 9 +++++++++
docs/Makefile.am | 8 ++++----
scripts/doc-install.pl | 26 ++++++++++++++++++++------
scripts/doc-postprocess.pl | 2 +-
4 files changed, 34 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2ebe37e..fa5e8ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-08-09 Daniel Elstner <danielk openismus com>
+
+ Refresh doc-install and doc-postprocess copies
+
+ * scripts/doc-install.pl, scripts/doc-postprocess.pl: Copy
+ latest versions from the mm-common module.
+ * docs/Makefile.am (doc_install), (doc_postprocess): Include
+ $(PERL) interpreter command in front of the script name.
+
2009-08-08 Daniel Elstner <danielk openismus com>
Disable extraction of undocumented identifiers
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 9383d98..213d3ea 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -24,15 +24,15 @@ htmlrefpub = $(pubdocbase)libsigc2/docs/reference/html
doc_input = $(addprefix $(top_srcdir)/sigc++/,$(sigc_public_h)) \
$(addprefix $(top_builddir)/sigc++/,$(sigc_built_h))
-doc_install = $(top_srcdir)/scripts/doc-install.pl
-doc_postprocess = $(top_srcdir)/scripts/doc-postprocess.pl
+# Override utility locations to point to the local files.
+doc_install = $(PERL) -- $(top_srcdir)/scripts/doc-install.pl
+doc_postprocess = $(PERL) -- $(top_srcdir)/scripts/doc-postprocess.pl
tagfile_to_devhelp2 = $(top_srcdir)/scripts/tagfile-to-devhelp2.xsl
include $(top_srcdir)/scripts/doc-reference.am
doc_imagesdir = $(libdocdir)/images
-
dist_libdoc_DATA = index.html
dist_doc_images_DATA = images/libsigc_logo.gif images/top.gif
-include doc-manual.am
+include $(srcdir)/doc-manual.am
diff --git a/scripts/doc-install.pl b/scripts/doc-install.pl
index 3bca5f7..19515ad 100644
--- a/scripts/doc-install.pl
+++ b/scripts/doc-install.pl
@@ -1,6 +1,6 @@
package main;
-# Copyright (c) 2009 Daniel Elstner <daniel kitta gmail com>
+# Copyright (c) 2009 Openismus GmbH <http://www.openismus.com/>
#
# This file is part of mm-common.
#
@@ -30,7 +30,8 @@ my $book_base;
my $perm_mode;
my $target_dir;
my $target_nodir = '';
-my $verbose = '';
+my $expand_glob = '';
+my $verbose = '';
sub path_basename ($)
{
@@ -54,11 +55,12 @@ while setting permission modes. For HTML files, translate references to
external documentation.
Mandatory arguments to long options are mandatory for short options, too.
- -k, --book-base=BASEPATH use reference BASEPATH for Devhelp book
+ --book-base=BASEPATH use reference BASEPATH for Devhelp book
-l, --tag-base=TAGFILE\ BASEPATH use BASEPATH for references from TAGFILE
-m, --mode=MODE override file permission MODE (octal)
-t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY
-T, --no-target-directory treat DEST as normal file
+ --glob expand SOURCE as filename glob pattern
-v, --verbose enable informational messages
-?, --help display this help and exit
EOF
@@ -156,11 +158,12 @@ $message_prefix = ($message_prefix || 'doc-install') . ': ';
my @tags = ();
my $mode = '0644';
- GetOptions('book-base|k=s' => \$book_base,
+ GetOptions('book-base=s' => \$book_base,
'tag-base|l=s' => \ tags,
'mode|m=s' => \$mode,
'target-directory|t=s' => \$target_dir,
'no-target-directory|T' => \$target_nodir,
+ 'glob' => \$expand_glob,
'verbose|v' => \$verbose,
'help|?' => \&exit_help)
or exit 2;
@@ -176,6 +179,7 @@ if ($target_nodir)
{
error('Conflicting target directory options') if (defined $target_dir);
error('Source and destination filenames expected') unless ($#ARGV == 1);
+ error('Filename globbing requires target directory') if ($expand_glob);
install_file($ARGV[0], $ARGV[1], path_basename($ARGV[1]));
exit;
@@ -183,7 +187,7 @@ if ($target_nodir)
unless (defined $target_dir)
{
- if ($#ARGV == 1)
+ if (!$expand_glob and $#ARGV == 1)
{
my $basename = path_basename($ARGV[1]);
@@ -197,11 +201,21 @@ unless (defined $target_dir)
}
error('No target directory specified') unless (defined($target_dir) and $target_dir ne '');
+ ARGV = map(glob, @ARGV) if ($expand_glob);
+my %basename_hash = ();
+
foreach my $in_name (@ARGV)
{
my $basename = path_basename($in_name);
my $out_name = File::Spec->catfile($target_dir, $basename);
- install_file($in_name, $out_name, $basename);
+ # If there are multiple files with the same base name in the list, only
+ # the first one will be installed. This behavior makes it very easy to
+ # implement a VPATH search for each individual file.
+ unless (exists $basename_hash{$basename})
+ {
+ $basename_hash{$basename} = undef;
+ install_file($in_name, $out_name, $basename);
+ }
}
exit;
diff --git a/scripts/doc-postprocess.pl b/scripts/doc-postprocess.pl
index 76a9f0a..7da75d8 100644
--- a/scripts/doc-postprocess.pl
+++ b/scripts/doc-postprocess.pl
@@ -21,7 +21,7 @@ use strict;
use warnings;
use bytes;
-foreach my $filename (@ARGV)
+foreach my $filename (map(glob, @ARGV))
{
my @outbuf = ();
my $file;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]