Now that Makefile-i18n is shrunk, merge it in. Drop a C89-related warning, because we now use gcc for Windows.
This commit is contained in:
parent
5867c542fe
commit
1e891b9df6
2 changed files with 72 additions and 123 deletions
104
Makefile
104
Makefile
|
|
@ -52,32 +52,26 @@ PREFIX:=$($(OS)_PREFIX)
|
||||||
|
|
||||||
|
|
||||||
# Root directory to place files when creating packages.
|
# Root directory to place files when creating packages.
|
||||||
|
|
||||||
DESTDIR:=$(PKG_ROOT)
|
DESTDIR:=$(PKG_ROOT)
|
||||||
|
|
||||||
|
|
||||||
# Program:
|
# Program:
|
||||||
|
|
||||||
BIN_PREFIX:=$(DESTDIR)$(PREFIX)/bin
|
BIN_PREFIX:=$(DESTDIR)$(PREFIX)/bin
|
||||||
|
|
||||||
# Data:
|
# Data:
|
||||||
|
|
||||||
DATA_PREFIX:=$(DESTDIR)$(PREFIX)/share/tuxpaint
|
DATA_PREFIX:=$(DESTDIR)$(PREFIX)/share/tuxpaint
|
||||||
|
|
||||||
|
# Locale files
|
||||||
|
LOCALE_PREFIX=$(DESTDIR)$(PREFIX)/share/locale
|
||||||
|
|
||||||
# Locale Prefix (dup'd from Makefile-i18n; needed by src/i18n.c to set path
|
# IM files
|
||||||
# to our specific tuxpaint.mo files! -bjk 2008.05.08)
|
IM_PREFIX=$(DESTDIR)$(PREFIX)/share/tuxpaint/im
|
||||||
LOCALE_PREFIX:=$(DESTDIR)$(PREFIX)/share/locale
|
|
||||||
|
|
||||||
|
|
||||||
# Magic Tool plug-ins
|
# Magic Tool plug-ins
|
||||||
|
|
||||||
INCLUDE_PREFIX:=$(DESTDIR)$(PREFIX)/include
|
INCLUDE_PREFIX:=$(DESTDIR)$(PREFIX)/include
|
||||||
MAGIC_PREFIX:=$(DESTDIR)$(PREFIX)/lib/tuxpaint/plugins
|
MAGIC_PREFIX:=$(DESTDIR)$(PREFIX)/lib/tuxpaint/plugins
|
||||||
|
|
||||||
|
|
||||||
# Docs and man page:
|
# Docs and man page:
|
||||||
|
|
||||||
DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint
|
DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint
|
||||||
DEVDOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-dev
|
DEVDOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-dev
|
||||||
MAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
|
MAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
|
||||||
|
|
@ -85,7 +79,6 @@ DEVMAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
|
||||||
|
|
||||||
|
|
||||||
# 'System-wide' Config file:
|
# 'System-wide' Config file:
|
||||||
|
|
||||||
ifeq ($(PREFIX),/usr)
|
ifeq ($(PREFIX),/usr)
|
||||||
CONFDIR:=$(DESTDIR)/etc/tuxpaint
|
CONFDIR:=$(DESTDIR)/etc/tuxpaint
|
||||||
else
|
else
|
||||||
|
|
@ -94,42 +87,30 @@ endif
|
||||||
|
|
||||||
|
|
||||||
# Commands useful to other arch's (e.g., BeOS)
|
# Commands useful to other arch's (e.g., BeOS)
|
||||||
|
|
||||||
RSRC_CMD:=echo -n
|
RSRC_CMD:=echo -n
|
||||||
MIMESET_CMD:=echo -n
|
MIMESET_CMD:=echo -n
|
||||||
|
|
||||||
|
|
||||||
# Icons and launchers:
|
# Icons and launchers:
|
||||||
|
|
||||||
ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps
|
ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps
|
||||||
X11_ICON_PREFIX:=$(DESTDIR)$(PREFIX)/X11R6/include/X11/pixmaps
|
X11_ICON_PREFIX:=$(DESTDIR)$(PREFIX)/X11R6/include/X11/pixmaps
|
||||||
GNOME_PREFIX:=`gnome-config --prefix 2> /dev/null`
|
GNOME_PREFIX:=`gnome-config --prefix 2> /dev/null`
|
||||||
KDE_PREFIX:=`kde-config --install apps --expandvars 2> /dev/null`
|
KDE_PREFIX:=`kde-config --install apps --expandvars 2> /dev/null`
|
||||||
KDE_ICON_PREFIX:=`kde-config --install icon --expandvars 2> /dev/null`
|
KDE_ICON_PREFIX:=`kde-config --install icon --expandvars 2> /dev/null`
|
||||||
|
|
||||||
|
|
||||||
# Built with sound by default (override with "make nosound")
|
# Built with sound by default (override with "make nosound")
|
||||||
|
|
||||||
NOSOUNDFLAG:=__SOUND
|
NOSOUNDFLAG:=__SOUND
|
||||||
|
|
||||||
|
|
||||||
# Built with SVG support (via Cairo) by default (override with "make nosvg")
|
# Built with SVG support (via Cairo) by default (override with "make nosvg")
|
||||||
|
|
||||||
NOSVGFLAG:=__SVG
|
NOSVGFLAG:=__SVG
|
||||||
|
|
||||||
|
|
||||||
# Built with SDL Pango support by default (override with "make nopango")
|
# Built with SDL Pango support by default (override with "make nopango")
|
||||||
|
|
||||||
NOPANGOFLAG:=___SDLPANGO
|
NOPANGOFLAG:=___SDLPANGO
|
||||||
|
|
||||||
|
|
||||||
# Built with libcairo2 support by default (use libcairo1 with "make oldsvg")
|
# Built with libcairo2 support by default (use libcairo1 with "make oldsvg")
|
||||||
|
|
||||||
OLDSVGFLAG:=__SVG
|
OLDSVGFLAG:=__SVG
|
||||||
|
|
||||||
|
|
||||||
# Maemo flag
|
# Maemo flag
|
||||||
|
|
||||||
MAEMOFLAG:=NO_MAEMOFLAG
|
MAEMOFLAG:=NO_MAEMOFLAG
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -137,13 +118,11 @@ MAEMOFLAG:=NO_MAEMOFLAG
|
||||||
|
|
||||||
MOUSEDIR:=mouse
|
MOUSEDIR:=mouse
|
||||||
CURSOR_SHAPES:=LARGE
|
CURSOR_SHAPES:=LARGE
|
||||||
|
|
||||||
# MOUSEDIR:=mouse/16x16
|
# MOUSEDIR:=mouse/16x16
|
||||||
# CURSOR_SHAPES:=SMALL
|
# CURSOR_SHAPES:=SMALL
|
||||||
|
|
||||||
|
|
||||||
# Libraries, paths, and flags:
|
# Libraries, paths, and flags:
|
||||||
|
|
||||||
SDL_MIXER_LIB:=-lSDL_mixer
|
SDL_MIXER_LIB:=-lSDL_mixer
|
||||||
SDL_PANGO_LIB:=-lSDL_Pango
|
SDL_PANGO_LIB:=-lSDL_Pango
|
||||||
SDL_LIBS:=$(shell sdl-config --libs) -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB) $(SDL_PANGO_LIB)
|
SDL_LIBS:=$(shell sdl-config --libs) -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB) $(SDL_PANGO_LIB)
|
||||||
|
|
@ -164,9 +143,6 @@ ARCH_LIBS:=obj/postscript_print.o
|
||||||
|
|
||||||
# The entire set of CFLAGS:
|
# The entire set of CFLAGS:
|
||||||
|
|
||||||
# FIXME: src/test-option.sh runs every time
|
|
||||||
# FIXME: -Wstrict-aliasing=2 not used
|
|
||||||
|
|
||||||
#-ffast-math
|
#-ffast-math
|
||||||
OPTFLAGS:=-O2
|
OPTFLAGS:=-O2
|
||||||
CFLAGS:=$(OPTFLAGS) -W -Wall -fno-common -ffloat-store \
|
CFLAGS:=$(OPTFLAGS) -W -Wall -fno-common -ffloat-store \
|
||||||
|
|
@ -175,7 +151,7 @@ CFLAGS:=$(OPTFLAGS) -W -Wall -fno-common -ffloat-store \
|
||||||
-Wbad-function-cast -Wwrite-strings \
|
-Wbad-function-cast -Wwrite-strings \
|
||||||
-Waggregate-return \
|
-Waggregate-return \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes \
|
-Wstrict-prototypes -Wmissing-prototypes \
|
||||||
`src/test-option.sh -Wdeclaration-after-statement`
|
`src/test-option.sh -Wstrict-aliasing=2`
|
||||||
|
|
||||||
DEFS:=-DDATA_PREFIX=\"$(DATA_PREFIX)/\" \
|
DEFS:=-DDATA_PREFIX=\"$(DATA_PREFIX)/\" \
|
||||||
-D$(NOSOUNDFLAG) -D$(NOSVGFLAG) -D$(OLDSVGFLAG) \
|
-D$(NOSOUNDFLAG) -D$(NOSVGFLAG) -D$(OLDSVGFLAG) \
|
||||||
|
|
@ -395,10 +371,74 @@ nokia770:
|
||||||
LOCALE_PREFIX:=$(PREFIX)/share/locale \
|
LOCALE_PREFIX:=$(PREFIX)/share/locale \
|
||||||
CONFDIR:=/etc/tuxpaint
|
CONFDIR:=/etc/tuxpaint
|
||||||
|
|
||||||
|
##### i18n stuff
|
||||||
|
|
||||||
# Include the i18n stuff (moved out of main Makefile -bjk 2007.05.02)
|
POFILES:=$(wildcard src/po/*.po)
|
||||||
#
|
MOFILES:=$(patsubst src/po/%.po,trans/%.mo,$(POFILES))
|
||||||
include Makefile-i18n
|
INSTALLED_MOFILES:=$(patsubst trans/%.mo,$(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint.mo,$(MOFILES))
|
||||||
|
|
||||||
|
$(INSTALLED_MOFILES): $(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint.mo: trans/%.mo
|
||||||
|
install -D -m 644 $< $@
|
||||||
|
|
||||||
|
.PHONY: uninstall-i18n
|
||||||
|
uninstall-i18n:
|
||||||
|
-rm $(LOCALE_PREFIX)/*/LC_MESSAGES/tuxpaint.mo
|
||||||
|
-rm $(IM_PREFIX)/ja.im
|
||||||
|
-rm $(IM_PREFIX)/ko.im
|
||||||
|
-rm $(IM_PREFIX)/th.im
|
||||||
|
-rm $(IM_PREFIX)/zh_tw.im
|
||||||
|
|
||||||
|
|
||||||
|
# Install the translated text:
|
||||||
|
.PHONY: install-gettext
|
||||||
|
install-gettext: $(INSTALLED_MOFILES)
|
||||||
|
|
||||||
|
|
||||||
|
# Install the Input Method files:
|
||||||
|
.PHONY: install-im
|
||||||
|
ifneq ($(IM_PREFIX),)
|
||||||
|
install-im:
|
||||||
|
@echo
|
||||||
|
@echo "...Installing Input Method files..."
|
||||||
|
@#
|
||||||
|
@install -d $(IM_PREFIX)
|
||||||
|
@#
|
||||||
|
@echo " ja ...Japanese..."
|
||||||
|
@cp im/ja.im $(IM_PREFIX)/ja.im
|
||||||
|
@chmod 644 $(IM_PREFIX)/ja.im
|
||||||
|
@#
|
||||||
|
@echo " ko ...Korean..."
|
||||||
|
@cp im/ko.im $(IM_PREFIX)/ko.im
|
||||||
|
@chmod 644 $(IM_PREFIX)/ko.im
|
||||||
|
@#
|
||||||
|
@echo " th ...Thai..."
|
||||||
|
@cp im/th.im $(IM_PREFIX)/th.im
|
||||||
|
@chmod 644 $(IM_PREFIX)/th.im
|
||||||
|
@#
|
||||||
|
@echo " zh_tw ...Traditional Chinese..."
|
||||||
|
@cp im/zh_tw.im $(IM_PREFIX)/zh_tw.im
|
||||||
|
@chmod 644 $(IM_PREFIX)/zh_tw.im
|
||||||
|
else
|
||||||
|
install-im:
|
||||||
|
@echo
|
||||||
|
@echo "...Not Installing Input Method files (no IM_PREFIX defined)..."
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# Build the translation files for gettext
|
||||||
|
|
||||||
|
$(MOFILES): trans/%.mo: src/po/%.po
|
||||||
|
msgfmt -o $@ $<
|
||||||
|
|
||||||
|
.PHONY: translations
|
||||||
|
translations: trans $(MOFILES)
|
||||||
|
|
||||||
|
trans:
|
||||||
|
@echo
|
||||||
|
@echo "...Preparing translation files..."
|
||||||
|
@mkdir trans
|
||||||
|
|
||||||
|
######
|
||||||
|
|
||||||
|
|
||||||
# "make install" installs all of the various parts
|
# "make install" installs all of the various parts
|
||||||
|
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
# Makefile-i18n for tuxpaint
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
# Tux Paint - A simple drawing program for children.
|
|
||||||
|
|
||||||
# Copyright (c) 2002-2008 by Bill Kendrick and others
|
|
||||||
# bill@newbreedsoftware.com
|
|
||||||
# http://www.tuxpaint.org/
|
|
||||||
|
|
||||||
# June 14, 2002 - April 5, 2008
|
|
||||||
|
|
||||||
|
|
||||||
# Locale files
|
|
||||||
|
|
||||||
LOCALE_PREFIX=$(DESTDIR)$(PREFIX)/share/locale
|
|
||||||
|
|
||||||
|
|
||||||
# IM files
|
|
||||||
|
|
||||||
IM_PREFIX=$(DESTDIR)$(PREFIX)/share/tuxpaint/im
|
|
||||||
|
|
||||||
|
|
||||||
# A default target, in case someone tries using this makefile directly...
|
|
||||||
.PHONY: all-i18n
|
|
||||||
all-i18n:
|
|
||||||
@echo "This is Makefile-i18n; don't use it directly, it's used by Makefile"
|
|
||||||
|
|
||||||
POFILES:=$(wildcard src/po/*.po)
|
|
||||||
MOFILES:=$(patsubst src/po/%.po,trans/%.mo,$(POFILES))
|
|
||||||
INSTALLED_MOFILES:=$(patsubst trans/%.mo,$(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint.mo,$(MOFILES))
|
|
||||||
|
|
||||||
$(INSTALLED_MOFILES): $(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint.mo: trans/%.mo
|
|
||||||
install -D -m 644 $< $@
|
|
||||||
|
|
||||||
.PHONY: uninstall-i18n
|
|
||||||
uninstall-i18n:
|
|
||||||
-rm $(LOCALE_PREFIX)/*/LC_MESSAGES/tuxpaint.mo
|
|
||||||
-rm $(IM_PREFIX)/ja.im
|
|
||||||
-rm $(IM_PREFIX)/ko.im
|
|
||||||
-rm $(IM_PREFIX)/th.im
|
|
||||||
-rm $(IM_PREFIX)/zh_tw.im
|
|
||||||
|
|
||||||
|
|
||||||
# Install the translated text:
|
|
||||||
.PHONY: install-gettext
|
|
||||||
install-gettext: $(INSTALLED_MOFILES)
|
|
||||||
|
|
||||||
|
|
||||||
# Install the Input Method files:
|
|
||||||
.PHONY: install-im
|
|
||||||
ifneq ($(IM_PREFIX),)
|
|
||||||
install-im:
|
|
||||||
@echo
|
|
||||||
@echo "...Installing Input Method files..."
|
|
||||||
@#
|
|
||||||
@install -d $(IM_PREFIX)
|
|
||||||
@#
|
|
||||||
@echo " ja ...Japanese..."
|
|
||||||
@cp im/ja.im $(IM_PREFIX)/ja.im
|
|
||||||
@chmod 644 $(IM_PREFIX)/ja.im
|
|
||||||
@#
|
|
||||||
@echo " ko ...Korean..."
|
|
||||||
@cp im/ko.im $(IM_PREFIX)/ko.im
|
|
||||||
@chmod 644 $(IM_PREFIX)/ko.im
|
|
||||||
@#
|
|
||||||
@echo " th ...Thai..."
|
|
||||||
@cp im/th.im $(IM_PREFIX)/th.im
|
|
||||||
@chmod 644 $(IM_PREFIX)/th.im
|
|
||||||
@#
|
|
||||||
@echo " zh_tw ...Traditional Chinese..."
|
|
||||||
@cp im/zh_tw.im $(IM_PREFIX)/zh_tw.im
|
|
||||||
@chmod 644 $(IM_PREFIX)/zh_tw.im
|
|
||||||
else
|
|
||||||
install-im:
|
|
||||||
@echo
|
|
||||||
@echo "...Not Installing Input Method files (no IM_PREFIX defined)..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Build the translation files for gettext
|
|
||||||
|
|
||||||
$(MOFILES): trans/%.mo: src/po/%.po
|
|
||||||
msgfmt -o $@ $<
|
|
||||||
|
|
||||||
.PHONY: translations
|
|
||||||
translations: trans $(MOFILES)
|
|
||||||
|
|
||||||
trans:
|
|
||||||
@echo
|
|
||||||
@echo "...Preparing translation files..."
|
|
||||||
@mkdir trans
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue