File: Makefile.am

package info (click to toggle)
gettext 0.23.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 168,104 kB
  • sloc: ansic: 532,579; sh: 68,252; perl: 28,011; makefile: 9,066; lisp: 3,184; yacc: 1,055; java: 615; cs: 589; cpp: 397; objc: 343; sed: 79; tcl: 63; xml: 40; pascal: 11; php: 7; awk: 7
file content (86 lines) | stat: -rw-r--r-- 2,687 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# 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
AR = ar

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