Commit 300434f0 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Give up on XSLT and use autotools

parent 7356e19f
Pipeline #39742 passed with stage
in 41 seconds
;; .dir-locals.el.in
;;
;; Copyright (C) 2017, 2018 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/>.
((nil
(compile-command . "cd @abs_top_builddir@ && make -j 4")
(eval
. (setq company-clang-arguments
(split-string
"-I@abs_top_srcdir@ -I@abs_top_builddir@ @CFLAGS@ @CPPFLAGS@ @ASAN_CFLAGS@ -I@abs_top_srcdir@/src -I@abs_top_builddir@/src -I@abs_top_srcdir@/src/core -I@abs_top_builddir@/src/core -I@abs_top_srcdir@/src/guile -I@abs_top_builddir@/src/guile @GUILE_2_0_CFLAGS@ -I@abs_top_srcdir@/src/scm -I@abs_top_builddir@/src/scm ")))))
# .gitignore
#
# Copyright (C) 2017, 2018 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/>.
*.a
*.dirstamp
*.gmo
*.go
*.header
*.insert-header
*.la
*.lo
*.log
*.o
*.trs
*~
.deps
.dir-locals.el
.libs
ABOUT-NLS
AUTHORS
INSTALL
Makefile
Makefile.in
aclocal.m4
ar-lib
autom4te.cache
build.html
compile
config.guess
config.h
config.h.in
config.log
config.rpath
config.status
config.sub
configure
depcomp
doc/tarot.html
doc/tarot.info
install-sh
libtool
ltmain.sh
m4
mdate-sh
missing
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
po/boldquot.sed
po/en@boldquot.po
po/en@quot.po
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sed
po/remove-potcdate.sin
po/stamp-po
po/tarot.pot
site.bak
site.exp
src/.dirstamp
src/core/check_bid
src/core/check_composition
src/core/check_deal
src/core/check_do_deal
src/core/check_game_init
src/gettext.h
src/guile/libtarot-guile.pc
src/liblibtarot.la
src/libtarot.pc
src/scm/tarot
stamp-h1
stamp-vti
tarot-*.tar.gz
tarot.log
tarot.sum
tarot.test
test-driver
test-suite.log
texinfo.tex
version.texi
# This file has been generated from build.xml, DO NOT EDIT
# Err.. Should I put a license on this file?
Vivien Kraus <vivien@planete-kraus.eu>
# Makefile.am
#
# Copyright (C) 2017, 2018 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/>.
SUBDIRS = po
AUTOMAKE_OPTIONS = subdir-objects dejagnu
bin_PROGRAMS =
dist_bin_SCRIPTS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
include_HEADERS =
check_PROGRAMS =
info_TEXINFOS =
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA =
INDENTED =
SUFFIXES =
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
.gitignore \
.git/hooks/pre-commit \
hooks/pre-commit.sh \
deploy.sh \
README.org \
README.md \
.dir-locals.el.in
AM_DISTCHECK_CONFIGURE_FLAGS = \
--enable-asan=yes \
--enable-silent-rules=yes
AM_CPPFLAGS = -DLOCALEDIR="\"$(localedir)\""
AM_CFLAGS =
AM_YFLAGS = -d
AM_LIBS =
AM_LDADD =
# Texinfo -> html flags, overriden in doc/Makefile.am
AM_MAKEINFOHTMLFLAGS =
include doc/Makefile.am
include src/Makefile.am
TESTS = $(check_PROGRAMS)
indent_verbose = $(indent_verbose_@AM_V@)
indent_verbose_ = $(indent_verbose_@AM_DEFAULT_V@)
indent_verbose_0 = @echo " INDENT $<";
.PHONY: indent
indent: $(INDENTED)
$(indent_verbose) $(INDENT) $(INDENTED)
org_verbose = $(org_verbose_@AM_V@)
org_verbose_ = $(org_verbose_@AM_DEFAULT_V@)
org_verbose_0 = @echo "ORG-EXPORT $@";
SUFFIXES += .org .md
.org.md:
$(org_verbose) echo "$(srcdir)/$@" \
| $(EMACS) "$(srcdir)/$<" \
--batch \
--eval "(require 'ox-md)" \
-f org-md-export-to-markdown
README: %reldir%/README.org
$(org_verbose) (echo "$(srcdir)/README.txt" \
| $(EMACS) "$(srcdir)/README.org" \
--batch \
--eval "(require 'ox-ascii)" \
-f org-ascii-export-to-ascii \
&& mv "$(srcdir)/README.txt" "$(srcdir)/README")
githook_setup_verbose = $(githook_setup_verbose_@AM_V@)
githook_setup_verbose_ = $(githook_setup_verbose_@AM_DEFAULT_V@)
githook_setup_verbose_0 = @echo "ORG-EXPORT $@";
.git/hooks/pre-commit: hooks/pre-commit.sh
$(MKDIR_P) $(srcdir)/.git/hooks
$(githook_setup_verbose) \
(cp $(srcdir)/hooks/pre-commit.sh \
$(srcdir)/.git/hooks/pre-commit \
&& chmod ugo+x $(srcdir)/.git/hooks/pre-commit)
AUTORECONF = autoreconf
XSLTPROC = xsltproc
MKDIR_P = mkdir -p
TOUCH = touch
BOOTSTRAP_CONFIGURE_FLAGS = \
CFLAGS="-Wall -Wextra -Werror -g -O0" \
YFLAGS="--report=all" \
GUILE_2_0_CFLAGS="$$(/usr/bin/guile-config compile)" \
GUILE_2_0_LIBS="$$(/usr/bin/guile-config link)" \
--enable-asan=yes \
--prefix="$$PWD/public" \
--enable-silent-rules=yes
PHONY: bootstrap
bootstrap: configure.ac Makefile.am po/Makevars
$(MKDIR_P) po
$(MKDIR_P) pc
$(TOUCH) po/POTFILES.in .gitignore po/LINGUAS AUTHORS \
pc/libtarot.pc.in .dir-locals.el.in pc/libtarot-guile.pc.in
$(TOUCH) build.xml
$(AUTORECONF) --install --warn=all
./configure $(BOOTSTRAP_CONFIGURE_FLAGS)
$(MAKE) -j 16 dist
$(MAKE) -j 16 distclean
configure.ac: xslt/configure.ac.xslt
$(XSLTPROC) xslt/configure.ac.xslt build.xml > configure.ac
Makefile.am: xslt/Makefile.am.xslt
$(XSLTPROC) xslt/Makefile.am.xslt build.xml > Makefile.am
po/Makevars: xslt/po/Makevars.xslt
$(XSLTPROC) xslt/po/Makevars.xslt build.xml > po/Makevars
# Local Variables:
# mode: makefile
# End:
<!ELEMENT project (library | program | po | doc)*>
<!ELEMENT library (installed-header | source | require-header
| require-function | link | test | package-dep)*>
<!ELEMENT program (source | require-header | require-function
| link | program-test | package-dep)*>
<!ELEMENT po (localization*, en-quot?, en-boldquot?)>
<!ELEMENT doc (manual*)>
<!ELEMENT manual (include-texi*)>
<!ELEMENT installed-header EMPTY>
<!ELEMENT source EMPTY>
<!ELEMENT require-header EMPTY>
<!ELEMENT require-function EMPTY>
<!ELEMENT link EMPTY>
<!ELEMENT package-dep (require-header | require-function)*>
<!ELEMENT localization EMPTY>
<!ELEMENT en-quot EMPTY>
<!ELEMENT en-boldquot EMPTY>
<!ELEMENT test EMPTY>
<!ELEMENT program-test EMPTY>
<!ELEMENT include-texi EMPTY>
<!ATTLIST project
name CDATA #REQUIRED
version CDATA #REQUIRED
author CDATA #REQUIRED
email CDATA #REQUIRED
date CDATA #REQUIRED>
<!ATTLIST library
name ID #REQUIRED
directory CDATA #REQUIRED
version-info CDATA #IMPLIED
installed (yes|no) "yes"
asan (yes|no) "yes">
<!ATTLIST program
name CDATA #REQUIRED
directory CDATA #REQUIRED
kind (installed|script) "installed"
asan (yes|no) "yes">
<!ATTLIST package-dep name CDATA #REQUIRED>
<!ATTLIST po include-gettext-h CDATA #REQUIRED>
<!ATTLIST installed-header name CDATA #REQUIRED>
<!ATTLIST source name CDATA #IMPLIED
potfile (yes|no) "no"
indented (yes|no) "yes">
<!ATTLIST require-header name CDATA #REQUIRED>
<!ATTLIST require-function name CDATA #REQUIRED once (yes|no) "no">
<!ATTLIST link name IDREF #REQUIRED>
<!ATTLIST localization lang CDATA #REQUIRED>
<!ATTLIST manual name CDATA #REQUIRED>
<!ATTLIST include-texi name CDATA #REQUIRED>
<!ATTLIST test name CDATA #REQUIRED>
<!ATTLIST program-test input CDATA #IMPLIED
output CDATA #IMPLIED
error CDATA #IMPLIED
exit-status (pass|fail) "pass">
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="xslt/build.html.xslt"?>
<!DOCTYPE project SYSTEM "build.dtd">
<project name="tarot" version="devel" author="Vivien Kraus"
email="vivien@planete-kraus.eu" date="2017">
<library name="libtarot" directory="src" installed="yes"
version-info="0:0:0">
<link name="libtarot-core" />
<test name="check_composition" />
<test name="check_game_init" />
<test name="check_deal" />
<test name="check_do_deal" />
<test name="check_bid" />
</library>
<library name="libtarot-core" directory="src/core" installed="no">
<installed-header name="tarot.h" />
<source name="_tarot_count_cards.c" />
<source name="_tarot_count_handful.c" />
<source name="_tarot_free.c" />
<source name="_tarot_has_lead_suit.c" />
<source name="_tarot_match_hint.c" />
<source name="_tarot_malloc.c" potfile="yes" />
<source name="_tarot_n_cards_in_trick.c" />
<source name="_tarot_n_players_between.c" />
<source name="_tarot_no_doubles.c" />
<source name="_tarot_no_petit_sec.c" />
<source name="_tarot_not_present_in_hands.c" />
<source name="_tarot_sort.c" />
<source name="_tarot_strongest_trump.c" />
<source name="tarot_card_set_alloc.c" />
<source name="tarot_card_set_free.c" />
<source name="tarot_card_set_set.c" />
<source name="tarot_decompose.c" />
<source name="tarot_game_alloc.c" />
<source name="tarot_game_bids.c" />
<source name="tarot_game_call.c" />
<source name="tarot_game_cards.c" />
<source name="tarot_game_check_bid.c" />
<source name="tarot_game_check_call.c" />
<source name="tarot_game_check_card.c" />
<source name="tarot_game_check_deal_one.c" />
<source name="tarot_game_check_deal_multi.c" />
<source name="tarot_game_check_decl.c" />
<source name="tarot_game_check_discard.c" />
<source name="tarot_game_check_dog.c" />
<source name="tarot_game_check_handful.c" />
<source name="tarot_game_decl.c" />
<source name="tarot_game_discard.c" />
<source name="tarot_game_do_bid.c" />
<source name="tarot_game_do_call.c" />
<source name="tarot_game_do_card.c" />
<source name="tarot_game_do_deal_one.c" />
<source name="tarot_game_do_deal_multi.c" />
<source name="tarot_game_do_decl.c" />
<source name="tarot_game_do_discard.c" />
<source name="tarot_game_do_dog.c" />
<source name="tarot_game_do_handful.c" />
<source name="tarot_game_dog.c" />
<source name="tarot_game_free.c" />
<source name="tarot_game_handful.c" />
<source name="tarot_game_hint_bid.c" />
<source name="tarot_game_hint_call.c" />
<source name="tarot_game_hint_card.c" />
<source name="tarot_game_hint_discard.c" />
<source name="tarot_game_hint_handful.c" />
<source name="tarot_game_options.c" />
<source name="tarot_game_score.c" />
<source name="tarot_game_state.c" />
<source name="tarot_game_trick.c" />
<source name="tarot_game_trick_card.c" />
<source name="tarot_init.c" />
<source name="tarot_libtarot_version.c" />
<source name="tarot_of.c" />
<source name="tarot_private.h" />
<source name="tarot_strerror.c" />
<source name="tarot_str_to_card.c" />
<source name="tarot_str_to_player.c" />
<source name="tarot_card_to_str.c" />
<source name="tarot_player_to_str.c" />
<require-header name="ctype.h" />
<!-- This does not work: isspace is a built in function
<require-function name="isspace" once="yes" />
-->
</library>
<library name="libtarot-guile" directory="src/guile" installed="yes"
version-info="0:0:0">
<link name="libtarot" />
<installed-header name="tarot_guile.h" />
<source name="conversions.c" />
<source name="bindings.c" />
<source name="loading.c" />
<package-dep name="guile-2.0">
<require-header name="libguile.h" />
<require-function name="scm_c_define_gsubr" />
</package-dep>
</library>
<program name="tarot" directory="src/scm" kind="script">
<source name="modules/tarot/tarot.scm" />
<source name="modules/tarot/resource-compiler.scm" />
</program>
<!-- po handles all gettext i18n -->
<po include-gettext-h="src/gettext.h">
<localization lang="fr" />
<!-- en-quot and en-boldquot are automatic localizations to
replace the symmetric quotes with asymmetric ones -->
<en-quot />
<en-boldquot />
</po>
<!-- texinfo documentation -->
<doc>
<manual name="tarot">
<include-texi name="about" />
<include-texi name="game" />
<include-texi name="language" />
<include-texi name="ai" />
<include-texi name="invoking" />
<include-texi name="output" />
<include-texi name="conditions" />
<include-texi name="index" />
<include-texi name="game/players" />
<include-texi name="game/cards" />
<include-texi name="game/steps" />
<include-texi name="fdl" />
<include-texi name="game/steps/libtarot" />
<include-texi name="game/steps/deal" />
<include-texi name="game/steps/bids" />
<include-texi name="game/steps/slam" />
<include-texi name="game/steps/call" />
<include-texi name="game/steps/discard" />
<include-texi name="game/steps/handful" />
<include-texi name="game/steps/tricks" />
<include-texi name="game/steps/score" />
<include-texi name="game/steps/libtarot/allocation" />
<include-texi name="game/steps/libtarot/error" />
<include-texi name="game/steps/libtarot/game" />
</manual>
</doc>
</project>
dnl configure.ac
dnl
dnl Copyright (C) 2017, 2018 Vivien Kraus <vivien@planete-kraus.eu>
dnl
dnl This program is free software: you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License as
dnl published by the Free Software Foundation, either version 3 of the
dnl License, or (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see
dnl <http://www.gnu.org/licenses/>.
AC_PREREQ([2.69])
AC_INIT([tarot], [devel], [vivien@planete-kraus.eu])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
dnl Check for programs
AC_PROG_CC
AC_PROG_CC_STDC
AM_INIT_AUTOMAKE
AM_PROG_AR
LT_INIT
GUILE_PROGS
AC_SUBST([GUILE_EFFECTIVE_VERSION])
AS_IF([test "x$GUILD" = "x"], [AC_MSG_ERROR([guild not found!])])
AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
AM_PATH_LISPDIR
AC_ARG_ENABLE([orgmode],
[AS_HELP_STRING([--enable-orgmode],
[dedicate your life (in plain text) to the One True Editor
(default: if available)])])
AC_MSG_CHECKING([if org-mode is installed])
AS_IF([$EMACS --batch \
-f org-version \
--eval "(require 'ox-ascii)" \
--eval "(require 'ox-md)" >> config.log 2>&1], [
AC_MSG_RESULT([yes])
AM_CONDITIONAL([HAVE_ORGMODE], [true])
], [
AC_MSG_RESULT([no])
AM_CONDITIONAL([HAVE_ORGMODE], [false])
AS_IF([test "x$enable_orgmode" = "xyes"],
AC_MSG_FAILURE([Org-mode is not installed. The sinner shall be pardoned by not passing --enable-orgmode to the configure script.]))
])
dnl Checks for libraries.
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19])
AC_ARG_ENABLE([asan], AS_HELP_STRING([--enable-asan=yes],
[Enforce AddressSanitizer]))
AS_IF([test "x$enable_asan" = "xyes"], [
NORMAL_CFLAGS="$CFLAGS"
NORMAL_LIBS="$LIBS"
ASAN_CFLAGS="-fsanitize=address"
ASAN_LIBS=""
CFLAGS="$NORMAL_CFLAGS $ASAN_CFLAGS"
LIBS="$NORMAL_LIBS $ASAN_LIBS"
AC_LANG_PUSH([C])
AC_MSG_CHECKING([for $CC support for ASAN])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[#include <stdlib.h>]], [[
free (malloc (5));
return 0;
]])
], [
AC_SUBST([ASAN_CFLAGS])
AC_SUBST([ASAN_LIBS])
AC_MSG_RESULT([$ASAN_CFLAGS])
], [
AC_MSG_RESULT([no])
])
AC_LANG_POP([C])
CFLAGS="$NORMAL_CFLAGS"
LIBS="$NORMAL_LIBS"
])
AC_ARG_ENABLE([indent],
AS_HELP_STRING([--disable-indent], [Disable GNU indent]))
AS_IF([test "x$enable_indent" != "xno"],
[AC_PATH_PROG([INDENT], [indent], [indent])])
PKG_CHECK_MODULES([GUILE_2_0], [guile-2.0])
dnl Checks for header files.
AC_CHECK_HEADERS([ctype.h], [],
[AC_MSG_FAILURE([Could not find header file ctype.h.])])
NORMAL_CPPFLAGS="$CPPFLAGS"
NORMAL_CFLAGS="$CFLAGS"
NORMAL_LIBS="$LIBS"
CPPFLAGS="$NORMAL_CPPFLAGS $GUILE_2_0_CFLAGS"
CFLAGS="$NORMAL_CFLAGS $GUILE_2_0_CFLAGS"
LIBS="$NORMAL_LIBS $GUILE_2_0_LIBS"
AC_CHECK_HEADERS([libguile.h], [],
[AC_MSG_FAILURE([Could not find header file libguile.h.])])
CPPFLAGS="$NORMAL_CPPFLAGS"
CFLAGS="$NORMAL_CFLAGS"
LIBS="$NORMAL_LIBS"
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
NORMAL_CPPFLAGS="$CPPFLAGS"
NORMAL_CFLAGS="$CFLAGS"
NORMAL_LIBS="$LIBS"
CPPFLAGS="$NORMAL_CPPFLAGS $GUILE_2_0_CFLAGS"
CFLAGS="$NORMAL_CFLAGS $GUILE_2_0_CFLAGS"
LIBS="$NORMAL_LIBS $GUILE_2_0_LIBS"
AC_CHECK_FUNC([scm_c_define_gsubr])
AS_IF([test "x$ac_cv_func_scm_c_define_gsubr" != "xyes"],
[AC_MSG_FAILURE([Could not find library function scm_c_define_gsubr.])])
CPPFLAGS="$NORMAL_CPPFLAGS"
CFLAGS="$NORMAL_CFLAGS"
LIBS="$NORMAL_LIBS"
dnl Configure files.
AC_CONFIG_FILES([
Makefile
po/Makefile.in
src/libtarot.pc
src/guile/libtarot-guile.pc
src/scm/tarot
.dir-locals.el
])
AC_OUTPUT
body {
display: block;
}
h1 {
font-size: xx-large;
text-align: center;
}
body > div {
display: block;
padding: 1em;
margin: 1em;
}
#header,
#footer {
max-width: 80ex;
margin: auto;
}
#header {
border-bottom: 3px dashed gray;
}
#footer {
border-top: 3px dashed gray;
}
#footer {
text-align: center;
}
#declarations {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: stretch;
}
#declarations > div {
margin: 1em;
}
#declarations > div {
border: 1px solid black;
}
#declarations h1 {
text-align: center;
margin: 0px;
font-size: x-large;
color: black;
text-decoration: underline;
}
#declarations h2 {
text-align: right;