diff options
author | Mark Wielaard <mark@klomp.org> | 2004-08-01 21:31:11 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2004-08-01 21:31:11 +0000 |
commit | 9e4bac1508eb2b10e7c244c8eca7fa94847250c4 (patch) | |
tree | e6ae8c806137b4dc80cd50131ad3bc2508d81e08 /examples/Makefile.am | |
parent | 61b14b381e9be23aada1a8cb38d6d3fdd1090d3b (diff) | |
download | classpath-9e4bac1508eb2b10e7c244c8eca7fa94847250c4.tar.gz |
* NEWS: Mention new examples.
* Makefile.am (SUBDIRS): Add examples directory.
* configure.ac (AC_CONFIG_FILES): Add examples/Makefile.
* lib/standard.omit: Remove TestAWT.java and Test.java
* gnu/java/awt/peer/gtk/TestAWT.java: Removed.
* gnu/java/awt/peer/gtk/Test.java: Removed.
* examples/README: New file.
* examples/Makefile.am: New file.
* examples/gnu/classpath/examples/icons/*.png: New icon resources.
* examples/gnu/classpath/examples/awt/Demo.java: New class.
* examples/gnu/classpath/examples/swing/Demo.java: New class.
Diffstat (limited to 'examples/Makefile.am')
-rw-r--r-- | examples/Makefile.am | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 000000000..a4cd8e234 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,84 @@ +## Input file for automake to generate the Makefile.in used by configure + +# Setup the compiler to use the GNU Classpath library we just build +GCJ = @GCJ@ +JIKES = @JIKES@ +if FOUND_GCJ +JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C +else +if FOUND_JIKES +JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:. +else +error dunno how to setup the JCOMPILER and compile +endif +endif + +# All our example java source files +EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java + +# The zip files with classes we want to produce. +EXAMPLE_ZIP = examples.zip + +# Extra objects that will not exist until configure-time +BUILT_SOURCES = $(EXAMPLE_ZIP) + +# the png icons we use in some of the examples. +EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png + +# Some architecture independent data to be installed. +example_DATA = $(EXAMPLE_ZIP) README + +# Where we want these data files installed. +exampledir = $(pkgdatadir)/examples + +# Make sure all sources and icons are also installed so users can use them. +# (Be careful to strip off the srcdir part of the path when installing.) +install-data-local: + srcdir_cnt=`echo $(srcdir) | wc -c`; \ + for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ + f=`echo $$file | cut -c$$srcdir_cnt-`; \ + fdir=`dirname $$f`; \ + if test ! -d $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; then \ + echo "$(mkinstalldirs) $(DESTDIR)/$(pkgdatadir)/examples/$$fdir"; \ + $(mkinstalldirs) $(DESTDIR)/$(pkgdatadir)/examples/$$fdir; \ + fi; \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \ + $(INSTALL_DATA) $$file $(DESTDIR)/$(pkgdatadir)/examples/$$f; \ + done + +uninstall-local: + srcdir_cnt=`echo $(srcdir) | wc -c`; \ + for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ + f=`echo $$file | cut -c$$srcdir_cnt-`; \ + echo "rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f"; \ + rm -f $(DESTDIR)/$(pkgdatadir)/examples/$$f; \ + done + +# Make sure everything is included in the distribution. +EXTRA_DIST = README +dist-hook: + srcdir_cnt=`echo $(srcdir) | wc -c`; \ + for file in $(EXAMPLE_JAVA_FILES) $(EXAMPLE_ICONS); do \ + f=`echo $$file | cut -c$$srcdir_cnt-`; \ + fdir=`dirname $$f`; \ + if test ! -d $(distdir)/$$fdir; then \ + echo "$(makeinstalldirs) $(distdir)/$$fdir"; \ + $(mkinstalldirs) $(distdir)/$$fdir; \ + fi; \ + echo "cp -p $$file $(distdir)/$$f"; \ + cp -p $$file $(distdir)/$$f; \ + done + +# To generate the example zip just depend on the sources and ignore the +# class files. Always regenerate all .class files and remove them immediatly. +# And copy the png icons we use to the classes dir so they get also included. +$(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES) + mkdir -p classes/gnu/classpath/examples/icons + cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons + $(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES) + cd classes; $(ZIP) -r ../$(EXAMPLE_ZIP) .; cd .. + rm -rf classes + +# Zip file be gone! (and make sure the classes are gone too) +clean-local: + rm -f $(EXAMPLE_ZIP) classes |