Makefile.am or configure.in. [handle_configure does]
* Add prog_CFLAGS
-Franc,ois> * Do you speak somewhere of the capability Automake has to let
-Franc,ois> the user overrides definitions and goals? I think this is useful,
-Franc,ois> at times. I think the "When Automake Isn't Enough" node needs to
-Franc,ois> be revisited, as it says false things.
+François> * Do you speak somewhere of the capability Automake has to let
+François> the user overrides definitions and goals? I think this is useful,
+François> at times. I think the "When Automake Isn't Enough" node needs to
+François> be revisited, as it says false things.
+-- this should be its own node
+-- should include general comment on automake processing -- copy-through
+-- include recommended order of macros
-Franc,ois> * You might say a word about comment processing, double
-Franc,ois> hash removing, and copying of a possible copyright block at
-Franc,ois> beginning of Makefile.am.
+need to add chapter with examples of each kind of package
-Franc,ois> * The manual should tell about the fact the automake program, when
-Franc,ois> used for a single subdirectory, should be run from the top level,
-Franc,ois> with something like an explicit DIR/Makefile argument.
+François> * You might say a word about comment processing, double
+François> hash removing, and copying of a possible copyright block at
+François> beginning of Makefile.am.
+
+François> * The manual should tell about the fact the automake program, when
+François> used for a single subdirectory, should be run from the top level,
+François> with something like an explicit DIR/Makefile argument.
* look at ``'' issues in docs. and look for 'definition' pragma
Think about ways to make automake fit better with Cygnus-style trees.
-Use recode in dist target when MAIN_CHARSET specified. Read caveats
+Use recode in dist target when MAINT_CHARSET specified. Read caveats
in automake.in before doing this. Note the same problem used to apply
to the no-dependencies option; maybe it still should? Note also that
each Makefile.am must be rewritten at "make dist" time if
$dir_holds_sources = '$o';
push (@suffixes, '._c', '._o');
- &require_file ($FOREIGN, 'ansi2knr.c', 'ansi2knr.1');
+ &require_file_with_line ('AUTOMAKE_OPTIONS', $FOREIGN,
+ 'ansi2knr.c', 'ansi2knr.1');
$output_vars .= &file_contents ('kr-vars');
$output_rules .= &file_contents ('compile-kr');
{
($rewrite = $iter) =~ s/\.c$/.P/;
$dep_files{'$(srcdir)/.deps/' . $rewrite} = 1;
- &require_file ($FOREIGN, $iter);
+ &require_file_with_line ($onelib . '_LIBADD',
+ $FOREIGN, $iter);
}
}
}
"\@ALLOCA\@ seen but \`AC_FUNC_ALLOCA' not in \`configure.in'")
if ! defined $libsources{'alloca.c'};
$dep_files{'$(srcdir)/.deps/alloca.P'} = 1;
- &require_file ($FOREIGN, 'alloca.c');
+ &require_file_with_line ($onelib . '_LIBADD', $FOREIGN,
+ 'alloca.c');
}
}
}
&push_phony_cleaners ($vti);
- # Only require once.
+ # Only require once. FIXME should be able to use
+ # require_file_with_line here.
&require_file ($FOREIGN, 'mdate-sh') if ! $done;
++$done;
}
# supported.
. "TEXINFOS = " . $contents{'info_TEXINFOS'} . "\n\n");
- # Do some error checking.
+ # Do some error checking. FIXME should be able to use
+ # require_file_with_line here.
&require_file ($FOREIGN, 'texinfo.tex');
}
if $contents{'SUBDIRS'} !~ /\bintl\b/;
}
+ # FIXME should be able to use require_file_with_line here.
&require_file ($FOREIGN, 'ABOUT-NLS') if $seen_gettext;
return if ! defined $contents{'SUBDIRS'};
{
# FIXME this restriction should be lifted.
# FIXME first see if it is even needed as-is.
+ # FIXME shouldn't this message reference configure.in?
&am_line_error ($config_header_line,
"argument to AC_CONFIG_HEADER contains \`/'\n")
if ($config_header =~ /\//);
+ # FIXME should be able to use require_file_with_line here.
&require_file ($FOREIGN, $config_header);
# Header defined and in this directory.
. ($relative_dir eq '.' ? '' : '$(subdir)/')
. '$@ CONFIG_HEADERS= ./config.status'
. "\n");
+ # FIXME should be able to use require_file_with_line here.
&require_file ($FOREIGN, $local . '.in');
}
}
# Usage: require_file (strictness, file)
# strictness is the strictness level at which this file becomes
# required.
-sub require_file
+sub require_file_with_line
{
- local ($mystrict, @files) = @_;
+ local ($line, $mystrict, @files) = @_;
local ($file, $fullfile);
foreach $file (@files)
# FIXME this is a hack. Should have am_warn.
local ($save) = $exit_status;
- &am_error
- ("required file \"$fullfile\" not found; installing");
+ &am_line_error
+ ($line,
+ "required file \"$fullfile\" not found; installing");
$exit_status = $save;
}
else
{
# Only an error if strictness constraint violated.
- &am_error ("required file \"$fullfile\" not found");
+ &am_error ($line, "required file \"$fullfile\" not found");
}
}
}
}
+sub require_file
+{
+ &require_file_with_line ('', @_);
+}
+
# Require a file that is also required by Autoconf. Looks in
# configuration path, as specified by AC_CONFIG_AUX_DIR.
sub require_config_file
local ($symbol, @args) = @_;
# If SYMBOL not already a line number, look it up in Makefile.am.
- $symbol = $content_lines{$symbol} unless $symbol =~ /^\d+$/;
- warn "${am_file}.am:", $symbol, ": ", join (' ', @args),
+ # Use \d* and not \d+ so that empty symbol will pass through.
+ $symbol = $content_lines{$symbol} unless $symbol =~ /^\d*$/;
+ $symbol .= ': ' if $symbol;
+ warn "${am_file}.am:", $symbol, join (' ', @args),
"\n";
$exit_status = 1;
}