"Fossies" - the Fresh Open Source Software Archive

Member "automake-1.16.3/lib/Automake/Language.pm" (19 Nov 2020, 2841 Bytes) of package /linux/misc/automake-1.16.3.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Language.pm" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.16.2_vs_1.16.3.

    1 # Copyright (C) 2013-2020 Free Software Foundation, Inc.
    2 
    3 # This program is free software; you can redistribute it and/or modify
    4 # it under the terms of the GNU General Public License as published by
    5 # the Free Software Foundation; either version 2, or (at your option)
    6 # any later version.
    7 
    8 # This program is distributed in the hope that it will be useful,
    9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
   10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11 # GNU General Public License for more details.
   12 
   13 # You should have received a copy of the GNU General Public License
   14 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
   15 
   16 package Automake::Language;
   17 
   18 use 5.006;
   19 use strict;
   20 use warnings FATAL => 'all';
   21 
   22 use Class::Struct ();
   23 
   24 Class::Struct::struct (
   25     # Short name of the language (c, f77...).
   26     'name' => "\$",
   27     # Nice name of the language (C, Fortran 77...).
   28     'Name' => "\$",
   29 
   30     # List of configure variables which must be defined.
   31     'config_vars' => '@',
   32 
   33     # 'pure' is '1' or ''.  A 'pure' language is one where, if
   34     # all the files in a directory are of that language, then we
   35     # do not require the C compiler or any code to call it.
   36     'pure'   => "\$",
   37 
   38     'autodep' => "\$",
   39 
   40     # Name of the compiling variable (COMPILE).
   41     'compiler'  => "\$",
   42     # Content of the compiling variable.
   43     'compile'  => "\$",
   44     # Flag to require compilation without linking (-c).
   45     'compile_flag' => "\$",
   46     'extensions' => '@',
   47     # A subroutine to compute a list of possible extensions of
   48     # the product given the input extensions.
   49     # (defaults to a subroutine which returns ('.$(OBJEXT)', '.lo'))
   50     'output_extensions' => "\$",
   51     # A list of flag variables used in 'compile'.
   52     # (defaults to [])
   53     'flags' => "@",
   54 
   55     # Any tag to pass to libtool while compiling.
   56     'libtool_tag' => "\$",
   57 
   58     # The file to use when generating rules for this language.
   59     # The default is 'depend2'.
   60     'rule_file' => "\$",
   61 
   62     # Name of the linking variable (LINK).
   63     'linker' => "\$",
   64     # Content of the linking variable.
   65     'link' => "\$",
   66 
   67     # Name of the compiler variable (CC).
   68     'ccer' => "\$",
   69 
   70     # Name of the linker variable (LD).
   71     'lder' => "\$",
   72     # Content of the linker variable ($(CC)).
   73     'ld' => "\$",
   74 
   75     # Flag to specify the output file (-o).
   76     'output_flag' => "\$",
   77     '_finish' => "\$",
   78 
   79     # This is a subroutine which is called whenever we finally
   80     # determine the context in which a source file will be
   81     # compiled.
   82     '_target_hook' => "\$",
   83 
   84     # If TRUE, nodist_ sources will be compiled using specific rules
   85     # (i.e. not inference rules).  The default is FALSE.
   86     'nodist_specific' => "\$");
   87 
   88 
   89 sub finish ($)
   90 {
   91   my ($self) = @_;
   92   if (defined $self->_finish)
   93     {
   94       &{$self->_finish} (@_);
   95     }
   96 }
   97 
   98 sub target_hook ($$$$%)
   99 {
  100     my ($self) = @_;
  101     if (defined $self->_target_hook)
  102     {
  103     $self->_target_hook->(@_);
  104     }
  105 }
  106 
  107 1;