Top priorities:
-* finish configure.in scanning. must do something with C files found
- must handle subdir case correctly (don't reinit libsources each time)
-* Use info_TEXINFOS
-* Figure out how to handle MANS:
- * use man_MANS? Or man1_MANS, man2_MANS, etc?
+* Use info_TEXINFOS, man_MANS
* Must rewrite am_install_var. Should break into multiple functions.
This will allow the callers to be a little smarter.
-* am_error should use printf-style arguments (for eventual gettext scheme)
-
---install-missing should only install COPYRIGHT when --gnu or better.
-
Handle MAINT_CHARSET. Use recode in dist target. Handle dist-zoo and
dist-zip.
+Add support for html via an option. Use texi2html. Use "html_HTMLS",
+and htmldir = .../html.
+
if configure.in not found, move up a directory and try again? This
could eliminate a common source of problems.
uninstall and pkg-dirs should rm -rf the dir.
+a potential bug: configure puts "blah.o" into LIBOBJS, thus implying
+these files can't be de-ansified. Not a problem?
+
In general most .am files should be merged into automake. For
instance all the "clean" targets could be merged by keeping lists of
things to be removed. This would be a lot nicer looking. Note that
and backslash should be the rule. Update makefile-mode to allow this.
(set column to 0, probably)
-Need OTHER_SOURCES to hold sources whose objects end up in eg LIBOBJS.
-Dependency tracking should work here. Maybe if it doesn't exist it
-should be generated automatically by scanning the directory. (yes)
-
It should be possible to have ansi2knr in just one place in a package.
Jim Meyering says just rely on configure to make links as appropriate.
Not sure how I feel about this.
Consider automatic support for ".y" files.
[ not right now; it is nice to be able to print the number of
expected conflicts, and we can't handle that ]
+What about ".l" files?
Write autoconf macro to do all work necessary for automake. Eg define
PACKAGE, VERSION, etc.
existence. [ This is nixed for now because of the auto-dependency
tracking stuff ]
-automake.in: should ".cc" really -> ".$(kr)o"? This doesn't really
-seem right, but maybe it is so names can be rewritten uniformly? Must
+automake.in: should ".cc" really -> "$o"? This doesn't really seem
+right, but maybe it is so names can be rewritten uniformly? Must
check
look in configure.in's AC_OUTPUT command and include those files in
[ right now, it doesn't. i don't see a simple fix right now ]
Internationalize. [ gettext doesn't have the necessary machinery yet ]
+am_error should use printf-style arguments (for eventual gettext scheme)
write test suite
Must document BUILT_SOURCES variable. See depend.am.
+How to deal with @LIBOBJS@.
+configure scanning
+putting .h files into blah_SOURCES is ok now
+
================================================================
Libraries:
# TRUE if missing standard files should be installed.
$install_missing = 0;
+# Files found by scanning configure.in for LIBOBJS.
+%libsources = ();
+
+# True if fp_C_PROTOTYPES appears in configure.in.
+$fp_c_prototypes = 0;
+
\f
&initialize_global_constants;
if (defined $options{'ansi2knr'} || defined $contents{'@kr@'})
{
+ &am_error ("option \`ansi2knr' in use but \`fp_C_PROTOTYPES' not in configure.in")
+ if ! $fp_c_prototypes;
+
$dir_holds_sources = '$o';
push (@suffixes, '._c', '._o');
{
# Turn sources into objects.
local (@files) = split (/\s+/, $contents{$one_file . "_SOURCES"});
- # Ugh: Perl syntax vs Emacs.
- # local ($krc1, $krc2) = ('\.\$\{kr\}c', '\.\$\(kr\)c');
local (@result) = ();
foreach (@files)
{
+ # Just skip header files.
+ next if /\.h$/;
+
if (/^(.*)\.[yl]$/)
{
# Automatically include generated .c file in
# Transform source files into .o files.
s/\.cc$/$obj/g;
- # s/$krc1$/$obj/g;
- # s/$krc2$/$obj/g;
s/\.[cCmylfs]$/$obj/g;
push (@result, $_);
local ($munge);
foreach $onelib (@liblist)
{
- if (! defined $contents{$onelib . '_LIBADD'})
+ if (defined $contents{$onelib . '_LIBADD'})
+ {
+ # We recognize certain things that are commonly put in
+ # LIBADD.
+ local ($lsearch);
+
+ foreach $lsearch (split (/\s+/, $contents{$onelib . '_LIBADD'}))
+ {
+ # Automatically handle @LIBOBJS@ and @ALLOCA@.
+ # Basically this means adding entries to dep_files.
+ if ($lsearch eq '@LIBOBJS@')
+ {
+ local ($iter, $rewrite);
+ foreach $iter (keys %libsources)
+ {
+ if ($iter ne 'alloca.c')
+ {
+ ($rewrite = $iter) =~ s/\.c$/.P/;
+ $dep_files{$rewrite} = 1;
+ &require_file ($NORMAL, $iter);
+ }
+ }
+ }
+ elsif ($lsearch eq '@ALLOCA@')
+ {
+ &am_error ("\@ALLOCA\@ seen but \`AC_FUNC_ALLOCA' not in \`configure.in'")
+ if ! defined $libsources{'alloca.c'};
+ $dep_files{'alloca.P'} = 1;
+ &require_file ($NORMAL, 'alloca.c');
+ }
+ }
+ }
+ else
{
# Generate support for conditional object inclusion in
# libraries.
open (CONFIGURE, 'configure.in')
|| die "automake: couldn't open configure.in: $!\n";
+ # Reinitialize libsources here. This isn't really necessary,
+ # since we currently assume there is only one configure.in. But
+ # that won't always be the case.
+ %libsources = ();
+
local ($seen_make_set) = 0;
local ($seen_prog_install) = 0;
local ($seen_arg_prog) = 0;
$libsources{$1 . '.c'} = 1;
}
+ # Check for ansi2knr.
+ $fp_c_prototypes = 1 if /fp_C_PROTOTYPES/;
+
# Check for NLS support.
if (/ud_GNU_GETTEXT/)
{
- &am_error
- ("ud_GNU_GETTEXT in configure.in but SUBDIRS not defined")
- if ! defined $contents{'SUBDIRS'};
- &am_error ("ud_GNU_GETTEXT if configure.in but po not in SUBDIRS")
- if $contents{'SUBDIRS'} !~ /\<po\>/;
- &am_error
- ("ud_GNU_GETTEXT if configure.in but intl not in SUBDIRS")
- if $contents{'SUBDIRS'} !~ /\<intl\>/;
+ if (! defined $contents{'SUBDIRS'})
+ {
+ &am_error
+ ("ud_GNU_GETTEXT in configure.in but SUBDIRS not defined");
+ }
+ else
+ {
+ &am_error ("ud_GNU_GETTEXT in configure.in but \`po' not in SUBDIRS")
+ if $contents{'SUBDIRS'} !~ /\bpo\b/;
+ &am_error ("ud_GNU_GETTEXT in configure.in but \`intl' not in SUBDIRS")
+ if $contents{'SUBDIRS'} !~ /\bintl\b/;
+ }
&require_file ($NORMAL, 'ABOUT-NLS');
}
# Options from AUTOMAKE_OPTIONS.
%options = ();
-
- # Files found by scanning configure.in for LIBOBJS.
- %libsources = ();
}
{
&push_dist_common ($file);
}
- elsif ($install_missing && -f ($am_dir . '/' . $file))
+ elsif ($strictness >= $mystrict)
{
- # Install the missing file. Symlink if we can, copy if we must.
- if ($symlink_exists)
+ # Only install missing files according to our desired
+ # strictness level.
+ if ($install_missing && -f ($am_dir . '/' . $file))
{
- symlink ($am_dir . '/' . $file, $fullfile);
+ # Install the missing file. Symlink if we can, copy
+ # if we must.
+ if ($symlink_exists)
+ {
+ symlink ($am_dir . '/' . $file, $fullfile);
+ }
+ else
+ {
+ system ('cp', $am_dir . '/' . $file, $fullfile);
+ }
+ &am_error
+ ("required file \"$fullfile\" not found; installing");
}
else
{
- system ('cp', $am_dir . '/' . $file, $fullfile);
+ # Only an error if strictness constraint violated.
+ &am_error ("required file \"$fullfile\" not found");
}
- &am_error ("required file \"$fullfile\" not found; installing");
- }
- elsif ($strictness >= $mystrict)
- {
- # Only an error if strictness constraint violated.
- &am_error ("required file \"$fullfile\" not found");
}
}
}