+2001-05-13 Akim Demaille <akim@epita.fr>
+
+ * lang-compile.am: New file, loaded once per language.
+ * depend2.am: Move definitions loaded once per language in the
+ aforementioned file.
+ * automake.in (&handle_languages): Load it.
+ (&lang_ppf77_finish, &lang_ratfor_finish): Remove as it's now
+ handled by lang-compile.am.
+
2001-05-13 Tom Tromey <tromey@redhat.com>
* tests/Makefile.am (TESTS): Added python.test.
dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-footer.am header-vars.am header.am install.am java.am lex.am \
-library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lang-compile.am \
+lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
mans-vars.am mans.am multilib.am program.am progs.am python.am \
remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
texinfos.am yacc.am
dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-footer.am header-vars.am header.am install.am java.am lex.am \
-library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lang-compile.am \
+lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
mans-vars.am mans.am multilib.am program.am progs.am python.am \
remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
texinfos.am yacc.am
'compile_flag' => '-c',
'output_flag' => '-o',
'pure' => 1,
- 'extensions' => ['F'],
- '_finish' => \&lang_ppf77_finish);
+ 'extensions' => ['F']);
# Ratfor.
register_language ('name' => 'ratfor',
'compile_flag' => '-c',
'output_flag' => '-o',
'pure' => 1,
- 'extensions' => ['r'],
- '_finish' => \&lang_ratfor_finish);
+ 'extensions' => ['r']);
# Java via gcj.
register_language ('name' => 'java',
next if defined $done{$lang};
$done{$lang} = 1;
+ # Load the language dependent Makefile chunks.
+ my %lang = map { uc ($_) => 0 } keys %languages;
+ $lang{uc ($lang->name)} = 1;
+ $output_rules .= file_contents ('lang-compile', %transform, %lang);
# If the source to a program consists entirely of code from a
# `pure' language, for instance C++ for Fortran 77, then we
}
-sub lang_ppf77_finish
-{
- # We also handle the case of preprocessing `.F' files into `.f'
- # files.
- $output_rules .= (".F.f:\n"
- . "\t\$(F77COMPILE) -F \$<\n");
-}
-
-sub lang_ratfor_finish
-{
- # We also handle the case of preprocessing `.r' files into `.f'
- # files.
- $output_rules .= (".r.f:\n"
- . "\t\$(RCOMPILE) -F \$<\n");
-}
-
-
# Given a hash table of linker names, pick the name that has the most
# precedence. This is lame, but something has to have global
# knowledge in order to eliminate the conflict. Add more linkers as
## 02111-1307, USA.
## This file is read several times:
-## - once per language for generic compilation rules
+## - once per *extention* (not per language) for generic compilation rules
## - once for each file which requires specific flags.
-## Note it is on purpose we wrote `if %AMDEP%', since %AMDEP% becomes
-## '@AMDEP_TRUE@' if dependencies are to be used, otherwise FALSE.
-
-if %AMDEP%
-?GENERIC?%FPFX%DEPMODE = @%FPFX%DEPMODE@
-endif %AMDEP%
+## Note it is on purpose we wrote `if %AMDEP%', since:
+##
+## - if deps are turned off, %AMDEP% is mapped onto FALSE, and therefore
+## the `if FALSE' chunk is removed (automake-time conditionals).
+##
+## - if deps are on, %AMDEP% is mapped onto AMDEP, and therefore
+## the `if FALSE' chunk is prefix with @AMDEP_TRUE@ just like for any
+## other configure-time conditional.
?GENERIC?.%EXT%.o:
?!GENERIC?%OBJ%: %SOURCE%
## 02111-1307, USA.
-## --------- ##
-## Bulding. ##
-## --------- ##
+## ---------- ##
+## Building. ##
+## ---------- ##
JAVAC = javac
JAVACFLAGS =
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright 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.
+
+## This file is read once per *language*, not per extension.
+
+## ----------------------------- ##
+## Common to all the languages. ##
+## ----------------------------- ##
+
+## Dependency tracking.
+if %AMDEP%
+%FPFX%DEPMODE = @%FPFX%DEPMODE@
+endif %AMDEP%
+
+
+
+## ------------------------- ##
+## Preprocessed Fortran 77. ##
+## ------------------------- ##
+
+## We also handle the case of preprocessing `.F' files into `.f' files.
+if %?PPF77%
+.F.f:
+ $(F77COMPILE) -F $<
+endif %?PPF77%
+
+
+
+## -------- ##
+## Ratfor. ##
+## -------- ##
+
+## We also handle the case of preprocessing `.r' files into `.f' files.
+if %?RATFOR%
+.r.f:
+ $(RCOMPILE) -F $<
+endif %?RATFOR%
dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
-footer.am header-vars.am header.am install.am java.am lex.am \
-library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
+footer.am header-vars.am header.am install.am java.am lang-compile.am \
+lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
mans-vars.am mans.am multilib.am program.am progs.am python.am \
remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
texinfos.am yacc.am
## 02111-1307, USA.
## This file is read several times:
-## - once per language for generic compilation rules
+## - once per *extention* (not per language) for generic compilation rules
## - once for each file which requires specific flags.
-## Note it is on purpose we wrote `if %AMDEP%', since %AMDEP% becomes
-## '@AMDEP_TRUE@' if dependencies are to be used, otherwise FALSE.
-
-if %AMDEP%
-?GENERIC?%FPFX%DEPMODE = @%FPFX%DEPMODE@
-endif %AMDEP%
+## Note it is on purpose we wrote `if %AMDEP%', since:
+##
+## - if deps are turned off, %AMDEP% is mapped onto FALSE, and therefore
+## the `if FALSE' chunk is removed (automake-time conditionals).
+##
+## - if deps are on, %AMDEP% is mapped onto AMDEP, and therefore
+## the `if FALSE' chunk is prefix with @AMDEP_TRUE@ just like for any
+## other configure-time conditional.
?GENERIC?.%EXT%.o:
?!GENERIC?%OBJ%: %SOURCE%
## 02111-1307, USA.
-## --------- ##
-## Bulding. ##
-## --------- ##
+## ---------- ##
+## Building. ##
+## ---------- ##
JAVAC = javac
JAVACFLAGS =
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright 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.
+
+## This file is read once per *language*, not per extension.
+
+## ----------------------------- ##
+## Common to all the languages. ##
+## ----------------------------- ##
+
+## Dependency tracking.
+if %AMDEP%
+%FPFX%DEPMODE = @%FPFX%DEPMODE@
+endif %AMDEP%
+
+
+
+## ------------------------- ##
+## Preprocessed Fortran 77. ##
+## ------------------------- ##
+
+## We also handle the case of preprocessing `.F' files into `.f' files.
+if %?PPF77%
+.F.f:
+ $(F77COMPILE) -F $<
+endif %?PPF77%
+
+
+
+## -------- ##
+## Ratfor. ##
+## -------- ##
+
+## We also handle the case of preprocessing `.r' files into `.f' files.
+if %?RATFOR%
+.r.f:
+ $(RCOMPILE) -F $<
+endif %?RATFOR%
AUTOMAKE_OPTIONS = gnits
-XFAIL_TESTS = subobj2.test yaccvpath.test texinfo10.test subdir5.test
+XFAIL_TESTS = yaccvpath.test texinfo10.test subdir5.test
TESTS = \
acinclude.test \
AUTOMAKE_OPTIONS = gnits
-XFAIL_TESTS = subobj2.test yaccvpath.test texinfo10.test subdir5.test
+XFAIL_TESTS = yaccvpath.test texinfo10.test subdir5.test
TESTS = \
acinclude.test \