Makefile.in 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #! gmake
  2. #
  3. # This Source Code Form is subject to the terms of the Mozilla Public
  4. # License, v. 2.0. If a copy of the MPL was not distributed with this
  5. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. MOD_DEPTH = .
  7. topsrcdir = @top_srcdir@
  8. srcdir = @srcdir@
  9. VPATH = @srcdir@
  10. include $(MOD_DEPTH)/config/autoconf.mk
  11. DIRS = config pr lib
  12. ifdef MOZILLA_CLIENT
  13. # Make nsinstall use absolute symlinks by default for Mozilla OSX builds
  14. # http://bugzilla.mozilla.org/show_bug.cgi?id=193164
  15. ifeq ($(OS_ARCH),Darwin)
  16. ifndef NSDISTMODE
  17. NSDISTMODE=absolute_symlink
  18. export NSDISTMODE
  19. endif
  20. endif
  21. endif
  22. DIST_GARBAGE = config.cache config.log config.status
  23. all:: config.status export
  24. include $(topsrcdir)/config/rules.mk
  25. config.status:: configure
  26. ifeq ($(OS_ARCH),WINNT)
  27. sh $(srcdir)/configure --no-create --no-recursion
  28. else
  29. ./config.status --recheck && ./config.status
  30. endif
  31. #
  32. # The -ll option of zip converts CR LF to LF.
  33. #
  34. ifeq ($(OS_ARCH),WINNT)
  35. ZIP_ASCII_OPT = -ll
  36. endif
  37. # Delete config/autoconf.mk last because it is included by every makefile.
  38. distclean::
  39. @echo "cd pr/tests; $(MAKE) $@"
  40. @$(MAKE) -C pr/tests $@
  41. rm -f config/autoconf.mk
  42. rm -f `cat unallmakefiles` unallmakefiles
  43. release::
  44. echo $(BUILD_NUMBER) > $(RELEASE_DIR)/$(BUILD_NUMBER)/version.df
  45. @if test -f imports.df; then \
  46. echo "cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
  47. cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
  48. else \
  49. echo "echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
  50. echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
  51. fi
  52. cd $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
  53. rm -rf META-INF; mkdir META-INF; cd META-INF; \
  54. echo "Manifest-Version: 1.0" > MANIFEST.MF; \
  55. echo "" >> MANIFEST.MF; \
  56. cd ..; rm -f mdbinary.jar; zip -r mdbinary.jar META-INF bin lib; \
  57. rm -rf META-INF; \
  58. cd include; \
  59. rm -rf META-INF; mkdir META-INF; cd META-INF; \
  60. echo "Manifest-Version: 1.0" > MANIFEST.MF; \
  61. echo "" >> MANIFEST.MF; \
  62. cd ..; rm -f mdheader.jar; zip $(ZIP_ASCII_OPT) -r mdheader.jar *; \
  63. rm -rf META-INF
  64. ifeq ($(OS_ARCH),WINNT)
  65. @if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
  66. rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
  67. echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)"; \
  68. mkdir -p $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
  69. fi
  70. @if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); then \
  71. rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
  72. echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)"; \
  73. mkdir -p $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
  74. fi
  75. else
  76. @if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
  77. rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
  78. echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)"; \
  79. $(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
  80. chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
  81. fi
  82. @if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); then \
  83. rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
  84. echo "making directory $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)"; \
  85. $(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
  86. chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
  87. fi
  88. endif
  89. cd $(RELEASE_DIR)/$(BUILD_NUMBER); \
  90. cp -f version.df imports.df $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
  91. chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/version.df; \
  92. chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/imports.df; \
  93. cd $(OBJDIR_NAME); \
  94. cp -f mdbinary.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
  95. chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)/mdbinary.jar; \
  96. cd include; \
  97. cp -f mdheader.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME); \
  98. chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(RELEASE_OBJDIR_NAME)/mdheader.jar
  99. package:
  100. @echo "cd pkg; $(MAKE) publish"
  101. $(MAKE) -C pkg publish
  102. depend:
  103. @echo "NSPR20 has no dependencies. Skipped."