Hello Ralf, On 9/27/09, Ralf Wildenhues <ralf.wildenh...@gmx.de> wrote: > Hi David, > > * David Bruce wrote on Sat, Sep 26, 2009 at 04:51:01AM CEST: >> My project is not creating valid tarballs with "make dist", and "make >> distcheck" fails at the VPATH build stage. > > Please post your Makefile.am files in toplevel and src. We might also > need to see your configure.ac file.
Thanks so much - here are the files, pasted inline. (I'm assuming the mailing list would prefer not to have file attachments). Again, thanks for any help. I assure you that I have tried pretty hard to straighten this out on my own. David Bruce 1. toplevel Makefile.am: ## Top-level Makefile.am for tuxmath: ## Process with Automake to create Makefile.in ## --------------------------------------------------------------------------- ## Variables: ---------------------------------------------------------------- ## --------------------------------------------------------------------------- SUBDIRS = data \ doc \ intl \ linebreak \ po \ src ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = tuxmath.spec \ tuxmath.desktop \ config.rpath \ m4/ChangeLog \ Info.plist \ CMakeLists.txt datadir = @datadir@ localedir = $(datadir)/locale ## These are defined in configure.ac: makens...@nsis@ nsis_fou...@nsis_found@ nsi_install_d...@nsi_install_dir@ nsi_dll_d...@nsi_dll_dir@ NSI_TEMP_INSTALL_DIR=$(abs_top_builddir)/_instw32 ## --------------------------------------------------------------------------- ## Rules: -------------------------------------------------------------------- ## --------------------------------------------------------------------------- ## Bundle in fonts for distribution tar.gz to be used without package manager: ## i.e. to make tarball to post for individual download. ## ## for tarball with fonts: use 'make dist_with_fonts' (for *tar.gz) ## or 'make dist_with_fonts_bzip2 (for *tar.bzip2) ## for tarball without fonts: (e.g. for Debian packaging) - use 'make distcheck' ## ## (thanks to Ralf Wildenhues <ralf.wildenh...@gmx.de> for automake help!) ## 'dist_fonts' is in EXTRA_DATA but is empty by default. With this target, ## 'dist_fonts' gets set to a list of the font files in data/fonts before making ## 'dist', causing the fonts to be included in the tar.gz. ## 'data_fonts' should contain all of the fonts in data/fonts. It needs to go ## in this Makefile.am before the 'dist_with_fonts' target for that target ## to work - if it is in data/fonts/Makefile.am, it does not get expanded ## before the 'dist' target starts: data_fonts='AndikaDesRevG.ttf' dist_with_fonts: $(MAKE) $(AM_MAKEFLAGS) distdir=$(PACKAGE)_w_fonts-$(VERSION) \ dist_fonts=$(data_fonts) dist dist_with_fonts_bzip2: $(MAKE) $(AM_MAKEFLAGS) distdir=$(PACKAGE)_w_fonts-$(VERSION) \ dist_fonts=$(data_fonts) dist-bzip2 ## For building the NSIS executable Win32 installer - this rule first ## does a "make install" into NSI_TEMP_INSTALL_DIR, which results in ## a local copy of the complete unix-style install. ## Subsequent commands then copy the needed files into NSI_INSTALL_DIR, ## which has the exact directory structure of the self-contained ## 'TuxMath' folder that gets installed onto the Windows machine. install-nsi-local: all ## create NSI_TEMP_INSTALL_DIR and install to that location: $(INSTALL) -d $(NSI_TEMP_INSTALL_DIR) $(MAKE) $(AM_MAKEFLAGS) DESTDIR=$(NSI_TEMP_INSTALL_DIR) install ## create NSI_INSTALL_DIR/data dir and copy data files to that location: $(INSTALL) -d $(top_builddir)/$(NSI_INSTALL_DIR)/data; (cd $(NSI_TEMP_INSTALL_DIR)/$(pkgdatadir); \ tar cf - * ) \ | ( cd $(top_builddir)/$(NSI_INSTALL_DIR)/data; \ tar xf -) ## create NSI_INSTALL_DIR/doc dir and copy docs to that location: $(INSTALL) -d $(top_builddir)/$(NSI_INSTALL_DIR)/doc; (cd $(NSI_TEMP_INSTALL_DIR)/$(docdir); \ tar cf - * ) \ | ( cd $(top_builddir)/$(NSI_INSTALL_DIR)/doc; \ tar xf -) ## create NSI_INSTALL_DIR/locale dir and copy locales to that location: $(INSTALL) -d $(top_builddir)/$(NSI_INSTALL_DIR)/locale; (cd $(NSI_TEMP_INSTALL_DIR)/$(localedir); \ tar cf - * ) \ | ( cd $(top_builddir)/$(NSI_INSTALL_DIR)/locale; \ tar xf -) ## copy executable into NSI_INSTALL_DIR: (cd $(NSI_TEMP_INSTALL_DIR)/$(bindir); \ mv *TuxMath.exe TuxMath.exe; \ tar cf - TuxMath.exe ) \ | ( cd $(top_builddir)/$(NSI_INSTALL_DIR); \ tar xf -) ## Done with NSI_TEMP_INSTALL_DIR so uninstall: $(MAKE) $(AM_MAKEFLAGS) DESTDIR=$(NSI_TEMP_INSTALL_DIR) uninstall rm -rf $(NSI_TEMP_INSTALL_DIR) ## copy needed dll files into NSI_INSTALL_DIR: -cp $(NSI_DLL_DIR)/*.dll $(top_builddir)/$(NSI_INSTALL_DIR); install-nsi-am: install-nsi-local nsis: if test "x$(MAKENSIS)" = "x"; then \ echo "\nError - makensis program not found!"; \ echo "It is needed to build the NSIS executable installer for Windows."; \ echo "Install it from your distribution's repository, or" ; \ echo "download it from: http://nsis.sourceforge.net/Download\n"; \ else \ $(MAKE) $(AM_MAKEFLAGS) install-nsi-local; \ $(MAKENSIS) -NOCD nsis/tuxmath.nsi; \ fi clean-local: @$(NORMAL_CLEAN) if test -d $(NSI_INSTALL_DIR); then \ rm -fr $(NSI_INSTALL_DIR); \ fi if test -e tuxma...@version@-win32-installer.exe; then \ rm tuxma...@version@-win32-installer.exe; \ fi .PHONY: nsis (end of toplevel Makefile.am) 2. src/Makefile.am: ## Makefile.am for tuxmath src: ## Process with Automake to create Makefile.in # Support for gettext: datadir = @datadir@ localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ AM_CFLAGS=-Wall -g -DDATA_PREFIX=\"${DATA_PREFIX}\" -DDEBUG \ -D$(SOUND)SOUND AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" \ -I../intl -I$(top_srcdir)/intl LDADD = @LIBINTL@ \ ../linebreak/liblinebreak.a if BUILD_MINGW32 bin_PROGRAMS = TuxMath tuxmathserver data_pref...@mingw32_package_data_dir@ else TUXMATHRC = bin_PROGRAMS = tuxmath \ tuxmathadmin \ generate_lesson \ tuxmathserver DATA_PREFIX=${pkgdatadir} endif tuxmath_SOURCES = tuxmath.c \ setup.c \ titlescreen.c \ menu.c \ game.c \ factoroids.c \ fileops_media.c \ options.c \ credits.c \ highscore.c \ linewrap.c \ loaders.c \ audio.c \ network.c \ mathcards.c \ campaign.c \ multiplayer.c \ fileops.c \ convert_utf.c \ SDL_extras.c \ SDL_rotozoom.c \ lessons.c \ scandir.c \ pixels.c \ server.c \ throttle.c # HACK "TuxMath" is the Windows program, whereas "tuxmath" is the Unix program TuxMath_SOURCES = $(tuxmath_SOURCES) tuxmathrc.rc tuxmathadmin_SOURCES = tuxmathadmin.c generate_lesson_SOURCES = generate_lesson.c \ mathcards.c \ options.c \ fileops.c \ lessons.c tuxmathserver_SOURCES = servermain.c \ server.c \ mathcards.c \ throttle.c \ . options.c EXTRA_DIST = credits.h \ factoroids.h \ fileops.h \ game.h \ menu.h \ globals.h \ highscore.h \ linewrap.h \ loaders.h \ network.h \ titlescreen.h \ menu.h \ options.h \ setup.h \ mathcards.h \ campaign.h \ multiplayer.h \ tuxmath.h \ convert_utf.h \ SDL_extras.h \ SDL_rotozoom.h \ lessons.h \ gettext.h \ scandir.h \ pixels.h \ compiler.h \ server.h \ transtruct.h \ throttle.h windr...@windres@ # How to make an RC file tuxmathrc.o: tuxmathrc.rc $(WINDRES) -i $< -o $@ (end of src/Makefile.am) 3. configure.ac: # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT([Tux Of Math Command],[1.7.3],[tuxmath-de...@lists.sourceforge.net],[tuxmath]) AC_PREREQ(2.61) AC_CANONICAL_HOST AC_CANONICAL_BUILD AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(foreign) AC_CONFIG_SRCDIR([src/tuxmath.c]) AC_CONFIG_HEADERS([config.h]) NAME_VERSION=$PACKAGE-$VERSION AC_DEFINE_UNQUOTED([PROGRAM_NAME], "$PACKAGE", [Tux Of Math Command]) AC_SUBST(NAME_VERSION) # Needed for gettext: AC_GNU_SOURCE AM_GNU_GETTEXT_VERSION([0.17]) #AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT AM_GNU_GETTEXT_INTL_SUBDIR # ---------------------------------------------------------------------- # Checks for programs. # ---------------------------------------------------------------------- AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_AWK AC_PROG_CPP AC_PROG_MKDIR_P AC_PROG_RANLIB AC_PROG_YACC # ----------------------------------------------------------------------- # Checks for libraries. # ----------------------------------------------------------------------- # Check for SDL SDL_VERSION=1.2.0 AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([SDL version $SDL_VERSION not found! http://www.libsdl.org]) ) CFLAGS="$CFLAGS $SDL_CFLAGS" # Check platform - see if WinMain needed: AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) native_win32=yes ;; *) native_win32=no ;; esac AC_MSG_RESULT([$native_win32]) AM_CONDITIONAL(BUILD_MINGW32, test $native_win32 = yes) if test $native_win32 = yes; then LIBS="$LIBS -lmingw32 -lSDLmain -lSDL" else LIBS="$LIBS $SDL_LIBS" fi dnl Check for SDL_image: AC_CHECK_LIB([SDL_image], [IMG_Load], , [AC_MSG_ERROR([SDL_image not found! http://www.libsdl.org/projects/SDL_image])]) dnl Check for SDL_mixer:. AC_CHECK_LIB([SDL_mixer], [Mix_OpenAudio], , [AC_MSG_ERROR([SDL_mixer not found! http://www.libsdl.org/projects/SDL_mixer])]) dnl SDL_Net is enabled by default dnl unless SDL_net is disabled at configure time. AC_ARG_WITH([sdlnet], [AS_HELP_STRING([--without-sdlnet],[don't use SDL_Net even if available])], [with_sdlnet=no], [with_sdlnet=yes]) if test "x$with_sdlnet" != xno; then AC_CHECK_LIB([SDL_net], [SDLNet_Init], , [with_sdlnet=no; AC_MSG_FAILURE([SDL_Net test failed (--without-sdlnet to disable LAN support)])]) fi dnl SDL_Pango is enabled by default. dnl If SDL_Pango disabled at configure time, or if we can't find it, dnl we look for SDL_ttf: AC_ARG_WITH([sdlpango], [AS_HELP_STRING([--without-sdlpango],[don't use SDL_Pango even if available])], [with_sdlpango=no], [with_sdlpango=yes]) if test "x$with_sdlpango" != xno; then AC_CHECK_LIB([SDL_Pango], [SDLPango_Init], , [with_sdlpango=no; AC_MSG_FAILURE([SDL_Pango test failed (--without-sdlpango to disable)])]) fi if [test "x$with_sdlpango" = xno]; then AC_CHECK_LIB([SDL_ttf], [TTF_Init], , [AC_MSG_ERROR([SDL_ttf not found! http://www.libsdl.org/projects/SDL_ttf])]) fi dnl Check for libRSVG and cairo. SVG support is enabled by default AC_ARG_WITH([rsvg], [AS_HELP_STRING([--without-rsvg],[don't use libRSVG even if available])], [with_rsvg=no], [with_rsvg=yes]) if test "x$with_rsvg" = xyes; then RSVG_CFLAGS="" RSVG_LIBS="" PKG_CHECK_MODULES([RSVG], [librsvg-2.0 >= 2.18], , [AC_MSG_FAILURE([libRSVG test failed (--without-rsvg to disable svg support)])]) CFLAGS="$CFLAGS $RSVG_CFLAGS" LIBS="$LIBS $RSVG_LIBS" fi if test "x$with_rsvg" = xyes; then CAIRO_CFLAGS="" CAIRO_LIBS="" PKG_CHECK_MODULES([CAIRO], [cairo >= 1.4.10], , [AC_MSG_FAILURE([cairo test failed (--without-rsvg to disable svg support)])]) CFLAGS="$CFLAGS $CAIRO_CFLAGS" LIBS="$LIBS $CAIRO_LIBS" AC_DEFINE([HAVE_RSVG],[1],[Define to 1 if you have the `libRSVG` library]) fi if test "x$with_rsvg" = xyes; then CAIRO_CFLAGS="" CAIRO_LIBS="" PKG_CHECK_MODULES([CAIRO], [cairo >= 1.4.10], , [AC_MSG_FAILURE([cairo test failed (--without-rsvg to disable svg support)])]) CFLAGS="$CFLAGS $CAIRO_CFLAGS" LIBS="$LIBS $CAIRO_LIBS" AC_DEFINE([HAVE_RSVG],[1],[Define to 1 if you have the `libRSVG` library]) fi dnl Check for (somewhat) higher-level math functions - needed for SDL_extras dnl AC_CHECK_LIB([m], dnl [csin], dnl , dnl [AC_MSG_ERROR([Math library not found - functions in <math.h> may not be available.])]) # -------------------------------------------------------------------------------------- # Checks for header files. # -------------------------------------------------------------------------------------- AC_FUNC_ALLOCA AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([argz.h error.h errno.h fcntl.h float.h iconv.h inttypes.h langinfo.h libgen.h libintl.h limits.h locale.h malloc.h math.h pthread.h stddef.h stdint.h stdio_ext.h stdlib.h string.h strings.h sys/param.h unistd.h wchar.h]) # -------------------------------------------------------------------------------------------- # Checks for typedefs, structures, and compiler characteristics. # -------------------------------------------------------------------------------------------- AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_C_RESTRICT AC_TYPE_MODE_T AC_TYPE_SIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT8_T AC_C_VOLATILE AC_CHECK_TYPES([ptrdiff_t]) # ------------------------------------------------------------------------------------------- # Checks for library functions. # ------------------------------------------------------------------------------------------- AC_FUNC_CLOSEDIR_VOID AC_FUNC_ERROR_AT_LINE #AC_FUNC_MALLOC AC_FUNC_MMAP #AC_FUNC_REALLOC AC_FUNC_STAT AC_FUNC_STRCOLL AC_FUNC_STRTOD AC_FUNC_VPRINTF AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify atexit basename bcopy floor getcwd localeconv localtime_r memmove mempcpy memset mkdir munmap nl_langinfo scandir setlocale sqrt stpcpy strcasecmp strchr strcspn strdup strncasecmp strndup strrchr strstr strtoul]) # Set the MINGW32_PACKAGE_DATA_DIR="data" AC_SUBST(MINGW32_PACKAGE_DATA_DIR) #AM_CONDITIONAL(BUILD_MINGW32, test "$native_win32" = yes) if test $native_win32 = yes; then AC_DEFINE([BUILD_MINGW32], 1,[Native MinGW32 build]) CFLAGS="$CFLAGS -D__GW32__" LIBS="$LIBS -luuid -lole32 -lwsock32 -mwindows" CPPFLAGS="$CPPFLAGS -idirafter $prefix/include/glibc" AC_PATH_PROG(WINDRES, "$target_alias-windres", no, [$PATH]) fi # ------------------------------------------------------------ # Support for building NSIS Win32 installer: # ------------------------------------------------------------ # This is the temporary DESTDIR target into which we do a "make install" before # the files get copied into the NSIS installer: NSI_INSTALL_DIR=mingw32 AC_SUBST(NSI_INSTALL_DIR) # This is the path (relative to the TuxMath.exe binary) where the data files are # placed within the TuxMath folder on the user's Windows machine: MINGW32_PACKAGE_DATA_DIR="data" AC_SUBST(MINGW32_PACKAGE_DATA_DIR) NSI_DLL_DIR=~/tuxmath_dll AC_ARG_WITH([dll-directory], AS_HELP_STRING([--with-dll-directory=path], [set the path where dll for TuxMath are [$(NSI_DLL_DIR)]]), [dll_path=$withval], [dll_path=no]) AM_CONDITIONAL(NSI_BUILD, test $dll_path = no) if test $dll_path != no; then NSI_DLL_DIR=$dll_path fi AC_SUBST(NSI_DLL_DIR) AC_PATH_PROG(NSIS, makensis, [], [$PATH]) # --------------------------------------------------------------- # Create Makefiles # --------------------------------------------------------------- AC_CONFIG_FILES([ Makefile tuxmath.spec tuxmath_preview.spec data/Makefile data/fonts/Makefile data/images/Makefile data/images/backgrounds/Makefile data/images/cities/Makefile data/images/comets/Makefile data/images/icons/Makefile data/images/igloos/Makefile data/images/penguins/Makefile data/images/sprites/Makefile data/images/status/Makefile data/images/title/Makefile data/images/tux/Makefile data/images/factoroids/Makefile data/menus/Makefile data/missions/Makefile data/missions/arcade/Makefile data/missions/campaign/Makefile data/missions/campaign/ace/Makefile data/missions/campaign/cadet/Makefile data/missions/campaign/commando/Makefile data/missions/campaign/ranger/Makefile data/missions/campaign/scout/Makefile data/missions/lessons/Makefile data/missions/multiplay/Makefile data/sounds/Makefile doc/Makefile nsis/tuxmath.nsi nsis/tuxmath_with_conf.nsi src/Makefile intl/Makefile linebreak/Makefile po/Makefile.in ]) AC_OUTPUT