Makefile 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #
  2. # BEGIN COPYRIGHT BLOCK
  3. # This Program is free software; you can redistribute it and/or modify it under
  4. # the terms of the GNU General Public License as published by the Free Software
  5. # Foundation; version 2 of the License.
  6. #
  7. # This Program is distributed in the hope that it will be useful, but WITHOUT
  8. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  10. #
  11. # You should have received a copy of the GNU General Public License along with
  12. # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  13. # Place, Suite 330, Boston, MA 02111-1307 USA.
  14. #
  15. # In addition, as a special exception, Red Hat, Inc. gives You the additional
  16. # right to link the code of this Program with code not covered under the GNU
  17. # General Public License ("Non-GPL Code") and to distribute linked combinations
  18. # including the two, subject to the limitations in this paragraph. Non-GPL Code
  19. # permitted under this exception must only link to the code of this Program
  20. # through those well defined interfaces identified in the file named EXCEPTION
  21. # found in the source code files (the "Approved Interfaces"). The files of
  22. # Non-GPL Code may instantiate templates or use macros or inline functions from
  23. # the Approved Interfaces without causing the resulting work to be covered by
  24. # the GNU General Public License. Only Red Hat, Inc. may make changes or
  25. # additions to the list of Approved Interfaces. You must obey the GNU General
  26. # Public License in all respects for all of the Program code and other code used
  27. # in conjunction with the Program except the Non-GPL Code covered by this
  28. # exception. If you modify this file, you may extend this exception to your
  29. # version of the file, but you are not obligated to do so. If you do not wish to
  30. # provide this exception without modification, you must delete this exception
  31. # statement from your version and license this file solely under the GPL without
  32. # exception.
  33. #
  34. #
  35. # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  36. # Copyright (C) 2005 Red Hat, Inc.
  37. # All rights reserved.
  38. # END COPYRIGHT BLOCK
  39. #
  40. # Name:
  41. # Platform: gmake
  42. # --------------------------------------------------------------------------
  43. override BUILD_MODULE=HTTP_ADMIN
  44. NOSTDCLEAN=true
  45. NO_BUILD_NUM=true
  46. COMPONENT_DEPS=true
  47. BUILD_ROOT=../../../../../../..
  48. include $(BUILD_ROOT)/nsconfig.mk
  49. include $(BUILD_ROOT)/ldap/javarules.mk
  50. CLASS_DIR=$(JAVA_DEST_DIR)/xmltools
  51. PACKAGE_DIR=$(ABS_ROOT_PARENT)/dist/$(BUILD_DEBUG)
  52. _PACKAGE_DIR=$(NSCP_DIST)/$(BUILD_DEBUG)
  53. DEST_DIR=$(CLASS_DIR)/com/netscape/xmltools
  54. JARS_DIR=lib
  55. TOOLS_JARS=$(JARS_DIR)/crimson.jar$(PATH_SEP)$(JARS_DIR)/ldapjdk.jar
  56. TOOLS_JAR_FILE=xmltools.jar
  57. #
  58. # programs list
  59. #
  60. source = \
  61. $(DEST_DIR)/DSML2LDIF.class \
  62. $(DEST_DIR)/LDIF2DSML.class \
  63. $(DEST_DIR)/DSMLReader.class \
  64. $(DEST_DIR)/DSMLWriter.class \
  65. $(DEST_DIR)/GetOpt.class \
  66. $(DEST_DIR)/DSMLSAXBuilder.class \
  67. $(DEST_DIR)/DSMLSAXHandler.class
  68. package: all $(_PACKAGE_DIR)
  69. # when zip finds nothing to do, it exits with code 12 which is not an error
  70. # so we turn that 12 into a 0 which means success so make will continue
  71. cd $(CLASS_DIR); zip -r -u $(PACKAGE_DIR)/$(TOOLS_JAR_FILE) com || if [ $$? -eq 12 ]; then exit 0 ; else exit $$? ; fi
  72. all: $(DEST_DIR) $(CRIMSONJAR_DEP) $(LDAPJDK_DEP) $(source)
  73. clean:
  74. rm -f $(DEST_DIR)/*.class; rm -f $(PACKAGE_DIR)/$(TOOLS_JAR_FILE)
  75. fresh: $(clean) $(all)
  76. jdoc: ./doc
  77. $(JAVADOC) -classpath "$(CLASSPATH)$(PATH_SEP)$(CLASS_DIR)$(PATH_SEP)$(CRIMSONJAR_FILE)" -d ./doc com.netscape.xmltools
  78. jdoc.clean :
  79. rm -rf ./doc
  80. $(_PACKAGE_DIR):
  81. mkdir -p $(_PACKAGE_DIR)
  82. $(DEST_DIR)/%.class : %.java
  83. $(JAVAC) -deprecation -classpath "$(CLASSPATH)$(PATH_SEP)$(CLASS_DIR)$(PATH_SEP)$(CRIMSONJAR_FILE)" -d $(CLASS_DIR) $<
  84. $(DEST_DIR) ./doc:
  85. mkdir -p $@