Tue Aug 6 10:58:37 1996 Tom Tromey <tromey@creche.cygnus.com>
+ * automake.in (handle_source_transform): Handle more C++ file
+ extensions. "Handle" Objective C. Handle more FORTRAN
+ extensions.
+
+ * compile-vars.am (LEX): Removed.
+ (YACC): Removed.
+
* automake.in (handle_source_transform): Correctly handle lex
- source. Test lex.test
+ source. Test lex.test.
+ (handle_source_transform): Skip more C++ headers. Generate macro
+ definitions for YACC and LEX on first use.
* aclocal.in (parse_arguments): Mention GNU.
* automake.in (parse_arguments): Mention GNU.
** when can aclocal.m4 be auto-generated?
-** Consider using implicit .y.c and .l.c rules instead of current
- lex/yacc trickery
-
multi-language support. Gord's idea is to have _FORTRAN_PROGRAMS,
_CXX_PROGRAMS, etc, and have the right linker used by each.
* seems to handle multi-language stuff ok ?
** many requests for a way to omit a file from the distribution.
Should be done like `!foo' or `~foo' in _SOURCES, etc.
Such files should be removed explicitly after the copy step!
+ Doing this requires rewriting macros before generating Makefile.in.
add support for Makefile.tmpl that is auto-included in every
Makefile.am. That makes it easier to do some non-std thing in every
* Consider supporting syntax from autoconf "derived:source", eg:
y.tab.c:perly.y
for yacc and lex source
-* if AC_PROG_LEX used, ensure LEXLIB is in foo_LDADD
+* if AC_PROG_LEX used, ensure (no, *PUT*) LEXLIB in foo_LDADD
* require AC_DECL_YYTEXT for lex
* Actually use $seen_prog_yacc
* Require AC_PROG_LEX or equivalent
+* Consider using implicit .y.c and .l.c rules instead of current
+ lex/yacc trickery
+
require AC_PROG_CXX if any C++ source files found?
Better support for C++ all around
local (@result) = ();
foreach (@files)
{
- # Skip header files, including C++-ish ones.
+ # Skip header files, including C++-ish ones. The list
+ # of C++ header extensions comes from Emacs 19.32
+ # etags.
next if /\.[hH]$/;
next if /\.hxx$/;
+ next if /\.h\+\+$/;
+ next if /\.hh$/;
+ next if /\.hpp$/;
# Skip things that look like macro references.
next if /^\$\(.*\)$/;
next if /^\$\{.*\}$/;
. 'cd $(srcdir) && $(YACC) $(YFLAGS) $< && mv y.tab.c '
. $1 . '.c' . "\n");
}
+
+ if (! &variable_defined ('YACC'))
+ {
+ $output_vars .= "YACC = \@YACC\@\n";
+ $targets{'YACC'} = 1;
+ }
}
elsif (/^(.*)\.l$/)
{
. 'cd $(srcdir) && $(LEX) $(LFLAGS) $< && mv lex.yy.c '
. $1 . '.c' . "\n");
}
+
+ if (! &variable_defined ('LEX'))
+ {
+ $output_vars .= "LEX = \@YACC\@\n";
+ $targets{'LEX'} = 1;
+ }
}
- # Transform source files into .o files.
+ # Transform source files into .o files. List of C++
+ # extensions comes from Emacs 19.32 etags.
+ s/\.c\+\+$/$obj/g;
s/\.cc$/$obj/g;
+ s/\.cpp$/$obj/g;
s/\.cxx$/$obj/g;
- s/\.[cCmylfs]$/$obj/g;
+
+ # FORTRAN support.
+ s/\.f90$/$obj/g;
+ s/\.for$/$obj/g;
+
+ # .C is C++. .y is yacc. .l is lex. .f and .F is
+ # fortran. .s is assembly. .M is Objective-C++. .m
+ # is Objective-C.
+ s/\.[cCylfFsmM]$/$obj/g;
push (@result, $_)
unless $prefix eq 'EXTRA_';
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
CC = @CC@
-LEX = @LEX@
-YACC = @YACC@
DEFS = @DEFS@ -I. -I$(srcdir) @CONFIG_INCLUDE_SPEC@
CPPFLAGS = @CPPFLAGS@