Makefile.in 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # -*- Makefile -*-
  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. # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
  7. # a recursive rule for finding nsinstall and the Perl scripts.
  8. ifdef NSBUILDROOT
  9. override NSBUILDROOT :=
  10. endif
  11. include $(topsrcdir)/config/config.mk
  12. # L10n jobs are doing make -C config manually before anything else,
  13. # and need nsinstall to be built as a consequence.
  14. ifdef COMPILE_ENVIRONMENT
  15. export:: host
  16. ifneq (WINNT,$(HOST_OS_ARCH))
  17. # Ensure nsinstall is atomically created
  18. nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
  19. cp $^ $@.tmp
  20. mv $@.tmp $@
  21. NSINSTALL_EXECUTABLES := nsinstall$(HOST_BIN_SUFFIX)
  22. NSINSTALL_DEST := $(DIST)/bin
  23. NSINSTALL_TARGET := host
  24. INSTALL_TARGETS += NSINSTALL
  25. endif
  26. endif
  27. include $(topsrcdir)/config/rules.mk
  28. ifdef WRAP_SYSTEM_INCLUDES
  29. export-preqs = \
  30. $(call mkdir_deps,system_wrappers) \
  31. $(NULL)
  32. export:: $(export-preqs)
  33. $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
  34. -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
  35. -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
  36. -DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
  37. -DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
  38. -DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
  39. -DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
  40. $(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
  41. $(INSTALL) system_wrappers $(DIST)
  42. GARBAGE_DIRS += system_wrappers
  43. endif
  44. ifdef WRAP_STL_INCLUDES
  45. ifdef GNU_CXX
  46. stl_compiler = gcc
  47. else
  48. ifdef _MSC_VER
  49. stl_compiler = msvc
  50. endif
  51. endif
  52. endif
  53. ifdef stl_compiler
  54. STL_WRAPPERS_SENTINEL = $(DIST)/stl_wrappers/sentinel
  55. $(STL_WRAPPERS_SENTINEL): $(srcdir)/make-stl-wrappers.py $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers $(GLOBAL_DEPS)
  56. $(PYTHON) $(srcdir)/make-stl-wrappers.py stl_wrappers $(stl_compiler) $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers
  57. $(PYTHON) $(srcdir)/nsinstall.py -t stl_wrappers $(DIST)
  58. touch $(STL_WRAPPERS_SENTINEL)
  59. export:: $(STL_WRAPPERS_SENTINEL)
  60. GARBAGE += $(STL_WRAPPERS_SENTINEL)
  61. GARBAGE_DIRS += stl_wrappers
  62. endif
  63. GARBAGE += \
  64. $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) $(srcdir)/*.pyc *.pyc
  65. FORCE:
  66. ifndef JS_STANDALONE
  67. check-preqs += check-jar-mn
  68. endif
  69. check-preqs += check-makefiles
  70. check:: $(check-preqs)
  71. check-jar-mn::
  72. $(MAKE) -C tests/src-simple check-jar
  73. $(MAKE) -C tests/src-simple check-flat
  74. $(MAKE) -C tests/src-simple check-flat USE_EXTENSION_MANIFEST=1
  75. ifneq (,$(filter-out WINNT,$(OS_ARCH)))
  76. $(MAKE) -C tests/src-simple check-symlink
  77. endif
  78. check-makefiles:
  79. $(MAKE) -C tests/makefiles/autodeps check