summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPSRC.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-12-12 18:40:55 +0000
committerNorbert Preining <preining@logic.at>2008-12-12 18:40:55 +0000
commite5b2e970d482d8d8477546b50792fba9e621ba10 (patch)
tree0d04b6a8e01336c07757c5b94a4f04744bbdc6fc /Master/tlpkg/TeXLive/TLPSRC.pm
parentb3ff88f03cb31f8e31ab553c6cbe87f7959d16cc (diff)
add another pattern a name1 ... which adds auto patterns for name1 to
the current package git-svn-id: svn://tug.org/texlive/trunk@11598 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPSRC.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm47
1 files changed, 33 insertions, 14 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index 9e270af1541..d2d13d98543 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -220,6 +220,7 @@ sub make_tlpobj
my @allpospats;
my @allnegpats;
my $pkgname = $self->name;
+ my @autoaddpat;
# src/run/doc patterns
#
@@ -229,9 +230,16 @@ sub make_tlpobj
for my $pattype (qw/src run doc bin/) {
@allpospats = ();
@allnegpats = ();
+ @autoaddpat = ();
$usedefault = 1;
foreach my $p (@{$self->{${pattype} . 'patterns'}}) {
- if ($p =~ m/^\+!(.*)$/) {
+ if ($p =~ m/^a\s+(.*)\s*$/) {
+ # format
+ # a toplevel1 toplevel2 toplevel3 ...
+ # which add autopatterns as if we are doing single packages
+ # toplevel1 toplevel2 toplevel3
+ push @autoaddpat, split(' ', $1);
+ } elsif ($p =~ m/^\+!(.*)$/) {
push @allnegpats, $1;
} elsif ($p =~ m/^\+(.*)$/) {
push @allpospats, $1;
@@ -244,19 +252,24 @@ sub make_tlpobj
}
}
- if ($usedefault && defined($category_patterns)) {
- my $type_patterns = $category_patterns->{$pattype};
- for my $p (@{$type_patterns}) {
- # replace the string %NAME% with the actual package name
- # we have to make a copy of $p otherwise we change it in the
- # hash once and for all
- (my $pp = $p) =~ s/%NAME%/$pkgname/g;
- # sort through the patterns, and make sure that * are added to
- # tag the default patterns
- if ($pp =~ m/^!(.*)$/) {
- push @allnegpats, "*$1";
- } else {
- push @allpospats, "*$pp";
+ if ($usedefault) {
+ push @autoaddpat, $pkgname;
+ }
+ if (defined($category_patterns)) {
+ for my $a (@autoaddpat) {
+ my $type_patterns = $category_patterns->{$pattype};
+ for my $p (@{$type_patterns}) {
+ # replace the string %NAME% with the actual package name
+ # we have to make a copy of $p otherwise we change it in the
+ # hash once and for all
+ (my $pp = $p) =~ s/%NAME%/$a/g;
+ # sort through the patterns, and make sure that * are added to
+ # tag the default patterns
+ if ($pp =~ m/^!(.*)$/) {
+ push @allnegpats, "*$1";
+ } else {
+ push @allpospats, "*$pp";
+ }
}
}
}
@@ -787,6 +800,12 @@ intervening subdirectories, e.g.:
includes all files matching the regexp C</^regexp$/>
+=item C<a> I<name1> [<name2> ...]
+
+includes auto generated patterns for each I<nameN> as if the package
+itself would be named I<nameN>. That is useful if a package (like venturisadf)
+contains toplevel directories named after different fonts.
+
=back
=head2 Special patterns