source: trunk/essentials/sys-devel/automake-1.10/lib/am/java.am

Last change on this file was 3147, checked in by bird, 18 years ago

automake 1.10

File size: 2.7 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 Free Software
3## Foundation, Inc.
4
5## This program is free software; you can redistribute it and/or modify
6## it under the terms of the GNU General Public License as published by
7## the Free Software Foundation; either version 2, or (at your option)
8## any later version.
9
10## This program is distributed in the hope that it will be useful,
11## but WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13## GNU General Public License for more details.
14
15## You should have received a copy of the GNU General Public License
16## along with this program; if not, write to the Free Software
17## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18## 02110-1301, USA.
19
20
21## ---------- ##
22## Building. ##
23## ---------- ##
24
25JAVAC = javac
26CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
27JAVAROOT = $(top_builddir)
28
29class%DIR%.stamp: $(%DIR%_JAVA)
30 @list1='$?'; list2=; if test -n "$$list1"; then \
31 for p in $$list1; do \
32 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
33 list2="$$list2 $$d$$p"; \
34 done; \
35 echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
36 $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
37 else :; fi
38 echo timestamp > class%DIR%.stamp
39
40
41## ------------ ##
42## Installing. ##
43## ------------ ##
44
45if %?INSTALL%
46am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
47?EXEC?.PHONY install-exec-am: install-%DIR%JAVA
48?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
49install-%DIR%JAVA: class%DIR%.stamp
50 @$(NORMAL_INSTALL)
51 test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
52## A single .java file can be compiled into multiple .class files. So
53## we just install all the .class files that got built into this
54## directory. This is not optimal, but will have to do for now.
55 @test -z "$(%DIR%_JAVA)" || for p in *.class; do \
56 echo " $(INSTALL_DATA) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
57 $(INSTALL_DATA) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$p"; \
58 done
59endif %?INSTALL%
60
61
62## -------------- ##
63## Uninstalling. ##
64## -------------- ##
65
66if %?INSTALL%
67.PHONY uninstall-am: uninstall-%DIR%JAVA
68uninstall-%DIR%JAVA:
69 @$(NORMAL_UNINSTALL)
70 @test -z "$(%DIR%_JAVA)" || for p in *.class; do \
71 echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
72 rm -f "$(DESTDIR)$(%NDIR%dir)/$$p"; \
73 done
74endif %?INSTALL%
75
76
77## ---------- ##
78## Cleaning. ##
79## ---------- ##
80
81.PHONY clean-am: clean-%DIR%JAVA
82clean-%DIR%JAVA:
83 -rm -f *.class class%DIR%.stamp
84
85
86## -------------- ##
87## Distributing. ##
88## -------------- ##
89
90if %?DIST%
91DIST_COMMON += %DISTVAR%
92endif %?DIST%
Note: See TracBrowser for help on using the repository browser.