config/version.mk
author Mark Banner <bugzilla@standard8.plus.com>
Tue, 19 Mar 2013 20:22:26 +0000
changeset 16447 285be5932f9dfb4e0e6a9203f84d2c1fc84fbde0
parent 12009 84ac3c71109811da751f0ef2d72108075938f094
child 24860 23bf18bc6edbc51172ef8a75421c01fba5da1c43
child 25942 56635a802e796257f18931197f0dbfe1aef8a6e8
permissions -rw-r--r--
imported patch makefile_remove_complicated

# 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 $(MOZDEPTH) -TOPSRCDIR $(MOZILLA_SRCDIR) -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 MODULE
_RC_STRING += -MODNAME $(MODULE)
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) $(MOZILLA_SRCDIR)/config/version_win.pl
	$(PERL) $(MOZILLA_SRCDIR)/config/version_win.pl $(_RC_STRING)

endif  # RESFILE
endif  # Windows

endif