*.o
.deps
.dirstamp
+/INSTALL
/Makefile
/Makefile.in
/aclocal.m4
/configure
/depcomp
/install-sh
+/lib
/libtool
/ltmain.sh
/missing
[submodule "common"]
path = common
url = https://git.draconx.ca/dxcommon.git
+[submodule "gnulib"]
+ path = gnulib
+ url = https://git.savannah.gnu.org/git/gnulib.git
EXTRA_DIST =
EXTRA_LIBRARIES =
MAINTAINERCLEANFILES =
+MOSTLYCLEANFILES =
DISTCLEANFILES =
CLEANFILES = $(EXTRA_LIBRARIES)
-AM_CPPFLAGS = -I$(builddir)/src -I$(srcdir)/src -I$(DX_BASEDIR)/src
+AM_CPPFLAGS = -I$(builddir)/src -I$(srcdir)/src -I$(DX_BASEDIR)/src \
+ -I$(builddir)/lib -I$(srcdir)/lib
AM_CFLAGS = $(MOTIF_CFLAGS)
bin_PROGRAMS = rrace-motif
rrace_motif_SOURCES = src/game.c src/x11.c
rrace_motif_LDADD = $(libmotifmain_a_OBJECTS) $(libmotifui_a_OBJECTS) \
- $(libglohelp_a_OBJECTS) $(MOTIF_LIBS)
+ $(libglohelp_a_OBJECTS) libgnu.a $(MOTIF_LIBS)
+$(rrace_motif_OBJECTS): $(gnulib_headers)
EXTRA_LIBRARIES += libmotifmain.a
libmotifmain_a_SOURCES = src/motif.c
+$(libmotifmain_a_OBJECTS): $(gnulib_headers)
$(libmotifmain_a_OBJECTS): src/motifopt.h
EXTRA_LIBRARIES += libmotifui.a
libmotifui_a_SOURCES = src/motif_ui.c
+$(libmotifui_a_OBJECTS): $(gnulib_headers)
$(libmotifui_a_OBJECTS): src/motifgui.h src/motifstr.h
EXTRA_LIBRARIES += libglohelp.a
libglohelp_a_SOURCES = common/src/help.c
libglohelp_a_CFLAGS = -DHELP_GETOPT_LONG_ONLY
+$(libglohelp_a_OBJECTS): $(gnulib_headers)
libglohelp_a_SHORTNAME = glo
OPTFILES = src/motifopt.opt
check_PROGRAMS = t/boardmove t/rng-test
-t_boardmove_LDADD = src/game.$(OBJEXT)
+t_boardmove_LDADD = src/game.$(OBJEXT) libgnu.a
+$(t_boardmove_OBJECTS): $(gnulib_headers)
+include $(top_srcdir)/lib/gnulib.mk
include $(top_srcdir)/common/snippet/autotest.mk
--- /dev/null
+#!/bin/sh
+#
+# Copyright © 2011-2012, 2015, 2021-2022 Nick Bowler
+#
+# Simple script to get started from a fresh git checkout.
+#
+# License WTFPL2: Do What The Fuck You Want To Public License, version 2.
+# This is free software: you are free to do what the fuck you want to.
+# There is NO WARRANTY, to the extent permitted by law.
+
+scriptname=$0
+
+err() { printf '%s: %s\n' "$scriptname" "$*" 1>&2; }
+die() { err "$@"; exit 1; }
+
+: ${AUTORECONF=autoreconf}
+: ${AUTOMAKE=automake}
+: ${GNULIB=gnulib}
+: ${GIT=git}
+: ${PERL=perl}
+
+$GIT submodule update --init || err "Failed to update submodules from git."
+
+if test -x $GNULIB/gnulib-tool; then
+ $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib."
+else
+ err "Gnulib sources are not properly installed in $GNULIB/"
+ cat >&2 <<'EOF'
+
+To bootstrap this package using an external Gnulib, you can set the GNULIB
+environment variable to indicate the location of the Gnulib sources.
+EOF
+
+ test ! -f configure || cat >&2 <<'EOF'
+
+However, it seems this package is already bootstrapped. It should not
+normally be necessary to run this script from a release tarball.
+EOF
+ exit 1
+fi
+
+$PERL common/scripts/fix-gnulib.pl -o lib/gnulib.mk -i lib/gnulib.mk.in \
+ || die "Failed to fixup Gnulib makefile fragment."
+
+# Rewrite if ! ... construts produced by gnulib conditional dependencies
+# as these fail in heirloom-sh.
+sed 's/if ! *\(.*gnulib_enabled[^;]*\); then/if \1; then :; else/' \
+ m4/gnulib-comp.m4 >m4/gnulib-comp.m4.new || exit
+mv -f m4/gnulib-comp.m4.new m4/gnulib-comp.m4 || exit
+
+# Punt some automake-generated files so that Gentoo's wrapper script doesn't
+# try to detect the automake version in use.
+rm -f Makefile.in aclocal.m4
+$AUTORECONF -fis || exit
+
+amdir=`$AUTOMAKE --print-libdir`
+if test -f "$amdir/INSTALL"; then
+ ln -sf "$amdir/INSTALL" INSTALL
+fi
dnl This is free software: you are free to do what the fuck you want to.
dnl There is NO WARRANTY, to the extent permitted by law.
+dnl remove pointless gnulib warning flag check
+AC_DEFUN([gl_CC_GNULIB_WARNINGS])
+
AC_INIT([rrace], [0], [nbowler@draconx.ca])
AC_CONFIG_HEADERS([config.h])
DX_AUTOMAKE_COMPAT
AC_PROG_CC_C99
+gl_EARLY
LT_INIT
+gl_INIT
+
+AC_CACHE_SAVE
+m4_include([lib/gnulib.mk])
AC_PATH_XTRA
AS_IF([test x"$no_x" != x"yes"],
--- /dev/null
+Subproject commit 8c4f4d7a3c28f88b64fce2fb1d0dc0e570d1a482
+/00gnulib.m4
+/absolute-header.m4
+/extensions.m4
+/extern-inline.m4
+/getopt.m4
+/gnulib-common.m4
+/gnulib-comp.m4
+/gnulib-tool.m4
+/include_next.m4
+/inline.m4
/libtool.m4
/ltoptions.m4
/ltsugar.m4
/ltversion.m4
/lt~obsolete.m4
+/nocrash.m4
+/off_t.m4
+/pid_t.m4
+/ssize_t.m4
+/stddef_h.m4
+/sys_types_h.m4
+/unistd_h.m4
+/vararrays.m4
+/warn-on-use.m4
+/wchar_t.m4
+/zzgnulib.m4
--- /dev/null
+# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file 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
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the specification of how gnulib-tool is used.
+# It acts as a cache: It is written and read by gnulib-tool.
+# In projects that use version control, this file is meant to be put under
+# version control, like the configure.ac and various Makefile.am files.
+
+
+# Specification in the form of a command-line invocation:
+# gnulib-tool --import \
+# --lib=libgnu \
+# --source-base=lib \
+# --m4-base=m4 \
+# --doc-base=doc \
+# --tests-base=tests \
+# --aux-dir=. \
+# --makefile-name=gnulib.mk.in \
+# --conditional-dependencies \
+# --no-libtool \
+# --macro-prefix=gl \
+# --no-vc-files \
+# getopt-gnu \
+# inline
+
+# Specification in the form of a few gnulib-tool.m4 macro invocations:
+gl_LOCAL_DIR([])
+gl_MODULES([
+ getopt-gnu
+ inline
+])
+gl_AVOID([])
+gl_SOURCE_BASE([lib])
+gl_M4_BASE([m4])
+gl_PO_BASE([])
+gl_DOC_BASE([doc])
+gl_TESTS_BASE([tests])
+gl_LIB([libgnu])
+gl_MAKEFILE_NAME([gnulib.mk.in])
+gl_CONDITIONAL_DEPENDENCIES
+gl_MACRO_PREFIX([gl])
+gl_PO_DOMAIN([])
+gl_WITNESS_C_MACRO([])
+gl_VC_FILES([false])