+2001-04-27 Akim Demaille <akim@epita.fr>
+
+ Unify LISP, PYTHON and JAVA primaries.
+
+ * automake.in (&handle_emacs_lisp): Be like &handle_python, i.e.,
+ return if there are no files, hook elist-comp on the Autoconf
+ macro, rely on lisp.am to define variables.
+ (&handle_python, &handle_java): Likewise.
+ (&scan_one_autoconf_file): Pseudo AC_SUBST of `pythondir' and
+ `PYTHON' must be handled here, not in `&handle_python'.
+ * java.am: Define needed variables and rules.
+
2001-04-27 Akim Demaille <akim@epita.fr>
* automake.in (&am_install_var): Transform `ONE_PRIMARY'.
my @elfiles = &am_install_var ('-candist', 'lisp', 'LISP',
'lisp', 'noinst');
- if (@elfiles)
- {
- # Generate .elc files.
- grep ($_ .= 'c', @elfiles);
- &define_pretty_variable ('ELCFILES', '', @elfiles);
+ return if ! @elfiles;
- push (@all, '$(ELCFILES)');
+ # Generate .elc files.
+ grep ($_ .= 'c', @elfiles);
+ &define_pretty_variable ('ELCFILES', '', @elfiles);
- my $varname;
- if (&variable_defined ('lisp_LISP'))
- {
- $varname = 'lisp_LISP';
- &am_error ("`lisp_LISP' defined but `AM_PATH_LISPDIR' not in `$configure_ac'")
- if ! $seen_lispdir;
- }
- else
- {
- $varname = 'noinst_LISP';
- }
+ push (@all, '$(ELCFILES)');
- &require_file_with_line ($varname, $FOREIGN, 'elisp-comp');
- }
+ &am_error ("`lisp_LISP' defined but `AM_PATH_LISPDIR' not in `$configure_ac'")
+ if ! $seen_lispdir && &variable_defined ('lisp_LISP');
+
+ &require_file_with_conf_line ('AM_PATH_LISPDIR', $FOREIGN, 'elisp-comp');
}
# Handle Python
return if ! @pyfiles;
# Found some python.
- &define_configure_variable ('pythondir');
- &define_configure_variable ('PYTHON');
-
&am_error ("`python_PYTHON' defined but `AM_CHECK_PYTHON' not in `$configure_ac'")
if ! $seen_pythondir && &variable_defined ('python_PYTHON');
- if ($config_aux_dir eq '.' || $config_aux_dir eq '')
- {
- &define_variable ('py_compile', '$(top_srcdir)/py-compile');
- }
- else
- {
- &define_variable ('py_compile', $config_aux_dir . '/py-compile');
- }
+ &require_file_with_conf_line ('AM_CHECK_PYTHON', $FOREIGN, 'py_comp');
}
# Handle Java.
'java', 'noinst', 'check');
return if ! @sourcelist;
- &define_variable ('JAVAC', 'javac');
- &define_variable ('JAVACFLAGS', '');
- &define_variable ('CLASSPATH_ENV',
- 'CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH');
- &define_variable ('JAVAROOT', '$(top_builddir)');
-
my %valid = &am_primary_prefixes ('JAVA', 1,
'java', 'noinst', 'check');
$dir = $curs;
}
- $output_rules .= ('class' . $dir . '.stamp: $(' . $dir . '_JAVA)' . "\n"
- . "\t" . '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) '
- . '$(JAVACFLAGS) $?' . "\n"
- . "\t" . 'echo timestamp > class' . $dir . '.stamp'
- . "\n");
push (@all, 'class' . $dir . '.stamp');
- &push_dist_common ('$(' . $dir . '_JAVA)');
}
+
# Handle some of the minor options.
sub handle_minor_options
{
$seen_prog_install = 1 if /AC_PROG_INSTALL/;
$seen_lispdir = 1 if /AM_PATH_LISPDIR/;
- $seen_pythondir = 1 if /AM_PATH_PYTHON/;
+
+ if (/AM_PATH_PYTHON/)
+ {
+ $seen_pythondir = 1;
+ $configure_vars{'pythondir'} = $filename . ':' . $.;
+ $configure_vars{'PYTHON'} = $filename . ':' . $.;
+ }
if (/A(C|M)_PROG_LIBTOOL/)
{