moz.build 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. with Files('**'):
  6. BUG_COMPONENT = ('Core', 'Build Config')
  7. DIST_INSTALL = False
  8. # For sanity's sake, we compile nsinstall without the wrapped system
  9. # headers, so that we can use it to set up the wrapped system headers.
  10. NO_VISIBILITY_FLAGS = True
  11. CONFIGURE_SUBST_FILES += [
  12. 'doxygen.cfg',
  13. 'makefiles/test/Makefile',
  14. 'tests/makefiles/autodeps/Makefile',
  15. 'tests/src-simple/Makefile',
  16. ]
  17. if CONFIG['HOST_OS_ARCH'] != 'WINNT':
  18. HOST_SOURCES += [
  19. 'nsinstall.c',
  20. 'pathsub.c',
  21. ]
  22. # stdc++compat depends on config/export, so avoid a circular
  23. # dependency added by HostProgram depending on stdc++compat,
  24. # while the program here is in C.
  25. HostProgram('nsinstall_real', c_only=True)
  26. if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
  27. DEFINES['GKMEDIAS_SHARED_LIBRARY'] = True
  28. PYTHON_UNIT_TESTS += [
  29. 'tests/test_mozbuild_reading.py',
  30. 'tests/unit-expandlibs.py',
  31. 'tests/unit-mozunit.py',
  32. 'tests/unit-nsinstall.py',
  33. 'tests/unit-printprereleasesuffix.py',
  34. ]
  35. if CONFIG['GNU_CC'] and CONFIG['MOZ_OPTIMIZE']:
  36. CFLAGS += ['-O3']
  37. HOST_DEFINES = {
  38. 'UNICODE': True,
  39. '_UNICODE': True,
  40. }