mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-30 19:34:40 +00:00
* gettext-runtime/m4/po.m4 (AM_POSTPROCESS_PO_MAKEFILE): Change PROPERTIESFILES and CLASSFILES to contain files in $(srcdir), not in $(top_srcdir). * gettext-tools/examples/hello-java*/Makefile.am (hello.jar): Fetch the catalogs from the po/ directory. * gettext-tools/examples/hello-java*/po/Makefile.am (MAINTAINERCLEANFILES): Add the .properties and the .class files. (EXTRA_DIST): Add the .properties files. (update-properties, update-classes): Generate the .properties and .class files in the po/ directory, not in the top-level directory. * gettext-tools/examples/hello-java*/autoclean.sh: Remove the catalogs in the po/ directory, not in the top-level directory.
86 lines
2.6 KiB
Makefile
86 lines
2.6 KiB
Makefile
# Example for use of GNU gettext.
|
|
# This file is in the public domain.
|
|
#
|
|
# Makefile configuration - processed by automake.
|
|
|
|
# General automake options.
|
|
AUTOMAKE_OPTIONS = foreign
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
# The list of subdirectories containing Makefiles.
|
|
SUBDIRS = m4 po
|
|
|
|
# The list of programs that are built.
|
|
bin_JAVAPROGRAMS = hello
|
|
|
|
# The source files of the 'hello' program.
|
|
hello_SOURCES = Hello.java
|
|
hello_CLASSES = Hello.class
|
|
|
|
# The entry point of the 'hello' program.
|
|
hello_MAINCLASS = Hello
|
|
|
|
# The link dependencies of the 'hello' program.
|
|
hello_JAVALIBS = @LIBINTL_JAR@
|
|
|
|
# Additional files to be distributed.
|
|
EXTRA_DIST = autogen.sh autoclean.sh
|
|
|
|
|
|
# ----------------- General rules for compiling Java programs -----------------
|
|
|
|
jardir = $(datadir)/$(PACKAGE)
|
|
pkgdatadir = $(datadir)/$(PACKAGE)
|
|
pkglibdir = $(libdir)/$(PACKAGE)
|
|
|
|
JAR = @JAR@
|
|
JAVACOMP = $(SHELL) javacomp.sh
|
|
|
|
EXTRA_DIST += $(hello_SOURCES)
|
|
CLEANFILES =
|
|
DISTCLEANFILES = javacomp.sh javaexec.sh
|
|
|
|
|
|
# Rules for compiling Java programs as jar libraries.
|
|
# This is the preferred mode during development, because you can easily test
|
|
# the program without installing it, simply by doing "java -jar hello.jar".
|
|
|
|
all-local: hello.jar hello.sh
|
|
|
|
hello.jar: $(hello_CLASSES)
|
|
{ echo "Manifest-Version: 1.0"; echo "Main-Class: $(hello_MAINCLASS)"; echo 'Class-Path: @LIBINTL_JAR@'; } > Manifest.mf
|
|
$(JAR) cfm $@ Manifest.mf Hello*.class
|
|
rm -f Manifest.mf
|
|
abs_jar=`pwd`/$@; (cd po && $(MAKE)) && catalogs=`GNUMAKEFLAGS=--no-print-directory $(MAKE) -s -C po echo-catalogs`; test -n "$$catalogs" && (cd $(srcdir)/po && $(JAR) uf "$$abs_jar" $$catalogs) || { rm -f $@ jartmp*; exit 1; }
|
|
|
|
Hello.class: $(srcdir)/Hello.java
|
|
CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS) $(JAVACOMP) -d . $(srcdir)/Hello.java
|
|
|
|
hello.sh:
|
|
{ echo '#!/bin/sh'; \
|
|
echo "CLASSPATH='$(jardir)/hello.jar@CLASSPATH_SEPARATOR@$(hello_JAVALIBS)'\$${CLASSPATH+\"@CLASSPATH_SEPARATOR@\$$CLASSPATH\"}"; \
|
|
echo "export CLASSPATH"; \
|
|
echo "exec /bin/sh '$(pkgdatadir)/javaexec.sh' $(hello_MAINCLASS) \"\$$@\""; \
|
|
} > $@
|
|
|
|
install-exec-local: all-local
|
|
$(MKDIR_P) $(DESTDIR)$(bindir)
|
|
$(INSTALL_SCRIPT) hello.sh $(DESTDIR)$(bindir)/hello
|
|
|
|
install-data-local: all-local
|
|
$(MKDIR_P) $(DESTDIR)$(jardir)
|
|
$(INSTALL_DATA) hello.jar $(DESTDIR)$(jardir)/hello.jar
|
|
$(MKDIR_P) $(DESTDIR)$(pkgdatadir)
|
|
$(INSTALL_DATA) javaexec.sh $(DESTDIR)$(pkgdatadir)/javaexec.sh
|
|
|
|
installdirs-local:
|
|
$(MKDIR_P) $(DESTDIR)$(jardir)
|
|
$(MKDIR_P) $(DESTDIR)$(pkgdatadir)
|
|
|
|
uninstall-local:
|
|
rm -f $(DESTDIR)$(bindir)/hello
|
|
rm -f $(DESTDIR)$(jardir)/hello.jar
|
|
rm -f $(DESTDIR)$(pkgdatadir)/javaexec.sh
|
|
|
|
CLEANFILES += hello.jar Hello*.class Manifest.mf hello.sh
|