Commit 3854a6be authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Make a distribution-ready source tree within autogen.sh

parent 528dc6ad
Pipeline #97544 failed with stages
in 2 minutes and 23 seconds
......@@ -148,7 +148,7 @@ README.md: %reldir%/tarot.org
-f org-md-export-to-markdown \
&& mv "$(srcdir)/tarot.md" "$(srcdir)/README.md")
README: README.md
$(AM_V_GEN) cp README.md README
$(AM_V_GEN) cp $(srcdir)/README.md $(srcdir)/README
AUTHORS: %reldir%/AUTHORS.org
$(org_verbose) ($(EMACS) \
--batch -q \
......
......@@ -41,3 +41,19 @@ cp -fp libopts/m4/*.m4 lib-program/m4/. || exit 1
touch README || exit 1
autoreconf -vif || exit 1
rm doc/tarot.texi || exit 1
SRCDIR=$PWD
BUILDDIR=$(mktemp -d)
cd $BUILDDIR || exit 1
$SRCDIR/configure "$@" || exit 1
(cd lib-library && make) || exit 1
(cd lib-program && make) || exit 1
make src/libtarot.la src/libtarot-gobject.la || exit 1
make src/Tarot-1.0.gir && cp src/Tarot-1.0.gir $SRCDIR/src/ || exit 1
make src/Tarot-1.0.typelib && cp src/Tarot-1.0.typelib $SRCDIR/src/ || exit 1
make src/tarot-1.0.vapi && cp src/tarot-1.0.vapi $SRCDIR/src/ || exit 1
make src/cairo/tarot-render || exit 1
make dist || exit 1
make distclean || exit 1
cd $SRCDIR || exit 1
rm -rf $BUILDDIR || exit 1
......@@ -17,7 +17,7 @@ git clone $SOURCE_TOP . || exit 1
cd $SOURCE_TOP || exit 1
rm -rf ../tarot-*.tar.gz ../tarot-*/ tarot-*.tar.gz
sh autogen.sh || exit 1
sh autogen.sh VALAFLAGS="--target-glib=2.50" || exit 1
./configure \
CFLAGS="-Wall -Wextra -Werror -g -O0 $CFLAGS" \
VALAFLAGS="--target-glib=2.50" \
......@@ -26,9 +26,8 @@ sh autogen.sh || exit 1
|| (cat config.log ; exit 1) \
|| exit 1
make indent || exit 1
(cd lib-library && make -j 16) || exit 1
(cd lib-program && make -j 16) || exit 1
# I don't know exactly which targets are not thread safe...
make || exit 1
make || exit 1
make dist || exit 1
make -j 16 distcheck \
|| (cat "$SOURCE_TOP/tarot-$(cat .version)/_build/sub/test-suite.log" ; exit 1) \
......
......@@ -63,7 +63,6 @@ indent-org: %reldir%/tarot.org
&& mv tarot-indented.org tarot.org)
$(TANGLED): %reldir%/tarot.org %reldir%/setup.el .version
$(MAKE) $(AM_MAKEFLAGS) src/libtarot.la
$(AM_V_GEN) (cd $(srcdir)/%reldir% \
&& LIBTAROT_VERSION="$(VERSION)" \
LD_LIBRARY_PATH="$(abs_top_builddir)/src/.libs:$LD_LIBRARY_PATH" \
......@@ -84,8 +83,7 @@ $(TANGLED): %reldir%/tarot.org %reldir%/setup.el .version
%reldir%/invoke-tarot-body.texi \
%reldir%/invoke-tarot-render-body.texi \
$(dist_tarotfigures_DATA)
$(MAKE) $(AM_MAKEFLAGS) src/libtarot.la
$(AM_V_GEN) $(srcdir)/%reldir%/generate-manual
$(AM_V_GEN) cd $(srcdir) && %reldir%/generate-manual
%reldir%/tarot.xml: %reldir%/tarot.texi
$(AM_V_MAKEINFO) $(MAKEINFO) --docbook -I %reldir% -I $(srcdir)/%reldir% \
......
......@@ -4,6 +4,12 @@
"runtime-version": "18.08",
"sdk": "org.freedesktop.Sdk",
"command": "tarot",
"finish-args": [
"--socket=x11",
"--socket=wayland",
"--socket=fallback-x11",
"--share=ipc"
],
"modules": [
{
"name": "tarot",
......@@ -18,12 +24,6 @@
"--enable-silent-rules=yes",
"--disable-introspection",
"--disable-vala"
],
"finish-args": [
"--socket=x11",
"--socket=wayland",
"--socket=fallback-x11",
"--share=ipc"
]
}
]
......
......@@ -22,8 +22,8 @@ dist_games_DATA = %reldir%/example.xml
EXTRA_DIST += %reldir%/example.xml.png
if WITH_CAIRO
%reldir%/example.xml.png: %reldir%/example.xml src/cairo/tarot-render
$(AM_V_GEN) src/cairo/tarot-render %reldir%/example.xml
%reldir%/example.xml.png: %reldir%/example.xml
$(AM_V_GEN) src/cairo/tarot-render $(srcdir)/%reldir%/example.xml
else # not WITH_CAIRO
%reldir%/example.xml.png: %reldir%/example.xml
echo "You must re-render the game, but you don't have cairo installed."
......
......@@ -28,7 +28,6 @@ dist_vapi_DATA = %reldir%/tarot-1.0.vapi
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --warn-all
VAPIGEN_VAPIS =
EXTRA_DIST += %reldir%/tarot-1.0.vapi.updated
LIBTAROT_VERSION_INFO = 0:0:0
......@@ -111,16 +110,15 @@ introspection_sources = $(include_HEADERS) $(tarotinclude_HEADERS)
INTROSPECTION_GIRS += %reldir%/Tarot-1.0.gir
%reldir%/tarot-gobject.h: %reldir%/tarot-gobject.h.in $(ENUM_HEADER_FILES)
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) \
$(AM_V_GEN) cd $(srcdir) && $(GLIB_MKENUMS) \
--template %reldir%/tarot-gobject.h.in \
$(ENUM_HEADER_FILES) \
> %reldir%/tarot-gobject.h)
> %reldir%/tarot-gobject.h
%reldir%/tarot-gobject.c: %reldir%/tarot-gobject.c.in %reldir%/tarot-gobject.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
$(AM_V_GEN) cd $(srcdir) && $(GLIB_MKENUMS) \
--template %reldir%/tarot-gobject.c.in \
$(ENUM_HEADER_FILES) \
> %reldir%/tarot-gobject.c \
$(ENUM_HEADER_FILES)
> %reldir%/tarot-gobject.c
include $(INTROSPECTION_MAKEFILE)
else # not HAVE_INTROSPECTION
%reldir%/Tarot-1.0.gir: $(include_HEADERS) $(tarotinclude_HEADERS)
......@@ -140,19 +138,14 @@ endif # not HAVE_INTROSPECTION
if ENABLE_VAPIGEN
%reldir%/tarot-1.0.vapi: %reldir%/Tarot-1.0.gir
%reldir%/tarot-1.0.vapi.updated: %reldir%/tarot-1.0.vapi %reldir%/Tarot-1.0.gir
$(AM_V_GEN) touch $(srcdir)/%reldir%/tarot-1.0.vapi.updated && touch %reldir%/tarot-1.0.vapi
%canon_reldir%_tarot_1_0_vapi_FILES = %reldir%/Tarot-1.0.gir
%canon_reldir%_tarot_1_0_vapi_METADATADIRS = $(srcdir)
%canon_reldir%_tarot_1_0_vapi_METADATADIRS = $(srcdir)/%reldir%
VAPIGEN_VAPIS += %reldir%/tarot-1.0.vapi
-include $(VAPIGEN_MAKEFILE)
else #not ENABLE_VAPIGEN
%reldir%/tarot-1.0.vapi: %reldir%/Tarot-1.0.gir
@echo "The Vala bindings need to be rebuilt."
false
%reldir%/tarot-1.0.vapi.updated: %reldir%/tarot-1.0.vapi %reldir%/Tarot-1.0.gir
@echo "The Vala bindings need to be rebuilt."
false
endif #not ENABLE_VAPIGEN
$(%canon_reldir%_tarot_OBJECTS): %reldir%/tarot-opts.h
......
......@@ -23,7 +23,7 @@ EXTRA_DIST += %reldir%/cardpainter-1.0.vapi %reldir%/card_painter.h
%reldir%/cardpainter-1.0.vapi \
%reldir%/card_painter.h: %reldir%/card_painter.vala \
%reldir%/card_painter_default.vala \
src/tarot-1.0.vapi.updated
src/tarot-1.0.vapi
$(AM_V_VALAC) \
cd $(srcdir) \
&& $(MKDIR_P) %reldir%/tarot \
......@@ -34,7 +34,7 @@ EXTRA_DIST += %reldir%/cardpainter-1.0.vapi %reldir%/card_painter.h
-C \
%reldir%/card_painter.vala \
%reldir%/card_painter_default.vala \
src/tarot-1.0.vapi \
$(abs_top_builddir)/src/tarot-1.0.vapi \
&& touch $@
noinst_LTLIBRARIES += \
......
......@@ -67,3 +67,9 @@ else # not WITH_GTK
%canon_reldir%_libtarot_application_la_LIBS += \
$(GOBJECT_LIBS)
endif # not WITH_GTK
if WITH_GTK
if WITH_GOBJECT
src_tarot_SOURCES += %reldir%/tarot-resources.c
endif # WITH_GOBJECT
endif # WITH_GTK
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