Commit 56ca0383 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Only keep the main program

parent 37a44fb8
Pipeline #115915 failed with stages
in 6 minutes and 35 seconds
......@@ -2,7 +2,6 @@ image: debian:latest
stages:
- dist
- check
- manual
dist:
......@@ -14,11 +13,6 @@ dist:
- dist
expire_in: 1 week
check:
stage: check
image: tarotbis/check:latest
script: "./ci/check.sh"
pages:
stage: manual
image: tarotbis/doc:latest
......
......@@ -16,7 +16,7 @@
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
SUBDIRS = po lib-library lib-program
SUBDIRS = po lib
if NEED_LIBOPTS
SUBDIRS += $(LIBOPTS_DIR)
......@@ -24,10 +24,10 @@ endif
include defaults.am
ACLOCAL_AMFLAGS = -I m4 -I lib-library/m4 -I lib-program/m4
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects
dist_pkgdata_DATA += COPYING
EXTRA_DIST += lib-library/m4/gnulib-cache.m4 po/Rules-html
EXTRA_DIST += m4/gnulib-cache.m4 po/Rules-html
include desktop.am
include version-gen.am
......@@ -42,15 +42,14 @@ include doc/Makefile.am
include src/Makefile.am
include games/Makefile.am
include icon/Makefile.am
include blog/Makefile.am
include gnulib.am
include blog/Makefile.am
AM_CPPFLAGS += \
-DLOCALEDIR="\"$(localedir)\"" \
-DSYSCONFDIR="\"$(sysconfdir)\"" \
-DABS_TOP_SRCDIR="\"$(abs_top_srcdir)\"" \
-I. -I$(srcdir) \
-Ilib-library -I$(srcdir)/lib-library \
-Ilib-program -I$(srcdir)/lib-program \
-Ilib -I$(srcdir)/lib \
-DLIBTAROT_VERSION_INFO="\"$(LIBTOOL_CURRENT):$(LIBTOOL_REVISION):$(LIBTOOL_AGE)\""
AM_YFLAGS = -d
......@@ -22,23 +22,13 @@
touch AUTHORS || exit 1
touch README || exit 1
gnulib-tool --libtool \
--lib=libgnulibrary \
--source-base=lib-library \
--m4-base=lib-library/m4 \
--macro-prefix=gl_lib \
--import assert stdalign xalloc || exit 1
gnulib-tool --libtool \
--lib=libgnuprogram \
--source-base=lib-program \
--m4-base=lib-program/m4 \
--macro-prefix=gl_program \
--import assert git-version-gen getopt-gnu gitlog-to-changelog setenv xalloc readline \
setlocale || exit 1
./gitlog-to-changelog > ChangeLog
rm -rf libopts libopts-* || exit 1
gunzip -c `autoopts-config libsrc` | tar -xvf - || exit 1
mv -f libopts-*.*.* libopts || exit 1
cp -fp libopts/m4/*.m4 lib-program/m4/. || exit 1
cp -fp libopts/m4/*.m4 m4/. || exit 1
touch README || exit 1
autoreconf -vif || exit 1
rm doc/tarot.texi || exit 1
......
......@@ -18,5 +18,4 @@
EXTRA_DIST += \
%reldir%/dist.sh \
%reldir%/pages.sh \
%reldir%/check.sh
%reldir%/pages.sh
#!/bin/sh
VERSION=$(cat dist/version)
cp dist/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
mkdir build || exit 1
cd build/
../tarot-$VERSION/configure \
--enable-silent-rules=yes \
--enable-valgrind=yes \
--without-cairo \
--without-gtk \
|| (cat config.log; exit 1)
make -j 16 check || exit 1
make distclean || exit 1
......@@ -29,8 +29,7 @@ sh autogen.sh VALAFLAGS="--target-glib=2.50" || exit 1
--enable-silent-rules=yes \
|| (cat config.log ; exit 1) \
|| exit 1
(cd lib-library && make -j 16 CFLAGS="-Wno-error -g $CFLAGS") || exit 1
(cd lib-program && make -j 16 CFLAGS="-Wno-error -g $CFLAGS") || exit 1
(cd lib && make -j 16 CFLAGS="-Wno-error -g $CFLAGS") || exit 1
make -j 16 distcheck || exit 1
make -j 8 check || exit 1
make -j 16 install install-html || exit 1
......@@ -75,7 +74,7 @@ do
echo "Ignoring embedded file $source, as it is not ours.";;
./.tarball-version)
echo "Ignoring .tarball-version.";;
./lib-library/* | ./lib-program/* | ./snippet/*)
./lib/* | ./snippet/*)
echo "Ignoring $source, some gnulib stuff.";;
./m4/*)
echo "Ignoring autoconf macro $source.";;
......
......@@ -2,36 +2,25 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([tarot],
m4_esyscmd([./get-version.sh package]),
AC_INIT([tarot-tools],
m4_esyscmd([./git-version-gen .tarball-version]),
[vivien@planete-kraus.eu])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4 lib-library/m4 lib-program/m4])
AC_SUBST([VERSION_MAJOR], m4_esyscmd([./get-version.sh package | cut -d '.' -f 1]))
AC_SUBST([VERSION_MINOR], m4_esyscmd([./get-version.sh package | cut -d '.' -f 2]))
AC_SUBST([VERSION_PATCH], m4_esyscmd([./get-version.sh package | cut -d '.' -f 3]))
AC_SUBST([VERSION_ADDITIONAL], m4_esyscmd([./get-version.sh package | tail -c +$(./get-version.sh package | cut -d '.' -f 1-3 | wc -c)]))
AC_SUBST([LIBTOOL_CURRENT], m4_esyscmd([./get-version.sh libtool | cut -d ':' -f 1]))
AC_SUBST([LIBTOOL_REVISION], m4_esyscmd([./get-version.sh libtool | cut -d ':' -f 2]))
AC_SUBST([LIBTOOL_AGE], m4_esyscmd([./get-version.sh libtool | cut -d ':' -f 3]))
AC_ARG_ENABLE([runtime-prefix], AS_HELP_STRING([--enable-runtime-prefix=ENV],
[At runtime, prepend the value of the environment variable ENV to the installation prefix. This is useful to make the package relocatable. If ENV is empty or 'no', this is disabled.]))
AC_DEFINE_UNQUOTED([RUNTIME_PREFIX_ENV], "$enable_runtime_prefix", [Environment variable to look up the installation prefix])
AC_CONFIG_MACRO_DIRS([m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_STDC
gl_lib_EARLY
gl_program_EARLY
gl_EARLY
AM_INIT_AUTOMAKE
AM_PROG_AR
LT_INIT
AM_MISSING_PROG([GPERF], [gperf])
AM_MISSING_PROG([INDENT], [indent])
AM_MISSING_PROG([EMACS], [emacs])
AM_MISSING_PROG([AUTOGEN], [autogen])
AM_MISSING_PROG([BISON], [bison])
AC_ARG_ENABLE([valgrind], AS_HELP_STRING([--enable-valgrind=yes],
[Run the unit tests under valgrind (slow, incompatible with asan)]))
AS_IF([test "x$enable_valgrind" = "xyes"], [
......@@ -44,20 +33,12 @@ AS_IF([test "x$enable_valgrind" = "xyes"], [
])
])
AM_CONDITIONAL([HAVE_VALGRIND], [test "x$HAVE_VALGRIND" = "xyes"])
AC_PROG_LEX
AC_PROG_YACC
AM_MISSING_PROG([XSLTPROC], [xsltproc])
AM_MISSING_PROG([XMLLINT], [xmllint])
AM_MISSING_PROG([CONVERT], [convert])
PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.0], [glib_mkenums])
AM_PROG_VALAC
AC_ARG_VAR([VALAFLAGS], [Additional flags to pass to the vala compiler])
AM_MISSING_PROG([VAPIGEN], [vapigen])
AM_MISSING_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
AM_MISSING_PROG([FLATPAK_BUILDER], [flatpak-builder])
AC_ARG_VAR([FLATPAK_BUILDER_FLAGS], [Additional flags to pass to flatpak-builder (key, repo, ...)])
AM_MISSING_PROG([G_IR_SCANNER], [g-ir-scanner])
AM_MISSING_PROG([G_IR_COMPILER], [g-ir-compiler])
AC_ARG_ENABLE([renderer], AS_HELP_STRING([--enable-renderer=yes],
[We are able to run the cairo renderer. You should need this option only if you modify maintainer files.]))
AM_CONDITIONAL([ENABLE_RENDERER], [test "x$enable_renderer" = "xyes"])
......@@ -72,34 +53,17 @@ PKG_INSTALLDIR
AM_MISSING_PROG([FDP], [fdp])
# Checks for libraries.
gl_lib_INIT
gl_program_INIT
gl_INIT
AX_LIB_NETTLE([yes])
PKG_CHECK_MODULES([XML], [libxml-2.0])
PKG_CHECK_MODULES([LIBTAROT], [libtarot-gobject])
LIBOPTS_CHECK
AC_ARG_WITH([gobject], AS_HELP_STRING([--without-gobject], [Do not build the GObject bindings]))
WITH_GOBJECT="no"
AS_IF([test "x$with_gobject" != "xno"], [
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0], [
WITH_GOBJECT="yes"
], [
AC_MSG_ERROR([GObject was not found. Please use --without-gobject.])
])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0],, [
AC_MSG_ERROR([GObject was not found.])
])
AM_CONDITIONAL([WITH_GOBJECT], [test "x$WITH_GOBJECT" != "xno"])
AC_ARG_WITH([cairo], AS_HELP_STRING([--without-cairo], [Do not build the Cairo bindings]))
WITH_CAIRO="no"
AS_IF([test "x$with_cairo" != "xno"], [
PKG_CHECK_MODULES([CAIRO], [cairo cairo-png], [
WITH_CAIRO="yes"
], [
AC_MSG_ERROR([Cairo was not found. Please use --without-cairo.])
])
PKG_CHECK_MODULES([CAIRO], [cairo cairo-png],, [
AC_MSG_ERROR([GObject was not found.])
])
AM_CONDITIONAL([WITH_CAIRO], [test "x$WITH_CAIRO" != "xno"])
AC_SEARCH_LIBS([atan2], [m])
AC_SEARCH_LIBS([sin], [m])
AC_SEARCH_LIBS([cos], [m])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$PACKAGE", [This needs to be defined in config.h manually...])
......@@ -117,15 +81,9 @@ AC_C_INLINE
# Checks for library functions.
AC_SEARCH_LIBS([add_history], [history])
AC_DEFINE([FIRST_LINE], [1], [First line of a file, for the lexer])
AC_DEFINE([FIRST_COLUMN], [1], [First column in a line, for the lexer])
AC_DEFINE([TAB_WIDTH], [8], [Number of columns in a tab])
AC_CONFIG_FILES([ po/Makefile.in
Makefile
lib-library/Makefile
lib-program/Makefile
src/libtarot.pc
lib/Makefile
])
AC_CONFIG_FILES([
pre-inst-env
......
......@@ -71,7 +71,6 @@ AM_DISTCHECK_CONFIGURE_FLAGS =
AM_CPPFLAGS =
AM_CFLAGS =
AM_LIBS =
AM_LDADD =
AM_VALAFLAGS =
AM_MAKEINFOHTMLFLAGS =
TESTS =
......
......@@ -17,7 +17,4 @@
# <http://www.gnu.org/licenses/>.
AM_DISTCHECK_CONFIGURE_FLAGS += \
--enable-silent-rules=yes \
--disable-renderer \
--disable-tree-renderer \
--disable-generator
--enable-silent-rules=yes
......@@ -31,4 +31,4 @@ include %reldir%/texinfo.am
include %reldir%/export-html.am
include %reldir%/export-docbook.am
include %reldir%/org-export-texinfo.am
include %reldir%/examples.am
# libtarot-core.am
#
# Copyright (C) 2019 Vivien Kraus <vivien@planete-kraus.eu>
#
# This program 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 program 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 program. If not, see
# <http://www.gnu.org/licenses/>.
check_PROGRAMS += \
%reldir%/basic-initialization \
%reldir%/players-and-cards \
%reldir%/events \
%reldir%/xml \
%reldir%/petit-sec
%canon_reldir%_basic_initialization_LDADD = src/libtarot.la $(AM_LDADD)
%canon_reldir%_players_and_cards_LDADD = src/libtarot.la $(AM_LDADD)
%canon_reldir%_events_LDADD = src/libtarot.la $(AM_LDADD)
%canon_reldir%_xml_LDADD = src/libtarot.la $(AM_LDADD)
%canon_reldir%_describe_LDADD = src/libtarot.la $(AM_LDADD)
%canon_reldir%_petit_sec_LDADD = src/libtarot.la $(AM_LDADD)
BUILT_SOURCES += \
%reldir%/players-and-cards.c \
%reldir%/events.c
%reldir%/players-and-cards.c: src/cards/tarot/cards.h
%reldir%/events.c: src/cards/tarot/cards.h
This diff is collapsed.
......@@ -64,21 +64,9 @@ generate_verbose_ = $(generate_verbose_@AM_DEFAULT_V@)
generate_verbose_0 = @echo " GENERATE " $@;
if ENABLE_GENERATOR
if WITH_GOBJECT
if WITH_CAIRO
$(srcdir)/%reldir%/example-status.txt: src/tarot
$(generate_verbose) src/tarot --generate -n 5 -c \
| src/tarot --status -o $(srcdir)/%reldir%/example-status.txt
else # not WITH_CAIRO
$(srcdir)/%reldir%/example-status.txt:
@echo "A game needs to be re-generated. You need to enable the cairo bindings."
@false
endif # not WITH_CAIRO
else # not WITH_GOBJECT
$(srcdir)/%reldir%/example-status.txt:
@echo "A game needs to be re-generated. You need to enable the gobject bindings."
@false
endif # not WITH_GOBJECT
else # not ENABLE_GENERATOR
$(srcdir)/%reldir%/example-status.txt:
@echo "Error: the status $@ should be rebuilt. Please pass --enable-generator=yes to configure."
......
......@@ -31,20 +31,8 @@ tree_render_verbose_ = $(render_verbose_@AM_DEFAULT_V@)
tree_render_verbose_0 = @echo " TREE " $@;
if ENABLE_RENDERER
if WITH_GOBJECT
if WITH_CAIRO
$(srcdir)/%reldir%/example.xml.png: %reldir%/example.xml src/tarot
$(render_verbose) ./pre-inst-env tarot --render -i $(srcdir)/%reldir%/example.xml -o $(srcdir)/%reldir%/example.xml.png
else # not WITH_CAIRO
$(srcdir)/%reldir%/example.xml.png: %reldir%/example.xml
@echo "A game needs to be re-rendered. You need to enable the cairo bindings."
@false
endif # not WITH_CAIRO
else # not WITH_GOBJECT
$(srcdir)/%reldir%/example.xml.png: %reldir%/example.xml
@echo "A game needs to be re-rendered. You need to enable the gobject bindings."
@false
endif # not WITH_GOBJECT
else # not ENABLE_RENDERER
$(srcdir)/%reldir%/example.xml.png: %reldir%/example.xml
@echo "Error: the figure $@ should be rebuilt. Please pass --enable-renderer=yes to configure."
......
#!/bin/sh
PACKAGE_VERSION=$(./git-version-gen .tarball-version \
| sed 's|/[[:digit:]]\.[[:digit:]]\.[[:digit:]]||g')
LIBTOOL_VERSION=$(./git-version-gen .tarball-version \
| sed 's|.*/\([[:digit:]]\.[[:digit:]]\.[[:digit:]]\).*|\1|g' \
| sed 's/\./:/g')
case $1 in
package)
echo -n "$PACKAGE_VERSION";;
libtool)
echo -n "$LIBTOOL_VERSION";;
*)
echo -n "Usage: ./get-version.sh (package|libtool)" ; exit 1;;
esac
......@@ -16,8 +16,5 @@
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
lib-library/libgnulibrary.la:
$(MAKE) $(AM_MAKEFLAGS) -C lib-library
lib-program/libgnuprogram.la:
$(MAKE) $(AM_MAKEFLAGS) -C lib-program
lib/libgnu.la:
$(MAKE) $(AM_MAKEFLAGS) -C lib
......@@ -4,6 +4,4 @@ src/engine/application.vala
src/engine/pretty_status.vala
src/engine/solo.vala
src/tarot-opts.h
src/tarot-opts.c
src/cards/tarot/cards_private_impl.h
src/core/player/tarot/player_private_impl.h
\ No newline at end of file
src/tarot-opts.c
\ No newline at end of file
This diff is collapsed.
......@@ -16,22 +16,9 @@
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
include %reldir%/libtarot.am
include %reldir%/libtarot-gobject.am
include %reldir%/tarot-enums.am
include %reldir%/libtarot-vapi.am
include %reldir%/libtarot-gir.am
include %reldir%/libtarot-typelib.am
include %reldir%/tarot-cli-program.am
include %reldir%/gettext-h.am
AM_CPPFLAGS += -I $(srcdir)/%reldir% -I %reldir%
include %reldir%/core/Makefile.am
include %reldir%/cards/Makefile.am
include %reldir%/counter/Makefile.am
include %reldir%/xml/Makefile.am
include %reldir%/layout/Makefile.am
include %reldir%/cairo/Makefile.am
include %reldir%/mcts/Makefile.am
include %reldir%/simulation/Makefile.am
namespace Tarot {
public struct Card : uint {
public static Tarot.Card parse (string text, out unowned string end);
public static Tarot.Card parse_c (string text, out unowned string end);
public size_t to_string (char dest[]);
public size_t to_string_c (char dest[]);
public string to_string_alloc ();
public string to_string_c_alloc ();
}
public struct Player : uint {
public static Tarot.Player parse (string text, out unowned string end);
public static Tarot.Player parse_c (string text, out unowned string end);
public size_t to_string (char dest[]);
public size_t to_string_c (char dest[]);
public string to_string_alloc ();
public string to_string_c_alloc ();
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment