[Tux4kids-commits] r30 - in tuxmath/trunk: . docs src
dbruce at alioth.debian.org
dbruce at alioth.debian.org
Thu Mar 8 21:08:37 CET 2007
Author: dbruce
Date: 2006-09-29 21:44:19 +0000 (Fri, 29 Sep 2006)
New Revision: 30
Modified:
tuxmath/trunk/Makefile
tuxmath/trunk/docs/INSTALL.txt
tuxmath/trunk/docs/README.txt
tuxmath/trunk/docs/changelog
tuxmath/trunk/src/fileops.c
tuxmath/trunk/src/setup.c
tuxmath/trunk/src/tuxmath.h
Log:
Now crossplatform (*nix and Win) and uses autotools
Modified: tuxmath/trunk/Makefile
===================================================================
--- tuxmath/trunk/Makefile 2006-09-22 21:29:50 UTC (rev 29)
+++ tuxmath/trunk/Makefile 2006-09-29 21:44:19 UTC (rev 30)
@@ -1,127 +1,638 @@
-# Makefile for "tuxmath"
-# (Hand-coded)
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile. Generated from Makefile.in by configure.
-# Bill Kendrick
-# bill at newbreedsoftware.com
-# http://www.newbreedsoftware.com/tuxmath/
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# Modified by David Bruce
-# dbruce at tampabay.rr.com
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# 2001.Aug.26 - 2006.Aug.22
-CFLAGS=-Wall -g $(SDL_CFLAGS) -DDATA_PREFIX=\"$(DATA_PREFIX)\" -DDEBUG \
- -DVERSION=\"$(VERSION)\" -D$(SOUND)SOUND
+srcdir = .
+top_srcdir = .
-SDL_CFLAGS=$(shell sdl-config --cflags)
-SDL_LIBS=$(shell sdl-config --libs)
+pkgdatadir = $(datadir)/TuxMath
+pkglibdir = $(libdir)/TuxMath
+pkgincludedir = $(includedir)/TuxMath
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+target_triplet = i686-pc-linux-gnu
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ config.guess config.sub depcomp install-sh missing \
+ mkinstalldirs
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(icondir)"
+iconDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(icon_DATA)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE =
+AMTAR = tar
+AUTOCONF = autoconf
+AUTOHEADER = autoheader
+AUTOMAKE = automake-1.9
+AWK = mawk
+BUILD_MINGW32_FALSE =
+BUILD_MINGW32_TRUE = #
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
+CPP = gcc -E
+CPPFLAGS =
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = grep -E
+EXEEXT =
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS =
+LIBOBJS =
+LIBS = -L/usr/lib -lSDL -lSDL_image -lSDL_mixer
+LTLIBOBJS =
+MAINT = #
+MAINTAINER_MODE_FALSE =
+MAINTAINER_MODE_TRUE = #
+MAKEINFO = makeinfo
+NAME_VERSION = TuxMath-0.96
+OBJEXT = o
+PACKAGE = TuxMath
+PACKAGE_BUGREPORT =
+PACKAGE_DATA_DIR = data
+PACKAGE_NAME =
+PACKAGE_STRING =
+PACKAGE_TARNAME =
+PACKAGE_VERSION =
+PATH_SEPARATOR = :
+POW_LIB =
+SDL_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
+SDL_CONFIG = /usr/bin/sdl-config
+SDL_LIBS = -L/usr/lib -lSDL
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+VERSION = 0.96
+ac_ct_CC = gcc
+ac_ct_STRIP =
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias =
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias =
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /home/dbruce/tuxmath/trunk/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target = i686-pc-linux-gnu
+target_alias =
+target_cpu = i686
+target_os = linux-gnu
+target_vendor = pc
+SUBDIRS = src
+icondir = $(datadir)/pixmaps
+icon_DATA = data/images/icon.png
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
-LIBS=$(SDL_LIBS) $(MIXERLIB) -lSDL_image
-MIXERLIB=-lSDL_mixer
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
-ifndef PREFIX
-PREFIX=/usr/local
-endif
-DATA_PREFIX=$(DESTDIR)$(PREFIX)/share/tuxmath/
-ifndef BIN_PREFIX
-BIN_PREFIX=$(DESTDIR)$(PREFIX)/bin
-endif
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
-# There isn't always a root group on every unix
-OWNER=$(shell if `groups root | grep root > /dev/null` ; then echo root:root ; else echo root:wheel ; fi)
+$(top_srcdir)/configure: # $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
+ else :; fi
-VERSION=tuxmath-0.96
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: # $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
-all: tuxmath
+distclean-hdr:
+ -rm -f config.h stamp-h1
+uninstall-info-am:
+install-iconDATA: $(icon_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(icondir)" || $(mkdir_p) "$(DESTDIR)$(icondir)"
+ @list='$(icon_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \
+ $(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \
+ done
-nosound:
- make tuxmath SOUND=NO MIXERLIB=
+uninstall-iconDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(icon_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \
+ rm -f "$(DESTDIR)$(icondir)/$$f"; \
+ done
-install:
- @echo "COPYING BINARY TO $(BIN_PREFIX)"
- mkdir -p $(BIN_PREFIX)
- mkdir -p $(DATA_PREFIX)
- strip tuxmath
- cp tuxmath $(BIN_PREFIX)
- chown $(OWNER) $(BIN_PREFIX)/tuxmath
- chmod 0755 $(BIN_PREFIX)/tuxmath
- @echo "COPYING DATA FILES TO $(DATA_PREFIX)"
- mkdir -p $(DATA_PREFIX)
- cp -r data/* $(DATA_PREFIX)
- chown -R $(OWNER) $(DATA_PREFIX)
- chmod a+Xr $(DATA_PREFIX)
- chmod a-w $(DATA_PREFIX)
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
-uninstall:
- @echo "REMOVING TUX MATH"
- -rm $(BIN_PREFIX)/tuxmath
- -rm -r $(DATA_PREFIX)
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
-clean:
- -rm tuxmath
- -rm obj/*.o
- -rmdir obj
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
-tuxmath: obj/tuxmath.o obj/setup.o obj/title.o obj/game.o \
- obj/options.o obj/credits.o obj/playsound.o \
- obj/mathcards.o obj/fileops.o
- @echo "LINKING!"
- $(CC) $(CFLAGS) $^ -o tuxmath $(LIBS)
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-obj:
- mkdir -p obj
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
-obj/tuxmath.o: src/tuxmath.c src/fileops.h src/setup.h \
- src/title.h src/game.h src/options.h src/credits.h \
- src/playsound.h
- @echo "BUILDING tuxmath.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/tuxmath.c -c -o obj/tuxmath.o
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
-obj/setup.o: src/setup.c src/setup.h src/fileops.h src/game.h
- @echo "BUILDING setup.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/setup.c -c -o obj/setup.o
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
-obj/title.o: src/title.c src/title.h src/setup.h src/fileops.h \
- src/playsound.h
- @echo "BUILDING title.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/title.c -c -o obj/title.o
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
-obj/game.o: src/game.c src/game.h src/setup.h src/fileops.h \
- src/playsound.h
- @echo "BUILDING game.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/game.c -c -o obj/game.o
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
-obj/options.o: src/options.c src/options.h src/fileops.h src/setup.h \
- src/playsound.h
- @echo "BUILDING options.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/options.c -c -o obj/options.o
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
-obj/credits.o: src/credits.c src/credits.h src/setup.h src/fileops.h
- @echo "BUILDING credits.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/credits.c -c -o obj/credits.o
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(icondir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
-obj/playsound.o: src/playsound.c src/playsound.h src/setup.h \
- src/fileops.h
- @echo "BUILDING playsound.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/playsound.c -c -o obj/playsound.o
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-obj/mathcards.o: src/mathcards.c src/mathcards.h
- @echo "BUILDING mathcards.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/mathcards.c -c -o obj/mathcards.o
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
-obj/fileops.o: src/fileops.c src/fileops.h
- @echo "BUILDING fileops.o"
- -mkdir -p obj
- $(CC) $(CFLAGS) src/fileops.c -c -o obj/fileops.o
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local install-iconDATA
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-iconDATA uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+ dist-tarZ dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-recursive distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
+ install-exec-am install-iconDATA install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-iconDATA uninstall-info-am
+
+
+install-data-local:
+ @$(NORMAL_INSTALL)
+ if test -d $(srcdir)/$(PACKAGE_DATA_DIR); then \
+ $(mkinstalldirs) $(DESTDIR)/$(pkgdatadir); \
+ cd $(srcdir)/$(PACKAGE_DATA_DIR) ; tar cf - --exclude "Makefile.in" --exclude "*.in" --exclude "*~" --exclude "Makefile" --exclude "Makefile.am" --exclude CVS --exclude .xvpics --exclude "1[1-9].ogg" --exclude "2?.ogg" * | ( cd $(DESTDIR)/$(pkgdatadir) ; tar xf -) ; cd .. ; \
+ fi
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Modified: tuxmath/trunk/docs/INSTALL.txt
===================================================================
--- tuxmath/trunk/docs/INSTALL.txt 2006-09-22 21:29:50 UTC (rev 29)
+++ tuxmath/trunk/docs/INSTALL.txt 2006-09-29 21:44:19 UTC (rev 30)
@@ -1,12 +1,8 @@
-INSTALL.txt for "tuxmath"
+INSTALL.txt for "Tux, Of Math Command" (aka "Tuxmath")
-September 6, 2001
+September 29, 2006
-[ NOTE: When (and if) TuxMath changes from a simple Makefile system to
- an autoconf/automake system, parts of this document will need to change! ]
-
-
Requirements
------------
Operating System
@@ -15,15 +11,18 @@
operating system supported by libSDL. At the time this document was
written, this included:
- Windows 32-bit
- MacOS
Linux
+ Windows 32-bit
+
+ In principle, Tuxmath should build and run on any platform with SDL,
+ including:
+ MacOSX
Solaris
IRIX
FreeBSD
BeOS
+ However, I do not know if anyone has done a build on these systems
-
CPU
---
[ Minimum requirements should be P90, but not sure yet... ]
@@ -123,76 +122,21 @@
----------
Compiling the Program
---------------------
- To compile the "tuxmath" binary, simply issue the following command:
+ Tuxmath now uses the Gnu autoconf/automake tools, meaning that the
+ complete build and installation process just involves typing the
+ following at a shell prompt within the /trunk directory of the source
+ code tree:
+
+ ./configure && make && make install
- make
+ By default, the build process will install tuxmath under /usr/local/share
+ for the data and /usr/local/bin for the executable.
- This will compile the source files and, unless any errors occur,
- create a "tuxmath" executable program in the TuxMath directory.
+ If you are using a deb or rpm-based distribution, your distro may have
+ tuxmath in a prepared package, in which case your job is as simple as
+ "apt-get install tuxmath".
-
- If you wish to build the program without sound support (in this
- case, the "SDL_mixer" does NOT need to be installed), run this
- command instead:
-
- make nosound
-
-
- NOTE: See below to change the installation directory for TuxMath.
-
-
- Installing
- ----------
- Once compiled, you can have the program and graphics/sound data
- files copied to a shared location on your system.
-
- First, change to the superuser (root), by running the "su"
- command and entering root's password. Then, run this command:
-
- make install
-
- By default, the program will be copied into "/usr/local/bin/"
- and the data will be copied into a new directory,
- "/usr/local/share/tuxmath/".
-
-
- Changing Installation Directory
- -------------------------------
- If you wish to override the default installation directories
- for TuxMath, you can specify them when you run "make"
- (or "make nosound"). Do this BEFORE running "make install".
-
- make PREFIX=/home/username/
-
-
- For example, if you do not have superuser access on the computer
- you're installing in, and wish to simply run TuxMath from within
- your home directory, you can run:
-
- make PREFIX=/home/usernmame/
-
- And when you go to install, run "make install" with the same:
-
- make install PREFIX=/home/username
-
- The data files will be copied into "tuxmath-data" in your home
- directory, and the program will be copied into the "bin" directory.
-
- Packages will also find the DESTDIR option useful, you can build as normal,
- then install to a "dummy" root directory so that it is easy to determine what
- files are part of the package
-
- make install DESTDIR=/tmp/tuxmath
-
-
- Cleaning Up
- -----------
- If you need to re-make from scratch for some reason (for example,
- you wish to change the "DATA_PREFIX" value when you run "make"),
- you can have all of the compiled files (the program, and all of the
- object files in the "obj/" directory) deleted by running:
-
- make clean
-
-
-[ UNDER CONSTRUCTION ]
+ Windows
+ -------
+ (under construction)
+
Modified: tuxmath/trunk/docs/README.txt
===================================================================
--- tuxmath/trunk/docs/README.txt 2006-09-22 21:29:50 UTC (rev 29)
+++ tuxmath/trunk/docs/README.txt 2006-09-29 21:44:19 UTC (rev 30)
@@ -2,9 +2,9 @@
An educational math tutorial game starring Tux, the Linux Penguin
-----------------------------------------------------------------
-Sept 22, 2006
+Sept 29, 2006
-For tuxmath-0.96
+For tuxmath-0.97
Objective
---------
Modified: tuxmath/trunk/docs/changelog
===================================================================
--- tuxmath/trunk/docs/changelog 2006-09-22 21:29:50 UTC (rev 29)
+++ tuxmath/trunk/docs/changelog 2006-09-29 21:44:19 UTC (rev 30)
@@ -1,5 +1,17 @@
changelog for "tuxmath"
+2006.Sep.29 (https://svn.tux4kids.net/tuxmath/ - revision 28)
+ Version 0.97
+
+ Build:
+ * Successful Windows XP build including all current features,
+ config file handling, game summaries.
+ * Build system changed to autoconf/automake. fileops.h/fileops.c
+ changed to accomodate cross-platform build. Under Linux/Unix,
+ now install with ./configure && make && make install.
+
+ Yves Combe <yves at ycombe.net>
+
2006.Sep.22 (https://svn.tux4kids.net/tuxmath/ - revision 27)
Version 0.96
Modified: tuxmath/trunk/src/fileops.c
===================================================================
--- tuxmath/trunk/src/fileops.c 2006-09-22 21:29:50 UTC (rev 29)
+++ tuxmath/trunk/src/fileops.c 2006-09-29 21:44:19 UTC (rev 30)
@@ -26,6 +26,8 @@
*
*/
+#include "../config.h"
+
/* Standard C includes: */
#include <stdio.h>
#include <stdlib.h>
@@ -56,17 +58,23 @@
/* Used by both write_pregame_summary() and */
/* write_postgame_summary() so defined with */
/* file scope: */
+#ifdef BUILD_MINGW32
+#define SUMMARY_EXTENSION ".txt"
+#else
+#define SUMMARY_EXTENSION ""
+#endif
+
static char* summary_filenames[NUM_SUMMARIES] = {
- "summary1",
- "summary2",
- "summary3",
- "summary4",
- "summary5",
- "summary6",
- "summary7",
- "summary8",
- "summary9",
- "summary10"
+ "summary1" SUMMARY_EXTENSION,
+ "summary2" SUMMARY_EXTENSION,
+ "summary3" SUMMARY_EXTENSION,
+ "summary4" SUMMARY_EXTENSION,
+ "summary5" SUMMARY_EXTENSION,
+ "summary6" SUMMARY_EXTENSION,
+ "summary7" SUMMARY_EXTENSION,
+ "summary8" SUMMARY_EXTENSION,
+ "summary9" SUMMARY_EXTENSION,
+ "summary10 SUMMARY_EXTENSION"
};
@@ -74,7 +82,103 @@
static int find_tuxmath_dir(void);
static int str_to_bool(char* val);
+/* fix HOME on windows */
+#ifdef BUILD_MINGW32
+#include <windows.h>
+/* STOLEN in tuxpaint */
+
+/*
+ Removes a single '\' or '/' from end of path
+*/
+static char *remove_slash(char *path)
+{
+ int len = strlen(path);
+
+ if (!len)
+ return path;
+
+ if (path[len-1] == '/' || path[len-1] == '\\')
+ path[len-1] = 0;
+
+ return path;
+}
+
+/*
+ Read access to Windows Registry
+*/
+static HRESULT ReadRegistry(const char *key, const char *option, char *value, int size)
+{
+ LONG res;
+ HKEY hKey = NULL;
+
+ res = RegOpenKeyEx(HKEY_CURRENT_USER, key, 0, KEY_READ, &hKey);
+ if (res != ERROR_SUCCESS)
+ goto err_exit;
+ res = RegQueryValueEx(hKey, option, NULL, NULL, (LPBYTE)value, (LPDWORD)&size);
+ if (res != ERROR_SUCCESS)
+ goto err_exit;
+ res = ERROR_SUCCESS;
+
+err_exit:
+ if (hKey) RegCloseKey(hKey);
+ return HRESULT_FROM_WIN32(res);
+}
+
+
+/*
+ Returns heap string containing default application data path.
+ Creates suffix subdirectory (only one level).
+ E.g. C:\Documents and Settings\jfp\Application Data\suffix
+*/
+char *GetDefaultSaveDir(const char *suffix)
+{
+ char prefix[MAX_PATH];
+ char path[2*MAX_PATH];
+ const char *key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
+ const char *option = "AppData";
+ HRESULT hr = S_OK;
+
+ if (SUCCEEDED(hr = ReadRegistry(key, option, prefix, sizeof(prefix))))
+ {
+ remove_slash(prefix);
+ snprintf(path, sizeof(path), "%s/%s", prefix, suffix);
+ _mkdir(path);
+ return strdup(path);
+ }
+ return strdup("userdata");
+}
+
+
+/* Windows XP: User/App Data/TuxMath/ */
+/* WIndows 98/ME: TuxMath install dir/userdata/Options */
+#define OPTIONS_SUBDIR ""
+#define OPTIONS_FILENAME "options.cfg"
+
+#else
+
+# define get_home getenv("HOME")
+#define OPTIONS_SUBDIR "/.tuxmath"
+#define OPTIONS_FILENAME "options"
+
+#endif
+
+
+/* This functions keep and returns the user data directory application path */
+static char* user_data_dir = NULL;
+
+char *get_user_data_dir ()
+{
+ if (! user_data_dir)
+#ifdef BUILD_MINGW32
+ user_data_dir = GetDefaultSaveDir(PROGRAM_NAME);
+#else
+ user_data_dir = strdup(getenv("HOME"));
+#endif
+
+ return user_data_dir;
+}
+
/* FIXME should have better file path (/etc or /usr/local/etc) and name */
int read_global_config_file(void)
{
@@ -99,8 +203,8 @@
char opt_path[PATH_MAX];
/* find $HOME and tack on file name: */
- strcpy(opt_path, getenv("HOME"));
- strcat(opt_path, "/.tuxmath/options");
+ strcpy(opt_path, get_user_data_dir());
+ strcat(opt_path, OPTIONS_SUBDIR "/" OPTIONS_FILENAME);
#ifdef TUXMATH_DEBUG
printf("\nIn setup() full path to config file is: = %s\n", opt_path);
@@ -240,8 +344,8 @@
/* Look in user's hidden .tuxmath directory */
/* find $HOME and tack on file name: */
- strcpy(opt_path, getenv("HOME"));
- strcat(opt_path, "/.tuxmath/");
+ strcpy(opt_path, get_user_data_dir());
+ strcat(opt_path, OPTIONS_SUBDIR "/");
strcat(opt_path, filename);
#ifdef TUXMATH_DEBUG
@@ -271,7 +375,7 @@
/* Look in user's home directory */
/* find $HOME and tack on file name: */
- strcpy(opt_path, getenv("HOME"));
+ strcpy(opt_path, get_user_data_dir());
strcat(opt_path, "/");
strcat(opt_path, filename);
@@ -906,8 +1010,8 @@
}
/* find $HOME and add rest of path to config file: */
- strcpy(opt_path, getenv("HOME"));
- strcat(opt_path, "/.tuxmath/options");
+ strcpy(opt_path, get_user_data_dir());
+ strcat(opt_path, OPTIONS_SUBDIR "/" OPTIONS_FILENAME);
#ifdef TUXMATH_DEBUG
printf("\nIn write_user_config_file() full path to config file is: = %s\n", opt_path);
@@ -1538,8 +1642,8 @@
/* and leaving summary1 available for current game: */
/* find $HOME and tack on file name: */
- strcpy(filepath1, getenv("HOME"));
- strcat(filepath1, "/.tuxmath/");
+ strcpy(filepath1, get_user_data_dir());
+ strcat(filepath1, OPTIONS_SUBDIR "/");
strcat(filepath1, summary_filenames[NUM_SUMMARIES - 1]);
fp = fopen(filepath1, "r");
@@ -1559,20 +1663,20 @@
for (i = NUM_SUMMARIES - 1; i > 0; i--)
{
/* old filename: */
- strcpy(filepath1, getenv("HOME"));
- strcat(filepath1, "/.tuxmath/");
+ strcpy(filepath1, get_user_data_dir());
+ strcat(filepath1, OPTIONS_SUBDIR "/");
strcat(filepath1, summary_filenames[i - 1]);
/* new filename: */
- strcpy(filepath2, getenv("HOME"));
- strcat(filepath2, "/.tuxmath/");
+ strcpy(filepath2, get_user_data_dir());
+ strcat(filepath2, OPTIONS_SUBDIR "/");
strcat(filepath2, summary_filenames[i]);
/* now change the name: */
rename(filepath1, filepath2);
}
/* summary_filenames[0] (i.e. 'summary1') should now be vacant: */
- strcpy(filepath1, getenv("HOME"));
- strcat(filepath1, "/.tuxmath/");
+ strcpy(filepath1, get_user_data_dir());
+ strcat(filepath1, OPTIONS_SUBDIR "/");
strcat(filepath1, summary_filenames[0]);
fp = fopen(filepath1, "w"); /* "w" means start writing with empty file */
@@ -1604,8 +1708,8 @@
char filepath1[PATH_MAX];
int total_answered;
- strcpy(filepath1, getenv("HOME"));
- strcat(filepath1, "/.tuxmath/");
+ strcpy(filepath1, get_user_data_dir());
+ strcat(filepath1, OPTIONS_SUBDIR "/");
strcat(filepath1, summary_filenames[0]);
fp = fopen(filepath1, "a"); /* "a" means append to end of file */
@@ -1867,14 +1971,14 @@
DIR* dir_ptr;
/* find $HOME */
- strcpy(opt_path, getenv("HOME"));
+ strcpy(opt_path, get_user_data_dir());
#ifdef TUXMATH_DEBUG
printf("\nIn find_tuxmath_dir() home directory is: = %s\n", opt_path);
#endif
/* add rest of path to user's tuxmath dir: */
- strcat(opt_path, "/.tuxmath");
+ strcat(opt_path, OPTIONS_SUBDIR);
#ifdef TUXMATH_DEBUG
printf("\nIn find_tuxmath_dir() tuxmath dir is: = %s\n", opt_path);
@@ -1913,7 +2017,13 @@
printf("\nIn find_tuxmath_dir() - trying to create .tuxmath dir\n");
#endif
+ //status = mkdir(opt_path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+
+#ifndef BUILD_MINGW32
status = mkdir(opt_path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+#else
+ status = mkdir(opt_path);
+#endif
#ifdef TUXMATH_DEBUG
printf("\nIn find_tuxmath_dir() - mkdir returned: %d\n", status);
@@ -1922,7 +2032,7 @@
/* mkdir () returns 0 if successful */
if (0 == status)
{
- fprintf(stderr, "\nfind_tuxmath_dir() - $HOME/.tuxmath created\n");
+ fprintf(stderr, "\nfind_tuxmath_dir() - $HOME" OPTIONS_SUBDIR " created\n");
return 1;
}
else
Modified: tuxmath/trunk/src/setup.c
===================================================================
--- tuxmath/trunk/src/setup.c 2006-09-22 21:29:50 UTC (rev 29)
+++ tuxmath/trunk/src/setup.c 2006-09-29 21:44:19 UTC (rev 30)
@@ -133,6 +133,7 @@
/* can still proceed using hard-coded defaults. */
}
}
+
}
Modified: tuxmath/trunk/src/tuxmath.h
===================================================================
--- tuxmath/trunk/src/tuxmath.h 2006-09-22 21:29:50 UTC (rev 29)
+++ tuxmath/trunk/src/tuxmath.h 2006-09-29 21:44:19 UTC (rev 30)
@@ -32,7 +32,7 @@
//#define TUXMATH_DEBUG /* for conditional compilation of debugging output */
//#define FEEDBACK_DEBUG /* for Tim's feedback speed control code */
-#define TUXMATH_VERSION 0.96
+#define TUXMATH_VERSION 0.97
#define PATH_MAX 4096
More information about the Tux4kids-commits
mailing list