+Fri Nov 15 18:58:04 1996 Tom Tromey <tromey@cygnus.com>
+
+ * automake.in (initialize_per_input): Init de_ansi_objects.
+ (handle_single_transform_list): Error if extension unrecognized.
+ Set elements of de_ansi_objects.
+ (get_object_extension): Don't push ANSI2KNR onto @all.
+ (handle_yacc_lex_cxx): Put ANSI2KNR into dependency of all ._o
+ files.
+ (pretty_print_internal): Initialize $bol depending on the column.
+
Fri Nov 15 16:22:15 1996 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* library.am: Fixed references to LIBRARY according to new scheme.
* clean up source directory by moving stuff into subdirs
-!! foo_LIBRARIES = @JOE@ -> _LIBFILES is wrong
- [ have implemented temporary fix, but something better must be done
- probably do Gord's idea ]
-
!! EXTRA_FOO should not be allowed to contain automake interpolations
the whole point of this variable is so automake can statically know...
This should probably be true for all EXTRA_ variables
# Substitution from AM_C_PROTOTYPES. This makes it be
# built only when necessary.
&define_configure_variable ('ANSI2KNR');
- push (@all, '$(ANSI2KNR)');
}
$output_rules .= &file_contents ('compile-kr');
}
}
+ #
+ # Handle some ansi2knr cleanup.
+ #
+ if (defined $options{'ansi2knr'} && keys %de_ansi_objects)
+ {
+ # Make all ._o files depend on ansi2knr. Use a sneaky little
+ # hack to make it print nicely.
+ &pretty_print_rule ('', '', (keys %de_ansi_objects,
+ ':', '$(ANSI2KNR)'));
+ }
+
#
# Last, handle some C cleanup.
#
{
# FORTRAN support. FIXME: not finished.
}
- else
+ elsif (s/\.[clysmM]$/._o/)
{
- # C, yacc, and lex need special $obj extension, for
- # de-ansification. Hopefully someday this will go
- # away.
- s/\.[cly]$/$obj/g;
+ # .c is C. .l is lex. .y is yacc. .s is assembly.
+ # .M is Objective-C++. .m is Objective-C.
- # .s is assembly. .M is Objective-C++. .m is
- # Objective-C.
- s/\.[smM]$/$obj/g;
+ # Note: first we rewrite (eg) foo.c to foo._o and push
+ # the file onto the list of objects that require
+ # ansi2knr. Then we rewrite ._o to $obj; $obj can be
+ # simply `.o' if deansification is not really
+ # required.
+ $de_ansi_objects{$_} = 1;
+ s/\._o$/$obj/;
# FIXME: of course, this should only happen for C
# source. The multi-language support must really be
# cleaned up more globally.
$seen_c_source = 1;
}
+ else
+ {
+ # FIXME include line number in error.
+ &am_error ("file \`$_' has unrecognized extension");
+ }
push (@result, $_);
local ($fill_length) = length ($fill);
$fill_length += 7 * ($fill =~ tr/\t/\t/d);
- local ($bol) = 0;
+ local ($bol) = ($head eq '');
foreach (@values)
{
# "71" because we also print a space.
# This is a list of all targets to run during "make dist".
@dist_targets = ();
+
+ # Keys in this hash are the names of ._o files which must depend
+ # on ansi2knr. Ugh.
+ %de_ansi_objects = ();
}
Fri Nov 15 00:09:18 1996 Tom Tromey <tromey@cygnus.com>
+ * ansi2.test: New file.
+
* libfiles.test: Removed (obsolete).
* libobj.test, canon4.test, libobj2.test, alllib.test,
canon3.test mdate2.test subdir.test backsl.test package.test number.test \
insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
yacc.test mkinst2.test texinfo2.test ansi.test depacl.test depacl2.test \
-error.test colon.test vtexi2.test tags.test comment.test \
+error.test colon.test vtexi2.test tags.test comment.test ansi2.test \
man.test info.test obsolete.test lex.test scripts.test subdir2.test \
exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
order.test libobj2.test interp.test alllib.test block.test libobj3.test \
canon3.test mdate2.test subdir.test backsl.test package.test number.test \
insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
yacc.test mkinst2.test texinfo2.test ansi.test depacl.test depacl2.test \
-error.test colon.test vtexi2.test tags.test comment.test libfiles.test \
+error.test colon.test vtexi2.test tags.test comment.test ansi2.test \
man.test info.test obsolete.test lex.test scripts.test subdir2.test \
exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
order.test libobj2.test interp.test alllib.test block.test libobj3.test \
--- /dev/null
+#! /bin/sh
+
+# Test to make sure ansi2knr built at the right time.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = ansi2knr
+bin_PROGRAMS = joe
+END
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_C_PROTOTYPES
+END
+
+: > ansi2knr.c
+: > ansi2knr.1
+
+$AUTOMAKE || exit 1
+
+grep '^joe._o.*:.*ANSI2KNR' Makefile.in