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

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

automake 1.9.6

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