diff options
author | Norbert Preining <preining@logic.at> | 2008-01-07 07:50:43 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-07 07:50:43 +0000 |
commit | 63de2021e9e06d392d3a70d74ebee8837ae9b3d9 (patch) | |
tree | 5777d3d7d22e66c2101dfae324da085ca52b5e13 /Master/tlpkg/TeXLive | |
parent | 32af3f298073d8244aa74a87b2ff1ce98cb0d940 (diff) |
new pattern language extension: binpatterns can have arch specifier after
the pattern specifier, like in
binpattern f/win32 tlpkg/bin/perl.exe
(that couldn't be dealt with before since the string win32 doesn't show
up in the pattern somewhere)
git-svn-id: svn://tug.org/texlive/trunk@6070 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 52 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLTREE.pm | 8 |
2 files changed, 52 insertions, 8 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 8bc5f6f8d36..0821aef04cf 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -522,14 +522,16 @@ adds a pattern (see below) to the respective list of patterns. Patterns specify which files are to be included into a C<tlpobj> at expansion time. Patterns are of the form - [PREFIX]TYPE PAT + [PREFIX]TYPE[/ARCH] PAT where PREFIX = + | +! | ! TYPE = t | f | d | r + ARCH = <some arch specificatin> -The meaning of the various pattern types is +Simple patterns without PREFIX and ARCH specification are explained first, +see below for these extensions. =over @@ -559,6 +561,20 @@ includes all files matching the regexp C</^regexp$/> =back +=head2 Special patterns + +=over 6 + +=item PREFIX + +If the C<PREFIX> contains the symbol C<!> the meaning of the pattern is +reversed, i.e., file matching this pattern are removed from the list +of included files. + +The prefix C<+> deals with the autogeneration of patterns. + +=item Auto generated patterns + In the case that one of the pattern sections is empty or B<all> the provided patterns have the prefix C<+> (e.g., C<+f ...>), then the following patterns are B<automatically> added at expansion time (but never written to the @@ -603,16 +619,20 @@ for C<srcpattern> of category C<Documentation> binpatterns are never automatically added. -If the C<PREFIX> contains the symbol C<!> the meaning of the pattern is -reversed, i.e., file matching this pattern are removed from the list -of included files. +=item special treatment of binpatterns -=head2 arch expansion +The binpatterns have to deal with all the different architectures. To +ease the writing of patterns several extensions to the above pattern +language are allowed: -In case the string C<${>I<ARCH>C<}> occurs in one C<binpattern> it is +=over 6 + +=item arch expansion + +In case the string C<${>I<ARCH>} occurs in one C<binpattern> it is automatically expanded to the respective architecture. -=head2 C<bat/exe/dll> for win32 +=item C<bat/exe/dll> for win32 For C<binpattern>s of the form C<f bin/win32/foobar> (i.e., also for a binpattern of the form C<f bin/${ARCH}/foobar>) files C<foobar.bat>, @@ -628,6 +648,22 @@ and would get C<bin/win32/dvips.exe> into the runfiles for C<arch=win32>. Note that the C<bat>/C<exe> expansion B<only> works for patterns of the C<f> type! +=item ARCH specification of a pattern + +Sometimes some files should be included into the list of binfiles of +a package only for one architecture. This can be done by specifying +the architecture after the pattern specifier using a C</>: + + binpattern f/win32 tlpkg/bin/perl.exe + +will include the file C<tlpkg/bin/perl.exe> only in the binfiles for +the architecture win32. + +=back + +=back + + =head1 MEMBER ACCESS FUNCTIONS For any of the above I<keys> a function diff --git a/Master/tlpkg/TeXLive/TLTREE.pm b/Master/tlpkg/TeXLive/TLTREE.pm index 8b2e1a02d49..d3742cfe981 100644 --- a/Master/tlpkg/TeXLive/TLTREE.pm +++ b/Master/tlpkg/TeXLive/TLTREE.pm @@ -175,6 +175,14 @@ sub size_of { sub get_matching_files { my ($self, $type, $p) = @_; if ($type eq "bin") { + # binpatterns can have an additions specifier after the prefix: /ARCH + # which specifies that these patterns are ONLY for the specified arch! + if ($p =~ m!^(\w+)/(\w+)\s+(.*)$!) { + printf STDERR "FOUND ARCH DEP PATTERN $p\n"; + my @foo = $self->_get_matching_files($type,"$1 $3"); + $returnfiles{$2} = [ @foo ]; + return(\%returnfiles); + } # we first substitute arch for ${ARCH} my %returnfiles; foreach $a ($self->architectures) { |