java.am 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright (C) 1998-2017 Free Software Foundation, Inc.
  3. ## This program is free software; you can redistribute it and/or modify
  4. ## it under the terms of the GNU General Public License as published by
  5. ## the Free Software Foundation; either version 2, or (at your option)
  6. ## any later version.
  7. ## This program is distributed in the hope that it will be useful,
  8. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ## GNU General Public License for more details.
  11. ## You should have received a copy of the GNU General Public License
  12. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ## ---------- ##
  14. ## Building. ##
  15. ## ---------- ##
  16. if %?FIRST%
  17. JAVAC = javac
  18. CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT)$${CLASSPATH:+":$$CLASSPATH"}
  19. JAVAROOT = $(top_builddir)
  20. endif %?FIRST%
  21. class%NDIR%.stamp: $(am__java_sources)
  22. @list1='$?'; list2=; if test -n "$$list1"; then \
  23. for p in $$list1; do \
  24. if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
  25. list2="$$list2 $$d$$p"; \
  26. done; \
  27. echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
  28. $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
  29. else :; fi
  30. echo timestamp > $@
  31. ## ------------ ##
  32. ## Installing. ##
  33. ## ------------ ##
  34. if %?INSTALL%
  35. am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
  36. ?EXEC?.PHONY install-exec-am: install-%DIR%JAVA
  37. ?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
  38. install-%DIR%JAVA: class%NDIR%.stamp
  39. @$(NORMAL_INSTALL)
  40. ## A single .java file can be compiled into multiple .class files. So
  41. ## we just install all the .class files that got built into this
  42. ## directory. This is not optimal, but will have to do for now.
  43. @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
  44. echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
  45. $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
  46. set x *.class; shift; test "$$1" != "*.class" || exit 0; \
  47. echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(%NDIR%dir)/$$p'"; \
  48. $(INSTALL_DATA) "$$@" "$(DESTDIR)$(%NDIR%dir)"
  49. endif %?INSTALL%
  50. ## -------------- ##
  51. ## Uninstalling. ##
  52. ## -------------- ##
  53. if %?INSTALL%
  54. .PHONY uninstall-am: uninstall-%DIR%JAVA
  55. uninstall-%DIR%JAVA:
  56. @$(NORMAL_UNINSTALL)
  57. @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
  58. set x *.class; shift; test "$$1" != "*.class" || exit 0; \
  59. echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" "$$@" ")"; \
  60. cd "$(DESTDIR)$(%NDIR%dir)" && rm -f "$$@"
  61. endif %?INSTALL%
  62. ## ---------- ##
  63. ## Cleaning. ##
  64. ## ---------- ##
  65. .PHONY clean-am: clean-%NDIR%JAVA
  66. clean-%NDIR%JAVA:
  67. -rm -f *.class class%NDIR%.stamp
  68. ## -------------- ##
  69. ## Distributing. ##
  70. ## -------------- ##
  71. if %?DIST%
  72. DIST_COMMON += %DISTVAR%
  73. endif %?DIST%