📄 automake.in
字号:
#!@PERL@# -*- perl -*-# @configure_input@eval 'exec @PERL@ -S $0 ${1+"$@"}' if 0;# automake - create Makefile.in from Makefile.am# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.# This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA# 02111-1307, USA.# Originally written by David Mackenzie <djm@gnu.ai.mit.edu>.# Perl reimplementation by Tom Tromey <tromey@cygnus.com>.# Parameters set by configure. Not to be changed. NOTE: assign# VERSION as string so that eg version 0.30 will print correctly.$VERSION = "@VERSION@";$PACKAGE = "@PACKAGE@";$prefix = "@prefix@";$am_dir = "@datadir@/@PACKAGE@";$TAR = "@TAR@";# String constants.$IGNORE_PATTERN = "^##([^#].*)?\$";$WHITE_PATTERN = "^[ \t]*\$";$COMMENT_PATTERN = "^#";$RULE_PATTERN = "^([\$a-zA-Z_.][-.a-zA-Z0-9_(){}/\$]*) *:([^=].*|)\$";$SUFFIX_RULE_PATTERN = "^\\.([a-zA-Z]+)\\.([a-zA-Z]+)\$";$MACRO_PATTERN = "^([A-Za-z][A-Za-z0-9_]*)[ \t]*([:+]?)=[ \t]*(.*)\$";$BOGUS_MACRO_PATTERN = "^([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$";# This pattern recognizes a Gnits version id and sets $1 if the# release is an alpha release. We also allow a suffix which can be# used to extend the version number with a "fork" identifier.$GNITS_VERSION_PATTERN = '[0-9]+\.[0-9]+([a-z]|\.[0-9]+)?(-[A-Za-z0-9]+)?';$IF_PATTERN = "^if[ \t]+\([A-Za-z][A-Za-z0-9_]*\)[ \t]*\(#.*\)?\$";$ELSE_PATTERN = "^else[ \t]*\(#.*\)?\$";$ENDIF_PATTERN = "^endif[ \t]*\(#.*\)?\$";$PATH_PATTERN='(\\w|/|\\.)+';# This will pass through anything not of the prescribed form.$INCLUDE_PATTERN = "^include[ \t]+((\\\$\\\(top_srcdir\\\)/${PATH_PATTERN})|(\\\$\\\(srcdir\\\)/${PATH_PATTERN})|([^/\\\$]${PATH_PATTERN}))[ \t]*(#.*)?\$";# Some regular expressions. One reason to put them here is that it# makes indentation work better in Emacs.$AC_CONFIG_AUX_DIR_PATTERN = "AC_CONFIG_AUX_DIR\\(([^)]+)\\)";$AM_INIT_AUTOMAKE_PATTERN = "AM_INIT_AUTOMAKE\\([^,]*,([^,)]+)[,)]";$AM_PACKAGE_VERSION_PATTERN = "^\\s*\\[?([^]\\s]+)\\]?\\s*\$";# Note that there is no AC_PATH_TOOL. But we don't really care.$AC_CHECK_PATTERN = "AC_(CHECK|PATH)_(PROG|PROGS|TOOL)\\(\\[?(\\w+)";$AM_MISSING_PATTERN = "AM_MISSING_PROG\\(\\[?(\\w+)";# Just check for alphanumeric in AC_SUBST. If you do AC_SUBST(5),# then too bad.$AC_SUBST_PATTERN = "AC_SUBST\\(\\[?(\\w+)";$AM_CONDITIONAL_PATTERN = "AM_CONDITIONAL\\((\\w+)";# Constants to define the "strictness" level.$FOREIGN = 0;$GNU = 1;$GNITS = 2;# Variables global to entire run.# TRUE if we should always generate Makefile.in.$force_generation = 1;# Strictness level as set on command line.$default_strictness = $GNU;# Name of strictness level, as set on command line.$default_strictness_name = 'gnu';# This is TRUE if GNU make specific automatic dependency generation# code should be included in generated Makefile.in.$cmdline_use_dependencies = 1;# This is the name of a dependency makefile bit (usually for inclusion in a# SMakefile or similar); empty if not set.$generate_deps = '';# TRUE if in verbose mode.$verbose = 0;# This holds our (eventual) exit status. We don't actually exit until# we have processed all input files.$exit_status = 0;# From the Perl manual.$symlink_exists = (eval 'symlink ("", "");', $@ eq '');# TRUE if missing standard files should be installed.$add_missing = 0;# TRUE if we should copy missing files; otherwise symlink if possible.$copy_missing = 0;# Name of the top autoconf input: `configure.ac' or `configure.in'$configure_ac = '';# Files found by scanning configure.ac for LIBOBJS.%libsources = ();# True if AM_C_PROTOTYPES appears in configure.ac.$am_c_prototypes = 0;# Names used in AC_CONFIG_HEADER call. @config_fullnames holds the# name which appears in AC_CONFIG_HEADER, colon and all.# @config_names holds the file names. @config_headers holds the '.in'# files. Ordinarily these are similar, but they can be different if# the weird "NAME:FILE" syntax is used.@config_fullnames = ();@config_names = ();@config_headers = ();# Line number at which AC_CONFIG_HEADER appears in configure.ac.$config_header_line = 0;# Directory where output files go. Actually, output files are# relative to this directory.$output_directory = '.';# Relative location of top build directory.$top_builddir = '';# Absolute location of top build directory.$build_directory = '';# Name of srcdir as given in build directory's Makefile. For# dependencies only.$srcdir_name = '';# List of Makefile.am's to process, and their corresponding outputs.@input_files = ();%output_files = ();# List of files in AC_OUTPUT without Makefile.am, and their outputs.@other_input_files = ();# Line number at which AC_OUTPUT seen.$ac_output_line = 0;# List of directories to search for configure-required files. This# can be set by AC_CONFIG_AUX_DIR.@config_aux_path = ('.', '..', '../..');$config_aux_dir = '';# Whether AC_PROG_MAKE_SET has been seen in configure.ac.$seen_make_set = 0;# Whether AM_GNU_GETTEXT has been seen in configure.ac.$seen_gettext = 0;# Line number at which AM_GNU_GETTEXT seen.$ac_gettext_line = 0;# Whether ALL_LINGUAS has been seen.$seen_linguas = '';# The actual text.$all_linguas = '';# Line number at which it appears.$all_linguas_line = 0;# 1 if AC_PROG_INSTALL seen.$seen_prog_install = 0;# Whether AC_PATH_XTRA has been seen in configure.ac.$seen_path_xtra = 0;# TRUE if AC_DECL_YYTEXT was seen.$seen_decl_yytext = 0;# TRUE if we've seen AC_CANONICAL_(HOST|SYSTEM). The presence of# AC_CHECK_TOOL also sets this.$seen_canonical = 0;# TRUE if we've seen AC_ARG_PROGRAM.$seen_arg_prog = 0;# TRUE if we've seen AM_PROG_LIBTOOL.$seen_libtool = 0;$libtool_line = 0;# Files installed by libtoolize.@libtoolize_files = ('ltmain.sh', 'config.guess', 'config.sub');# ltconfig appears here for compatibility with old versions of libtool.@libtoolize_sometimes = ('ltconfig', 'ltcf-c.sh', 'ltcf-cxx.sh', 'ltcf-gcj.sh');# TRUE if we've seen AM_MAINTAINER_MODE.$seen_maint_mode = 0;# TRUE if we've seen PACKAGE and VERSION.$seen_package = 0;$seen_version = 0;# Actual version we've seen.$package_version = '';# Line number where we saw version definition.$package_version_line = 0;# TRUE if we've seen AM_PATH_LISPDIR.$seen_lispdir = 0;# TRUE if we've seen AC_EXEEXT.$seen_exeext = 0;# TRUE if we've seen AC_OBJEXT.$seen_objext = 0;# TRUE if we've seen AC_ENABLE_MULTILIB.$seen_multilib = 0;# Hash table of discovered configure substitutions. Keys are names,# values are `FILE:LINE' strings which are used by error message# generation.%configure_vars = ();# This is used to keep track of which variable definitions we are# scanning. It is only used in certain limited ways, but it has to be# global. It is declared just for documentation purposes.%vars_scanned = ();# Charsets used by maintainer and in distribution. MAINT_CHARSET is# handled in a funny way: if seen in the top-level Makefile.am, it is# used for every directory which does not specify a different value.# The rationale here is that some directories (eg gettext) might be# distributions of other packages, and thus require their own charset# info. However, the DIST_CHARSET must be the same for the entire# package; it can only be set at top-level.# FIXME: this yields bugs when rebuilding. What to do? Always# read (and sometimes discard) top-level Makefile.am?$maint_charset = '';$dist_charset = 'utf8'; # recode doesn't support this yet.# Name of input file ("Makefile.in") and output file ("Makefile.am").# These have no directory components.$am_file_name = '';$in_file_name = '';# TRUE if --cygnus seen.$cygnus_mode = 0;# Keys of this hash are names of dependency files to ignore.%omit_dependencies = ();# Hash table of AM_CONDITIONAL variables seen in configure.%configure_cond = ();# Map from obsolete macros to hints for new macros.# FIXME complete the list so that there are no `0' hints.%obsolete_macros = ( 'AC_FEATURE_CTYPE', "use \`AC_HEADER_STDC'", 'AC_FEATURE_ERRNO', "add \`strerror' to \`AC_REPLACE_FUNCS(...)'", 'AC_FEATURE_EXIT', 0, 'AC_SYSTEM_HEADER', 0, # Note that we do not handle this one, because it is still run # from AM_CONFIG_HEADER. So we deal with it specially in # scan_configure. # 'AC_CONFIG_HEADER', "use \`AM_CONFIG_HEADER'", 'fp_C_PROTOTYPES', "use \`AM_C_PROTOTYPES'", 'fp_PROG_CC_STDC', "use \`AM_PROG_CC_STDC'", 'fp_PROG_INSTALL', "use \`AC_PROG_INSTALL'", 'fp_WITH_DMALLOC', "use \`AM_WITH_DMALLOC'", 'fp_WITH_REGEX', "use \`AM_WITH_REGEX'", 'gm_PROG_LIBTOOL', "use \`AM_PROG_LIBTOOL'", 'jm_MAINTAINER_MODE', "use \`AM_MAINTAINER_MODE'", 'md_TYPE_PTRDIFF_T', "use \`AM_TYPE_PTRDIFF_T'", 'ud_PATH_LISPDIR', "use \`AM_PATH_LISPDIR'", # Now part of autoconf proper, under a different name. 'AM_FUNC_FNMATCH', "use \`AC_FUNC_FNMATCH'", 'fp_FUNC_FNMATCH', "use \`AC_FUNC_FNMATCH'", 'AM_SANITY_CHECK_CC', "automatically done by \`AC_PROG_CC'", 'AM_PROG_INSTALL', "use \`AC_PROG_INSTALL'", 'AM_EXEEEXT', "use \`AC_EXEEXT'", 'AM_CYGWIN32', "use \`AC_CYGWIN32'", 'AM_MINGW32', "use \`AC_MINGW32'",# These aren't quite obsolete.# 'md_PATH_PROG', );# Regexp to match the above macros.$obsolete_rx = '\b(' . join ('|', keys %obsolete_macros) . ')\b';# This maps extensions onto language names.%extension_map = ();# This maps languages names onto properties.%language_map = ();# Initialize global constants and our list of languages that are# internally supported.&initialize_global_constants;®ister_language ('c', '', 1, 'c');®ister_language ('cxx', 'CXXLINK', 0, 'c++', 'cc', 'cpp', 'cxx', 'C');®ister_language ('objc', 'OBJCLINK', 0, 'm');®ister_language ('header', '', 0, 'h', 'H', 'hxx', 'h++', 'hh', 'hpp', 'inc');®ister_language ('yacc', '', 1, 'y');®ister_language ('yaccxx', 'CXXLINK', 0, 'y++', 'yy', 'yxx');®ister_language ('lex', '', 1, 'l');®ister_language ('lexxx', 'CXXLINK', 0, 'l++', 'll', 'lxx');®ister_language ('asm', '', 0, 's', 'S');®ister_language ('f77', 'F77LINK', 0, 'f', 'for', 'f90');®ister_language ('ppf77', 'F77LINK', 0, 'F');®ister_language ('ratfor', 'F77LINK', 0, 'r');# Parse command line.&parse_arguments (@ARGV);# Do configure.ac scan only once.&scan_configure;die "automake: no \`Makefile.am' found or specified\n" if ! @input_files;# If --generate-deps was given, we don't do anything else#if ($generate_deps){ die "automake: Must specify --include-deps (or -i) when generating\n" if $use_dependencies; die "automake: Must provide --build-dir when generating\n" if ! $build_directory; die "automake: Must provide --srcdir-name when generating\n" if ! $srcdir_name; open (GDEP, ">$output_directory/.dep_segment") || die "automake: Could not open `$output_directory/.dep_segment': $!\n"; &handle_dependencies; print GDEP $output_rules; close(GDEP); exit $exit_status;}# Now do all the work on each file.foreach $am_file (@input_files){ if (! -f ($am_file . '.am')) { &am_error ("\`" . $am_file . ".am' does not exist"); } else { &generate_makefile ($output_files{$am_file}, $am_file); }}&am_conf_error ("AC_PROG_INSTALL must be used in \`$configure_ac'") if (! $seen_prog_install);exit $exit_status;################################################################# Parse command line.sub parse_arguments{ local (@arglist) = @_; # Start off as gnu. &set_strictness ('gnu'); while (@arglist) { if ($arglist[0] eq "--version") { print "automake (GNU $PACKAGE) $VERSION\n\n"; print "Copyright (C) 1999, 2001 Free Software Foundation, Inc.\n"; print "This is free software; see the source for copying conditions. There is NO\n"; print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"; print "Written by Tom Tromey <tromey\@cygnus.com>\n"; exit 0; } elsif ($arglist[0] eq "--help") { &usage; } elsif ($arglist[0] =~ /^--amdir=(.+)$/) { $am_dir = $1; } elsif ($arglist[0] eq '--amdir') { &require_argument (@arglist); shift (@arglist); $am_dir = $arglist[0]; } elsif ($arglist[0] =~ /^--build-dir=(.+)$/) { # Must end in /. $build_directory = $1 . '/'; } elsif ($arglist[0] eq '--build-dir') { &require_argument (@arglist); shift (@arglist); # Must end in /. $build_directory = $arglist[0] . '/'; } elsif ($arglist[0] =~ /^--srcdir-name=(.+)$/) { $srcdir_name = $1; } elsif ($arglist[0] eq '--srcdir-name') { &require_argument (@arglist); shift (@arglist); $srcdir_name = $arglist[0]; } elsif ($arglist[0] eq '--gnu') { &set_strictness ('gnu'); } elsif ($arglist[0] eq '--gnits') { &set_strictness ('gnits'); } elsif ($arglist[0] eq '--cygnus') { $cygnus_mode = 1; } elsif ($arglist[0] eq '--foreign') { &set_strictness ('foreign'); } elsif ($arglist[0] eq '--include-deps' || $arglist[0] eq '-i') { $cmdline_use_dependencies = 0; } elsif ($arglist[0] eq '--generate-deps') { $generate_deps = 1; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -