Install msysDTK-1.0.1
[msysgit.git] / share / automake-1.7 / am / java.am
blob9e2f974d73a01530f7033bcb9a17fc5b6f50da2a
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA
17 ## 02111-1307, USA.
20 ## ---------- ##
21 ## Building.  ##
22 ## ---------- ##
24 JAVAC = javac
25 JAVACFLAGS =
26 CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
27 JAVAROOT = $(top_builddir)
29 class%DIR%.stamp: $(%DIR%_JAVA)
30         @if test -n "$?"; then \
31           echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $?' ; \
32           $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) \
33             $(AM_JAVACFLAGS) $(JAVACFLAGS) $?; \
34         else :; fi
35         echo timestamp > class%DIR%.stamp
38 ## ------------ ##
39 ## Installing.  ##
40 ## ------------ ##
42 if %?INSTALL%
43 am__installdirs += $(DESTDIR)$(%NDIR%dir)
44 ?EXEC?.PHONY install-exec-am: install-%DIR%JAVA
45 ?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
46 install-%DIR%JAVA: class%DIR%.stamp
47         @$(NORMAL_INSTALL)
48         $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
49 ## A single .java file can be compiled into multiple .class files.  So
50 ## we just install all the .class files that got built into this
51 ## directory.  This is not optimal, but will have to do for now.
52         for p in *.class; do \
53           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(%NDIR%dir)/$$p"; \
54           $(INSTALL_DATA) $$p $(DESTDIR)$(%NDIR%dir)/$$p; \
55         done
56 endif %?INSTALL%
59 ## -------------- ##
60 ## Uninstalling.  ##
61 ## -------------- ##
63 if %?INSTALL%
64 .PHONY uninstall-am: uninstall-%DIR%JAVA
65 uninstall-%DIR%JAVA:
66         @$(NORMAL_UNINSTALL)
67         @for p in *.class; do \
68           echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$p"; \
69           rm -f $(DESTDIR)$(%NDIR%dir)/$$p; \
70         done
71 endif %?INSTALL%
74 ## ---------- ##
75 ## Cleaning.  ##
76 ## ---------- ##
78 .PHONY clean-am: clean-%DIR%JAVA
79 clean-%DIR%JAVA:
80         -rm -f *.class class%DIR%.stamp
83 ## -------------- ##
84 ## Distributing.  ##
85 ## -------------- ##
87 if %?DIST%
88 DIST_COMMON += $(%DIR%_JAVA)
89 endif %?DIST%