Commit 64f29867 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Switch to the XML-based build system.

parent f3e6a440
Pipeline #34064 passed with stage
in 49 seconds
; This file has been autogenerated from build.xml, do not edit!
((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@ -I@abs_top_srcdir@/lib -I@abs_top_builddir@/lib -I@abs_top_srcdir@/src -I@abs_top_builddir@/src -I@abs_top_srcdir@/src/core -I@abs_top_builddir@/src/core @CFLAGS@ @CPPFLAGS@ @OPENMP_CFLAGS@ @ASAN_CFLAGS@"
)
)
)
)
)
(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 -I@abs_top_builddir@/src ")))))
*.dirstamp
*.gcda
*.gcno
*.gir
*.la
*.lo
*.log
*.o
*.trs
*.typelib
*site.bak
*~
.buildconfig
.deps
.dir-locals.el
.libs
ABOUT-NLS
Doxyfile
Makefile
Makefile.in
_tarot_parser.h
aclocal.m4
ar-lib
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.rpath
config.status
config.sub
configure
coverage.html
coverage.info
depcomp
doc/Makefile
doc/mdate-sh
doc/stamp-vti
doc/tarot.html
doc/tarot.info
doc/tarot.pdf
doc/tarot.t2p
doc/texinfo.tex
doc/version.texi
doc/version.texi
doxygen-doc
indent.stamp
install-sh
lib
libtool
ltmain.sh
m4/.gitignore
m4/00gnulib.m4
m4/ax_prog_bison.m4
m4/ax_prog_doxygen.m4
m4/codeset.m4
m4/extensions.m4
m4/extern-inline.m4
m4/fcntl-o.m4
m4/gettext.m4
m4/glibc2.m4
m4/glibc21.m4
m4/gnulib-cache.m4
m4/gnulib-cache.m4
m4/gnulib-common.m4
m4/gnulib-comp.m4
m4/gnulib-tool.m4
m4/iconv.m4
m4/intdiv0.m4
m4/intl.m4
m4/intldir.m4
m4/intlmacosx.m4
m4/intmax.m4
m4/introspection.m4
m4/inttypes-pri.m4
m4/inttypes_h.m4
m4/lcmessage.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/libtool.m4
m4/libtool.m4
m4/lock.m4
m4/longlong.m4
m4/ltoptions.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/ltversion.m4
m4/lt~obsolete.m4
m4/lt~obsolete.m4
m4/nls.m4
m4/po.m4
m4/printf-posix.m4
m4/progtest.m4
m4/size_max.m4
m4/stdint_h.m4
m4/threadlib.m4
m4/uintmax_t.m4
m4/visibility.m4
m4/wchar_t.m4
m4/wint_t.m4
m4/xsize.m4
missing
po/*.gmo
po/Makefile
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sed
po/remove-potcdate.sin
po/stamp-po
public
site.exp
snippet
src/Makefile
src/_tarot_parser.output
src/core/Makefile
src/core/check_bid
src/core/check_composition
src/core/check_deal
src/core/check_deal_cpp
src/core/check_do_deal
src/core/check_game_init
src/core/tarot_mainpage.h
src/gettext.h
src/lang/_tarot_parser.c
src/lang/_tarot_parser.h
src/lang/check_lexer
src/lang/tarot-parrot
src/tarot-gobject/tarot_gobject.h
src/tarot-gobject/tarot_gobject_enums.c
src/tarot-status
stamp-h1
tarot-*.tar.gz
tarot-devel-coverage
tarot.sum
test-driver
ylwrap
\ No newline at end of file
Vivien Kraus <vivien@planete-kraus.eu>
\ No newline at end of file
# This file has been generated from build.xml, DO NOT EDIT
Vivien Kraus <vivien@planete-kraus.eu>
......@@ -5,5 +5,6 @@ RUN apt-get install -y --no-install-recommends autoconf automake gettext autopoi
RUN apt-get install -y --no-install-recommends make gcc valac valac-vapi gtk-doc-tools flex bison
RUN apt-get install -y --no-install-recommends nettle-dev libgtk-3-dev libgirepository1.0-dev
RUN apt-get install -y --no-install-recommends emacs org-mode indent doxygen graphviz lcov dejagnu check
RUN apt-get install -y --no-install-recommends libxml2-utils xsltproc
RUN apt-get upgrade -y
MAINTAINER framagit.org/gugurumbe/tarot
\ No newline at end of file
SUBDIRS = po doc .
AUTOMAKE_OPTIONS = subdir-objects dejagnu -Wno-portability
bin_PROGRAMS =
noinst_PROGRAMS =
check_PROGRAMS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
include_HEADERS =
INDENTED_FILES =
TESTS =
BUILT_SOURCES =
ACLOCAL_AMFLAGS = -I m4
dist_noinst_SCRIPTS = \
bootstrap.sh \
deploy.sh \
hooks/pre-commit.sh
EXTRA_DIST = .gitignore \
README.org \
README.md \
Dockerfile \
src/gettext.h
AM_DISTCHECK_CONFIGURE_FLAGS = \
"EMACS=no" \
"INDENT=no"
AM_CPPFLAGS = \
-I $(top_builddir)/src \
-I $(top_srcdir)/src \
-I $(top_builddir)/src/core \
-I $(top_srcdir)/src/core \
-DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = \
$(OPENMP_CFLAGS) \
$(ASAN_CFLAGS)
# Needed to build and distribute the .h
AM_YFLAGS = -d
AM_LIBS = \
$(ASAN_LIBS) \
$(OPENMP_LIBS)
AM_LDADD = \
$(LTLIBINTL) \
$(LTLIBTHREAD) \
@INTL_MACOSX_LIBS@
include $(srcdir)/site.am
include $(srcdir)/src/libtarot.am
include $(srcdir)/src/libtarot-program.am
include $(srcdir)/src/core/libtarot-core.am
include $(srcdir)/src/core/test-libtarot-core.am
INDENTED_FILES += $(include_HEADERS)
@INDENT_RULES@
@ORGMODE_RULES@
@DOCKER_RULES@
AUTORECONF = autoreconf
XSLTPROC = xsltproc
MKDIR_P = mkdir -p
TOUCH = touch
.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
$(TOUCH) build.xml
$(AUTORECONF) --install --warn=all
./configure
$(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:
......@@ -15,16 +15,16 @@ _________________
4 Compile this project
.. 4.1 Gitlab users: make a source distribution
..... 4.1.1 Insane Tooling
..... 4.1.2 The intermediate configure run
..... 4.1.3 The git pre-commit hook
..... 4.1.2 The git pre-commit hook
.. 4.2 Everyone: configure, make and install
5 Let me know
6 FAQ
.. 6.1 Emacs? Are you serious?
7 Things to do [0/3]
.. 7.1 TODO Continue implementing the game features
.. 7.2 TODO Restore imputation
.. 7.3 TODO Get rid of doxygen and enable gtk-doc
.. 7.1 TODO Restore imputation
.. 7.2 TODO Get rid of doxygen and enable gtk-doc
.. 7.3 TODO Re-implement the tarot-status utility, with a real command line
.. 7.4 TODO Re-enable the whole program checks from the `develop' branch, with the new syntax
......@@ -48,15 +48,12 @@ _________________
3 Project site
==============
Go to the [project site]. There is also a [code coverage report].
Go to the [project site].
[project site]
http://gugurumbe.frama.io/tarot/usr/local/share/doc/tarot/tarot.html/api-doc/index.html
[code coverage report]
http://gugurumbe.frama.io/tarot/usr/local/share/doc/tarot/tarot.html/coverage/index.html
4 Compile this project
======================
......@@ -86,10 +83,10 @@ http://gugurumbe.frama.io/tarot/usr/local/share/doc/tarot/tarot.html/coverage/in
If you still want to re-build the source distribution, and you are not
on a debian stable system, then be aware that the `bootstrap.sh'
script will try to import `gettext.h' from
`/usr/share/gettext/gettext.h' and `introspection.m4' from
`/usr/share/aclocal/introspection.m4'. If those files are packaged in
`/usr/share/gettext/gettext.h'. If those files are packaged in
another place, then you either have to make a symlink or edit the
`bootstrap.sh' script and tell me where you found those files.
`xslt/Makefile.am.xslt' script and tell me where you found those
files.
[the latest build on the "develop" branch]
......@@ -99,42 +96,25 @@ http://gugurumbe.frama.io/tarot/tarot-devel.tar.gz
--------------------
You have to install the autotools (`autoconf', `automake', `libtool',
`texinfo' and `autoreconf'), `bison', `glib-mkenums', `g-ir-scanner',
and optionally `indent' (very recommended), `emacs' (if you edit this
README) and `docker' (if you want to re-build the
`tarotbis/build:latest' docker image yourself). Once this is done,
you can run the `bootstrap.sh' script at the top-level directory that
will:
- take files from your system, namely `gettext.h' and
`introspection.m4' and put it in the sources;
- run autoreconf;
- build the other sources (bison parser, `.gir' and `.typelib' files),
with a specific run of the `configure' script just for this step;
- run `configure' with the arguments you supplied;
- install a `git' pre-commit hook.
4.1.2 The intermediate configure run
------------------------------------
`texinfo' and `autoreconf'), an XSLT processor (`xsltproc'), a XML
linter (`xmllinnt'), and optionally `indent' (very recommended),
`emacs' (if you edit this README) and `docker' (if you want to
re-build the `tarotbis/build:latest' docker image yourself). Once
this is done, you can run at the top-level directory:
The GObjectIntrospection repository is an XML file that describes what
GObjects are built. It only depends on the source code, so it is not
checked in. However, it requires `glib-mkenums' and `g-ir-scanner',
which are two tools that the user may not have installed, and which
are an unreasonable dependency, so it is distributed along with the
source code.
,----
| make -f Makefile.bootstrap
`----
However, the GObjects are discovered by /introspection/, which means
we have to run a program that we have just built. So, we need to
build the package before being able to use the gir file. We could
wait for the package to be built, however this would break
cross-compilation, since you would not be able to run the programs.
So we use an intermediate configure run to target the build system
(yours with which you jumped into this adventure), build the project,
execute the program, save the gir and distclean.
It will:
- take files from your system, namely `gettext.h' and put it in the
sources;
- set up the autotools build system from build.xml;
- run autoreconf;
- install a (severe) `git' pre-commit hook.
4.1.3 The git pre-commit hook
4.1.2 The git pre-commit hook
-----------------------------
The pre-commit hook checks quite thoroughly that the changes you made
......@@ -203,21 +183,28 @@ http://gugurumbe.frama.io/tarot/tarot-devel.tar.gz
7 Things to do [0/3]
====================
7.1 TODO Continue implementing the game features
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The imputation is for step 7.2.
7.2 TODO Restore imputation
7.1 TODO Restore imputation
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The imputation should be in an auxiliary module, and should be updated
independently of the game.
7.3 TODO Get rid of doxygen and enable gtk-doc
7.2 TODO Get rid of doxygen and enable gtk-doc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We /need/ gtk-doc to have the gobject introspection right. I suggest
we simply drop Doxygen, not to duplicate the API documentation.
7.3 TODO Re-implement the tarot-status utility, with a real command line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't use bison for this, because:
- it has to load the entire game in memory, and cannot process
commands individually;
- it will not be possible to support readline auto-completion.
7.4 TODO Re-enable the whole program checks from the `develop' branch, with the new syntax
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -2,32 +2,32 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org141742c">1. READ ME</a></li>
<li><a href="#org6dc4fe7">2. About tarot</a></li>
<li><a href="#org71a2dc2">3. Project site</a></li>
<li><a href="#org8aa64c3">4. Compile this project</a>
<li><a href="#org9e7d1f4">1. READ ME</a></li>
<li><a href="#org746d02f">2. About tarot</a></li>
<li><a href="#org406fa76">3. Project site</a></li>
<li><a href="#org6e317b5">4. Compile this project</a>
<ul>
<li><a href="#org75402af">4.1. Gitlab users: make a source distribution</a>
<li><a href="#org934c710">4.1. Gitlab users: make a source distribution</a>
<ul>
<li><a href="#orgcae8f1c">4.1.1. Insane Tooling</a></li>
<li><a href="#org732f526">4.1.2. The intermediate configure run</a></li>
<li><a href="#orgb5cc4cf">4.1.3. The git pre-commit hook</a></li>
<li><a href="#org8d0aa51">4.1.1. Insane Tooling</a></li>
<li><a href="#org7fa4b46">4.1.2. The git pre-commit hook</a></li>
</ul>
</li>
<li><a href="#org46f644f">4.2. Everyone: configure, make and install</a></li>
<li><a href="#orgdee575a">4.2. Everyone: configure, make and install</a></li>
</ul>
</li>
<li><a href="#org6b3f23e">5. Let me know</a></li>
<li><a href="#orge6a2bff">6. FAQ</a>
<li><a href="#org485abbf">5. Let me know</a></li>
<li><a href="#orgc84fd39">6. FAQ</a>
<ul>
<li><a href="#orgbbbbb72">6.1. Emacs? Are you serious?</a></li>
<li><a href="#org82d3edc">6.1. Emacs? Are you serious?</a></li>
</ul>
</li>
<li><a href="#orgc8a3456">7. Things to do <code>[0/3]</code></a>
<li><a href="#org9d98ab9">7. Things to do <code>[0/3]</code></a>
<ul>
<li><a href="#org3e060c4">7.1. <span class="todo TODO">TODO</span> Continue implementing the game features</a></li>
<li><a href="#orga7d570a">7.2. <span class="todo TODO">TODO</span> Restore imputation</a></li>
<li><a href="#org22dfd50">7.3. <span class="todo TODO">TODO</span> Get rid of doxygen and enable gtk-doc</a></li>
<li><a href="#org28debc3">7.1. <span class="todo TODO">TODO</span> Restore imputation</a></li>
<li><a href="#orge05154d">7.2. <span class="todo TODO">TODO</span> Get rid of doxygen and enable gtk-doc</a></li>
<li><a href="#orgd4972bd">7.3. <span class="todo TODO">TODO</span> Re-implement the tarot-status utility, with a real command line</a></li>
<li><a href="#org022094d">7.4. <span class="todo TODO">TODO</span> Re-enable the whole program checks from the <code>develop</code> branch, with the new syntax</a></li>
</ul>
</li>
</ul>
......@@ -35,15 +35,15 @@
</div>
<a id="org141742c"></a>
<a id="org9e7d1f4"></a>
# READ ME
RUN THE CONFIGURE SCRIPT NOT THE BOOTSTRAP ONE. If you don't have a
configure script, see section [4.1](#org75402af).
configure script, see section [4.1](#org934c710).
<a id="org6dc4fe7"></a>
<a id="org746d02f"></a>
# About tarot
......@@ -52,14 +52,14 @@ Of Tarot*. It aims at providing a game and an artificial
intelligence.
<a id="org71a2dc2"></a>
<a id="org406fa76"></a>
# Project site
Go to the [project site](http://gugurumbe.frama.io/tarot/usr/local/share/doc/tarot/tarot.html/api-doc/index.html). There is also a [code coverage report](http://gugurumbe.frama.io/tarot/usr/local/share/doc/tarot/tarot.html/coverage/index.html).
Go to the [project site](http://gugurumbe.frama.io/tarot/usr/local/share/doc/tarot/tarot.html/api-doc/index.html).
<a id="org8aa64c3"></a>
<a id="org6e317b5"></a>
# Compile this project
......@@ -71,7 +71,7 @@ some more work. Note that a source distribution is already available
my autotools!).
<a id="org75402af"></a>
<a id="org934c710"></a>
## Gitlab users: make a source distribution
......@@ -79,63 +79,43 @@ You need more tools in order to bootstrap the source distribution.
I am assuming you run on debian stable, if you don't then please tell
me. If you work on a platform where the extensive tooling described
in section [4.1.1](#orgcae8f1c) is *not* available, or difficult to install,
in section [4.1.1](#org8d0aa51) is *not* available, or difficult to install,
then I advise you to make a *source* distribution from an easier
system or download [the latest build on the "develop" branch](http://gugurumbe.frama.io/tarot/tarot-devel.tar.gz), and then
use this distribution as discussed in section [4.2](#org46f644f).
use this distribution as discussed in section [4.2](#orgdee575a).
If you still want to re-build the source distribution, and you are not
on a debian stable system, then be aware that the `bootstrap.sh`
script will try to import `gettext.h` from
`/usr/share/gettext/gettext.h` and `introspection.m4` from
`/usr/share/aclocal/introspection.m4`. If those files are packaged in
`/usr/share/gettext/gettext.h`. If those files are packaged in
another place, then you either have to make a symlink or edit the
`bootstrap.sh` script and tell me where you found those files.
`xslt/Makefile.am.xslt` script and tell me where you found those
files.
<a id="orgcae8f1c"></a>
<a id="org8d0aa51"></a>
### Insane Tooling
You have to install the autotools (`autoconf`, `automake`, `libtool`,
`texinfo` and `autoreconf`), `bison`, `glib-mkenums`, `g-ir-scanner`,
and optionally `indent` (very recommended), `emacs` (if you edit this
README) and `docker` (if you want to re-build the
`tarotbis/build:latest` docker image yourself). Once this is done,
you can run the `bootstrap.sh` script at the top-level directory that
will:
- take files from your system, namely `gettext.h` and
`introspection.m4` and put it in the sources;
- run autoreconf;
- build the other sources (bison parser, `.gir` and `.typelib` files),
with a specific run of the `configure` script just for this step;
- run `configure` with the arguments you supplied;
- install a `git` pre-commit hook.
`texinfo` and `autoreconf`), an XSLT processor (`xsltproc`), a XML
linter (`xmllinnt`), and optionally `indent` (very recommended),
`emacs` (if you edit this README) and `docker` (if you want to
re-build the `tarotbis/build:latest` docker image yourself). Once
this is done, you can run at the top-level directory:
<a id="org732f526"></a>
make -f Makefile.bootstrap
### The intermediate configure run
It will:
The GObjectIntrospection repository is an XML file that describes what
GObjects are built. It only depends on the source code, so it is not
checked in. However, it requires `glib-mkenums` and `g-ir-scanner`,
which are two tools that the user may not have installed, and which
are an unreasonable dependency, so it is distributed along with the
source code.
However, the GObjects are discovered by *introspection*, which means
we have to run a program that we have just built. So, we need to
build the package before being able to use the gir file. We could
wait for the package to be built, however this would break
cross-compilation, since you would not be able to run the programs.
So we use an intermediate configure run to target the build system
(yours with which you jumped into this adventure), build the project,
execute the program, save the gir and distclean.
- take files from your system, namely `gettext.h` and put it in the
sources;
- set up the autotools build system from build.xml;
- run autoreconf;
- install a (severe) `git` pre-commit hook.
<a id="orgb5cc4cf"></a>
<a id="org7fa4b46"></a>
### The git pre-commit hook
......@@ -159,7 +139,7 @@ every commit on the `develop` and `master` branches to help maintain
the project.
<a id="org46f644f"></a>
<a id="orgdee575a"></a>
## Everyone: configure, make and install
......@@ -180,7 +160,7 @@ build, or use two steps:
make -j 4
<a id="org6b3f23e"></a>
<a id="org485abbf"></a>
# Let me know
......@@ -188,12 +168,12 @@ I develop Tarot as a personal hobby. If you find it interesting, or
have bugs to submit, please let me know: `vivien@planete-kraus.eu`
<a id="orge6a2bff"></a>
<a id="orgc84fd39"></a>
# FAQ
<a id="orgbbbbb72"></a>
<a id="org82d3edc"></a>
## Emacs? Are you serious?
......@@ -205,19 +185,12 @@ you have to have emacs installed.
checking if org-mode is installed... yes
<a id="orgc8a3456"></a>
<a id="org9d98ab9"></a>
# Things to do <code>[0/3]</code>
<a id="org3e060c4"></a>
## Continue implementing the game features
The imputation is for step [7.2](#orga7d570a).
<a id="orga7d570a"></a>
<a id="org28debc3"></a>
## Restore imputation
......@@ -225,10 +198,26 @@ The imputation should be in an auxiliary module, and should be updated
independently of the game.
<a id="org22dfd50"></a>
<a id="orge05154d"></a>
## Get rid of doxygen and enable gtk-doc
We *need* gtk-doc to have the gobject introspection right. I suggest
we simply drop Doxygen, not to duplicate the API documentation.