config/version.mk
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Thu, 15 Nov 2018 17:59:46 +0000
changeset 501245 f3625d08b4c0e1ca4dd8c182a398afb9009b639a
parent 473377 5cca2364cc58e54bf7b13ef92dbd4ca23ed3cdd4
permissions -rw-r--r--
No bug - Tagging 7473fdd1c21c00299314892ad74b10aa5af67179 with FIREFOX_64_0b10_BUILD1 a=release CLOSED TREE DONTBUILD

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

ifndef INCLUDED_VERSION_MK
INCLUDED_VERSION_MK=1

# Windows gmake build:
# Build default .rc file if $(RESFILE) isn't defined.
# TODO:
# PBI      : Private build info.  Not used currently.
#            Guessing the best way would be to set an env var.
# BINARY   : Binary name.  Not used currently.
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
ifndef RESFILE
RCFILE=./module.rc
RESFILE=./module.res
_RC_STRING = -QUIET 1 -DEPTH $(DEPTH) -TOPSRCDIR $(MOZILLA_DIR) -OBJDIR . -SRCDIR $(srcdir) -DISPNAME "$(MOZ_APP_DISPLAYNAME)" -APPVERSION $(MOZ_APP_VERSION)
ifdef MOZILLA_OFFICIAL
_RC_STRING += -OFFICIAL 1
endif
ifdef MOZ_DEBUG
_RC_STRING += -DEBUG 1
endif
ifdef PROGRAM
_RC_STRING += -BINARY $(notdir $(PROGRAM))
else
ifdef _PROGRAM
_RC_STRING += -BINARY $(notdir $(_PROGRAM))
else
ifdef SHARED_LIBRARY
_RC_STRING += -BINARY $(notdir $(SHARED_LIBRARY))
endif
endif
endif
ifdef RCINCLUDE
_RC_STRING += -RCINCLUDE $(srcdir)/$(RCINCLUDE)
endif

GARBAGE += $(RESFILE) $(RCFILE)

#dummy target so $(RCFILE) doesn't become the default =P
all::

$(RCFILE): $(RCINCLUDE) $(MOZILLA_DIR)/config/version_win.pl
	$(PERL) $(MOZILLA_DIR)/config/version_win.pl $(_RC_STRING)

endif  # RESFILE
endif  # Windows

endif