[Tuxpaint-devel] Makefile break & fix for MAEMOFLAG
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Mark K. K. <mkk...@gm...> - 2007-03-17 05:39:13
|
It looks like the Nokia 770 patch added a variable called "MAEMOFLAG" in
the Makefile:
DEFS=-DDATA_PREFIX=\"$(DATA_PREFIX)/\" \
-D$(NOSOUNDFLAG) -D$(NOSVGFLAG) -DDOC_PREFIX=\"$(DOC_PREFIX)/\" \
-DLOCALEDIR=\"$(LOCALE_PREFIX)/\" -DCONFDIR=\"$(CONFDIR)/\" \
-DVER_VERSION=\"$(VER_VERSION)\" \
-DVER_DATE=\"$(VER_DATE)\" \
-D$(MAEMOFLAG)
where MAEMOFLAG is set to NOKIA_770 when compling for the Nokia 770:
# "make nokia770" builds the program for the Nokia 770.
nokia770:
make \
DATA_PREFIX=/usr/share/tuxpaint \
SVG_LIB= SVG_CFLAGS= NOSVGFLAG=NOSVG \
MAEMOFLAG=NOKIA_770
which is fine, except the default value of MAEMOFLAG for non-Nokia_770
platform is blank:
# Maemo flag
MAEMOFLAG=
which causes the DEFS expansion to end in:
DEFS=-DDATA_PREFIX= ... -D
which causes `make` to refuse to compile for non-Nokia_770 platforms
because there is no identifier defined after "-D":
~/proj/tuxpaint/tuxpaint/>make nosvg
Building with SVG DISABLED
make SVG_LIB= SVG_CFLAGS= NOSVGFLAG=NOSVG
make[1]: Entering directory `/home/vindaci/proj/tuxpaint/tuxpaint'
...Compiling Tux Paint from source...
cc -O2 -W -Wall -fno-common -ffloat-store -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes `src/test-option.sh
-Wdeclaration-after-statement` -I/usr/include/SDL -D_REENTRANT
-Isrc/mouse -DLARGE_CURSOR_SHAPES
-DDATA_PREFIX=\"/usr/local/share/tuxpaint/\" -D__SOUND -DNOSVG
-DDOC_PREFIX=\"/usr/local/share/doc/tuxpaint/\"
-DLOCALEDIR=\"/usr/local/share/locale/\"
-DCONFDIR=\"/usr/local/etc/tuxpaint/\" -DVER_VERSION=\"0.9.17\"
-DVER_DATE=\"`date +"%Y-%m-%d"`\" -D \
-c src/tuxpaint.c -o obj/tuxpaint.o
<command line>:14:1: macro names must be identifiers
Adding a default value for MAEMOFLAG that does not conflict with any
other defined constants or macros should take care of this little
issue. Anyone mind if I add a default value for MAEMOFLAG?:
Index: Makefile
===================================================================
RCS file: /cvsroot/tuxpaint/tuxpaint/Makefile,v
retrieving revision 1.125
diff -u -r1.125 Makefile
--- Makefile 12 Mar 2007 06:27:03 -0000 1.125
+++ Makefile 17 Mar 2007 05:22:42 -0000
@@ -84,7 +84,7 @@
# Maemo flag
-MAEMOFLAG=
+MAEMOFLAG=NO_MAEMOFLAG
# Where to find cursor shape XBMs
which produces:
~/proj/tuxpaint/tuxpaint/>make nosvg
Building with SVG DISABLED
make SVG_LIB= SVG_CFLAGS= NOSVGFLAG=NOSVG
make[1]: Entering directory `/home/vindaci/proj/tuxpaint/tuxpaint'
...Compiling Tux Paint from source...
cc -O2 -W -Wall -fno-common -ffloat-store -Wcast-align -Wredundant-decls
-Wbad-function-cast -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes `src/test-option.sh
-Wdeclaration-after-statement` -I/usr/include/SDL -D_REENTRANT
-Isrc/mouse -DLARGE_CURSOR_SHAPES
-DDATA_PREFIX=\"/usr/local/share/tuxpaint/\" -D__SOUND -DNOSVG
-DDOC_PREFIX=\"/usr/local/share/doc/tuxpaint/\"
-DLOCALEDIR=\"/usr/local/share/locale/\"
-DCONFDIR=\"/usr/local/etc/tuxpaint/\" -DVER_VERSION=\"0.9.17\"
-DVER_DATE=\"`date +"%Y-%m-%d"`\" -DNO_MAEMOFLAG \
-c src/tuxpaint.c -o obj/tuxpaint.o
...Compiling i18n support...
...Compiling cursor support...
etc.
-Mark
|