+Wed Mar 18 14:48:44 1998 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.am (pkgdata_DATA): Added java.am, java-clean.am.
+ * java-clean.am: New file.
+ * java.am: New file.
+ * automake.in (generate_makefile): Call handle_java.
+ (handle_java): New sub.
+ (am_install_var): Only push primary variable on @all if not doing
+ Java.
+
Sun Mar 8 15:43:09 1998 Tom Tromey <tromey@cygnus.com>
* automake.in (handle_configure): When recognizing AC_OUTPUT ":"
remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
-lisp.am lisp-clean.am mans.am
+lisp.am lisp-clean.am mans.am java.am java-clean.am
## These must all be executable when installed.
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \
remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
-lisp.am lisp-clean.am mans.am
+lisp.am lisp-clean.am mans.am java.am java-clean.am
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \
mkinstalldirs elisp-comp ylwrap acinstall
* Passed YFLAGS, not YACCFLAGS, to yacc
* AM_PROG_CC_STDC does not have to come before AC_PROG_CPP
* Dependencies computed as a side effect of compilation
+* Preliminary support for Java
\f
New in 1.2:
* Bug fixes
+* something like this fails:
+
+ foo = ... \
+
+ lib_LTLIBRARIES = foo.la
+
+ this should give an error.
+
* dependency tracking doesn't work well when a file is removed
the new code to track header dependencies exacerbates this
what is the fix?
&handle_texinfo;
&handle_emacs_lisp;
+ &handle_java;
&handle_man_pages;
&handle_data;
&handle_headers;
}
}
+# Handle Java.
+sub handle_java
+{
+ local (@sourcelist) = &am_install_var ('-clean', 'java', 'JAVA',
+ 'java', 'noinst', 'check');
+ return if ! @sourcelist;
+
+ &define_variable ('JAVAC', 'javac');
+ &define_variable ('JAVACFLAGS', '');
+ &define_variable ('CLASSPATH_ENV',
+ 'CLASSPATH=../..:$(srcdir)/../..:$$CLASSPATH');
+ &define_variable ('JAVAROOT', '$(top_builddir)');
+
+ local (%valid) = &am_primary_prefixes ('JAVA', 'java', 'noinst', 'check');
+
+ local ($dir, $curs);
+ foreach $curs (keys %valid)
+ {
+ if (! &variable_defined ($curs . '_JAVA') || $curs eq 'noinst'
+ || $curs eq 'EXTRA')
+ {
+ next;
+ }
+
+ if (defined $dir)
+ {
+ print STDERR "got $curs\n";
+ &am_line_error ($curs . '_JAVA',
+ "multiple _JAVA primaries in use");
+ }
+ $dir = $curs;
+ }
+
+ $output_rules .= ('class' . $dir . '.stamp: $(' . $dir . '_JAVA)' . "\n"
+ . "\t" . '$(CLASSPATH_ENV) $(JAVAC) $(JAVACFLAGS) '
+ . '-d $(JAVAROOT) $?' . "\n"
+ . "\t" . 'echo timestamp > class' . $dir . '.stamp'
+ . "\n");
+ push (@all, 'class' . $dir . '.stamp');
+}
+
# Handle some of the minor options.
sub handle_minor_options
{
# Push here because PRIMARY might be configure time determined.
push (@all, '$(' . $primary . ')')
- if @used;
+ if @used && $primary ne 'JAVA';
return (@result);
}
* gettext:: Gettext
* Guile:: Guile
* Libtool:: Libtool
+* Java:: Java
Building documentation
* gettext:: Gettext
* Guile:: Guile
* Libtool:: Libtool
+* Java:: Java
@end menu
@node Emacs Lisp, gettext, Other GNU Tools, Other GNU Tools
As the Guile module code matures, no doubt the Automake support will
grow as well.
-@node Libtool, , Guile, Other GNU Tools
+@node Libtool, Java, Guile, Other GNU Tools
@section Libtool
Automake provides support for GNU Libtool (@pxref{Top, , The Libtool
Manual, libtool, The Libtool Manual}) with the @samp{LTLIBRARIES}
primary. @xref{A Shared Library}.
+@node Java, , Libtool, Other GNU Tools
+
+Automake provides some minimal support for Java compilation with the
+@samp{JAVA} primary.
+
+Any @samp{.java} files listed in a @samp{_JAVA} variable will be
+compiled with @code{JAVAC} at build time. By default, @samp{.class}
+files are not included in the distribution.
+
+Currently Automake enforces the restriction that only one @samp{_JAVA}
+primary can be used in a given @file{Makefile.am}. The reason for this
+restriction is that, in general, it isn't possible to know which
+@samp{.class} files were generated from which @samp{.java} files -- so
+it would be impossible to know which files to install where.
+
+
@node Documentation, Install, Other GNU Tools, Top
@chapter Building documentation
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1998 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.
+mostlyclean-@DIR@JAVA:
+
+clean-@DIR@JAVA:
+ -rm *.class class@DIR@.stamp
+
+distclean-@DIR@JAVA:
+
+maintainer-clean-@DIR@JAVA:
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1998 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.
+install-@DIR@JAVA: class@DIR@.stamp
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(@DIR@dir)
+## A single .java file can be compiled into multiple .class files. So
+## we just install all the .class files that got built into this
+## directory. This is not optimal, but will have to do for now.
+ for p in *.class; do \
+ echo " $(INSTALL_DATA) $$p $(@DIR@dir)/$$p"; \
+ $(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \
+ done
+
+uninstall-@DIR@JAVA:
+ @$(NORMAL_UNINSTALL)
+ for p in *.class; do \
+ rm -f $(@DIR@dir)/$$p; \
+ done
remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
-lisp.am lisp-clean.am mans.am
+lisp.am lisp-clean.am mans.am java.am java-clean.am
## These must all be executable when installed.
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1998 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.
+install-@DIR@JAVA: class@DIR@.stamp
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(@DIR@dir)
+## A single .java file can be compiled into multiple .class files. So
+## we just install all the .class files that got built into this
+## directory. This is not optimal, but will have to do for now.
+ for p in *.class; do \
+ echo " $(INSTALL_DATA) $$p $(@DIR@dir)/$$p"; \
+ $(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \
+ done
+
+uninstall-@DIR@JAVA:
+ @$(NORMAL_UNINSTALL)
+ for p in *.class; do \
+ rm -f $(@DIR@dir)/$$p; \
+ done
-@set UPDATED 12 February 1998
+@set UPDATED 18 March 1998
@set EDITION 1.2f
@set VERSION 1.2f
+Wed Mar 18 17:15:22 1998 Tom Tromey <tromey@cygnus.com>
+
+ * java.test: New file.
+
Sun Mar 8 15:35:14 1998 Tom Tromey <tromey@cygnus.com>
* colon4.test: New file.
xsource.test libobj6.test depend3.test output5.test ammissing.test \
install.test libobj7.test objc.test cond3.test cxxcpp.test \
aclocal.test alpha.test whoami.test unused.test condman.test \
-texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test
+texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \
+java.am
EXTRA_DIST = defs $(TESTS)
xsource.test libobj6.test depend3.test output5.test ammissing.test \
install.test libobj7.test objc.test cond3.test cxxcpp.test \
aclocal.test alpha.test whoami.test unused.test condman.test \
-texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test
+texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \
+java.am
EXTRA_DIST = defs $(TESTS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
--- /dev/null
+#! /bin/sh
+
+# Minimal test of Java functionality.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+javadir = $(datadir)/java
+java_JAVA = a.java b.java c.java
+END
+
+$AUTOMAKE || exit 1
+grep '^all:.*classjava\.stamp' Makefile.in
-@set UPDATED 12 February 1998
+@set UPDATED 18 March 1998
@set EDITION 1.2f
@set VERSION 1.2f