config/version.mk
author Patrick McManus <mcmanus@ducksong.com>
Thu, 21 Aug 2014 10:53:11 -0400
changeset 200904 49502f43bd03ea69473398f9a06e4ee7867b6c21
parent 156200 5190dda148374cffb8e2052efb4c0e8f600b877a
child 218121 28abb8af2d6231adf68dcfd2d84ee84b31f16df3
permissions -rw-r--r--
bug 820931 - backout 4741ef815af9 r=backout

# 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 $(topsrcdir) -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 $(PROGRAM)
else
ifdef _PROGRAM
_RC_STRING += -BINARY $(_PROGRAM)
else
ifdef SHARED_LIBRARY
_RC_STRING += -BINARY $(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) $(topsrcdir)/config/version_win.pl
	$(PERL) $(topsrcdir)/config/version_win.pl $(_RC_STRING)

endif  # RESFILE
endif  # Windows

endif