config/version.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/config/version.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +
     1.8 +ifndef INCLUDED_VERSION_MK
     1.9 +INCLUDED_VERSION_MK=1
    1.10 +
    1.11 +# Windows gmake build:
    1.12 +# Build default .rc file if $(RESFILE) isn't defined.
    1.13 +# TODO:
    1.14 +# PBI      : Private build info.  Not used currently.
    1.15 +#            Guessing the best way would be to set an env var.
    1.16 +# BINARY   : Binary name.  Not used currently.
    1.17 +ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
    1.18 +ifndef RESFILE
    1.19 +RCFILE=./module.rc
    1.20 +RESFILE=./module.res
    1.21 +_RC_STRING = -QUIET 1 -DEPTH $(DEPTH) -TOPSRCDIR $(topsrcdir) -OBJDIR . -SRCDIR $(srcdir) -DISPNAME "$(MOZ_APP_DISPLAYNAME)" -APPVERSION "$(MOZ_APP_VERSION)"
    1.22 +ifdef MOZILLA_OFFICIAL
    1.23 +_RC_STRING += -OFFICIAL 1
    1.24 +endif
    1.25 +ifdef MOZ_DEBUG
    1.26 +_RC_STRING += -DEBUG 1
    1.27 +endif
    1.28 +ifdef PROGRAM
    1.29 +_RC_STRING += -BINARY $(PROGRAM)
    1.30 +else
    1.31 +ifdef _PROGRAM
    1.32 +_RC_STRING += -BINARY $(_PROGRAM)
    1.33 +else
    1.34 +ifdef SHARED_LIBRARY
    1.35 +_RC_STRING += -BINARY $(SHARED_LIBRARY)
    1.36 +endif
    1.37 +endif
    1.38 +endif
    1.39 +ifdef RCINCLUDE
    1.40 +_RC_STRING += -RCINCLUDE $(srcdir)/$(RCINCLUDE)
    1.41 +endif
    1.42 +
    1.43 +GARBAGE += $(RESFILE) $(RCFILE)
    1.44 +
    1.45 +#dummy target so $(RCFILE) doesn't become the default =P
    1.46 +all::
    1.47 +
    1.48 +$(RCFILE): $(RCINCLUDE) $(topsrcdir)/config/version_win.pl
    1.49 +	$(PERL) $(topsrcdir)/config/version_win.pl $(_RC_STRING)
    1.50 +
    1.51 +endif  # RESFILE
    1.52 +endif  # Windows
    1.53 +
    1.54 +endif

mercurial