Patch by gsr: [#18411] Improved makefiles for translation files
Makes it so it uses wildcards instead of hardcoding the po files and also only builds files if missing/changed. Kent
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
|
||||
# vim: tabstop=8
|
||||
# $Id$
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
@@ -31,12 +33,11 @@
|
||||
# If the user wants to override some of the build
|
||||
# vars they can put it in the file user-def.mk which
|
||||
# will get included if it exists (please do not commit
|
||||
# user-def.mk to cvs).
|
||||
|
||||
# user-def.mk to the revision control server).
|
||||
sinclude user-def.mk
|
||||
|
||||
# To build without openAL, uncomment the following line, or set it as
|
||||
# an environment variable, or put it uncommented in user-def.mk:
|
||||
# To build without openAL, set it as an environment variable,
|
||||
# or put it uncommented in user-def.mk:
|
||||
# export NAN_NO_OPENAL=true
|
||||
|
||||
export NANBLENDERHOME=$(shell pwd)
|
||||
@@ -44,13 +45,9 @@ MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory
|
||||
|
||||
SOURCEDIR =
|
||||
ifeq ($(FREE_WINDOWS),true)
|
||||
DIRS ?= dlltool extern intern source
|
||||
endif
|
||||
|
||||
DIRS ?= extern intern source
|
||||
|
||||
ifneq ($(INTERNATIONAL),false)
|
||||
DIRS += po
|
||||
DIRS ?= dlltool extern intern source po
|
||||
else
|
||||
DIRS ?= extern intern source po
|
||||
endif
|
||||
|
||||
include source/nan_subdirs.mk
|
||||
|
||||
+22
-19
@@ -1,3 +1,5 @@
|
||||
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
|
||||
# vim: tabstop=8
|
||||
# $Id$
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
@@ -9,47 +11,48 @@
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2002 by Stichting Blender Foundation,
|
||||
# Amsterdam, the Netherlands.
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: revision 1.1
|
||||
# The Original Code is: revision 1.2
|
||||
#
|
||||
# Contributor(s): Wouter van Heyst
|
||||
# Contributor(s): Wouter van Heyst, GSR
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# po Makefile for blender. Compiles the translations and places them
|
||||
# po Makefile for blender. Compiles the translations in the place
|
||||
# where release can pick them up.
|
||||
|
||||
PO_FILES = $(wildcard *.po)
|
||||
|
||||
LINGUAS = $(basename $(PO_FILES))
|
||||
|
||||
SOURCEDIR = blender/po
|
||||
|
||||
include nan_definitions.mk
|
||||
|
||||
LINGUAS = ar bg ca cs de el es fi fr hr it ja ko nl pl pt_BR ro ru sr sr@Latn sv uk zh_CN
|
||||
|
||||
ifeq ($(OS), darwin)
|
||||
DIR = $(OCGDIR)/bin/blender.app/Contents/Resources/locale/$@/LC_MESSAGES/
|
||||
DIR = $(OCGDIR)/bin/blender.app/Contents/Resources/locale/
|
||||
else
|
||||
DIR = $(OCGDIR)/bin/.blender/locale/$@/LC_MESSAGES/
|
||||
DIR = $(OCGDIR)/bin/.blender/locale/
|
||||
endif
|
||||
|
||||
all debug:: $(LINGUAS)
|
||||
LINGUAS_DEST= $(foreach LINGUA, $(LINGUAS),$(DIR)$(LINGUA)/LC_MESSAGES/blender.mo)
|
||||
|
||||
$(DIR)%/LC_MESSAGES/blender.mo: %.po
|
||||
mkdir -p $(@D)
|
||||
msgfmt -o $@ $<
|
||||
|
||||
all debug:: $(LINGUAS_DEST)
|
||||
# Just trigger the deps
|
||||
|
||||
clean::
|
||||
ifeq ($(OS), darwin)
|
||||
rm -rf $(OCGDIR)/bin/blender.app/Contents/Resources/locale/
|
||||
else
|
||||
rm -rf $(OCGDIR)/bin/.blender/locale/
|
||||
endif
|
||||
|
||||
$(LINGUAS):
|
||||
mkdir -p $(DIR)
|
||||
msgfmt -o $(DIR)/blender.mo $@.po
|
||||
rm -rf $(DIR)
|
||||
|
||||
Reference in New Issue
Block a user