anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit a6fbcae48ea1d9b7da95322c0cfe03c5b995d2dd
parent a973793efdd6bce7e1d872ec506ae047d12aeabc
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Wed, 22 Apr 2026 11:38:33 +0200

build: forgot some build files

Diffstat:
M.gitignore | 7-------
AMakefile.in | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Aconfigure | 255+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 304 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,6 +1,5 @@ *~ Makefile -Makefile.in aclocal.m4 anastasis_config.h anastasis_config.h.in @@ -11,7 +10,6 @@ config.guess config.log config.status config.sub -configure contrib/uncrustify.sh depcomp doc/Makefile @@ -20,7 +18,6 @@ libtool ltmain.sh missing src/Makefile -src/Makefile.in m4/*.m4 po/POTFILES po/Makevars.template @@ -30,15 +27,12 @@ po/stamp-po **/.deps/ **/.libs/ src/stasis/Makefile -src/stasis/Makefile.in src/stasis/libanastasis_plugin_db_postgres.la src/stasis/plugin_anastasis_postgres.lo src/stasis/plugin_anastasis_postgres.o src/stasis/.deps/ src/backend/Makefile -src/backend/Makefile.in src/include/Makefile -src/include/Makefile.in src/testing/test_anastasis_api_home/.local/share/taler/exchange/live-keys/ src/testing/test_anastasis_api_home/.local/share/taler/exchange/revocations/ src/testing/test_anastasis_api_home/.local/share/taler/exchange/wirefees/ @@ -54,7 +48,6 @@ src/lib/*.in **/*.lo **/*.trs **/Makefile -**/Makefile.in stamp-h1 test-driver uncrustify.cfg diff --git a/Makefile.in b/Makefile.in @@ -0,0 +1,49 @@ +# Build the program in the local tree +.PHONY: all +all: + $(NINJA) -C $(mesonbuilddir) + +# Install the program +.PHONY: install +install: all + $(MESON) install -C $(mesonbuilddir) + +# Remove files created during 'all' +.PHONY: clean +clean: + $(NINJA) -C $(mesonbuilddir) -t clean + +# Remove files created during 'install' +.PHONY: uninstall +uninstall: + $(NINJA) uninstall -C $(mesonbuilddir) + +# Make tarball +.PHONY: dist +dist: + $(MESON) dist -C $(mesonbuilddir) --no-tests --formats gztar + +# Make doxygen +.PHONY: doxygen +doxygen: + $(NINJA) -C $(mesonbuilddir) doxygen + +# Run tests +.PHONY: check +check: + $(MESON) test -C $(mesonbuilddir) + +.PHONY: installcheck +installcheck: + $(MESON) test -C $(mesonbuilddir) --suite=installcheck + +.PHONY: integrationtests +integrationtests: + $(MESON) test -C $(mesonbuilddir) --suite=integrationtests + +format: + $(MESON) fmt -i -r . + #find ./src -name "*.[h,c]" | uncrustify -l c -c contrib/conf/uncrustify.cfg -F - --replace --no-backup + +Makefile: Makefile.in + ./config.status diff --git a/configure b/configure @@ -0,0 +1,255 @@ +#!/bin/sh + +pkg_name="anastasis" +pkg_default_features="" +pkg_optional_features="coverage logging only-doc install-rpath" +pkg_optional_dependencies="" + +# DO NOT EDIT BELOW THIS LINE +standard_dirs="prefix exec_prefix bindir sbindir libexecdir sysconfdir sharedstatedir localstatedir runstatedir libdir includedir oldincludedir datarootdir datadir infodir localedir mandir docdir htmldir dvidir pdfdir psdir srcdir mesonbuilddir" +standard_utils="AR AS BISON CC CXX CPP FLEX INSTALL LD LDCONFIG LEX MAKE MAKEINFO RANLIB TEXI2DVI YACC CHGRP CHMOD CHOWN MKNOD RM NINJA MESON" +standard_flags="ARFLAGS BISONFLAGS CFLAGS CXXFLAGS CPPFLAGS FLEXFLAGS INSTALLFLAGS LDFLAGS LDCONFIGFLAGS LFLAGS MAKEFLAGS MAKEINFOFLAGS RANLIBFLAGS TEXI2DVIFLAGS YACCFLAGS CHGRPFLAGS CHMODFLAGS CHOWNFLAGS MKNODFLAGS" +standard_vars="INSTALL_DATA INSTALL_PROGRAM INSTALL_SCRIPT" +generated_comment="# This file was generated by configure. DO NOT edit it directly." + +# Save arguments +cat > config.status <<EOF +#!/bin/sh +$generated_comment +$0 $* +EOF +chmod 755 config.status + +# Parse arguments +oldifs="$IFS" +while [ "$#" -gt "0" ]; do + arg="$1" + shift + argsave="$@" + + IFS="=" + set -- $arg + IFS="$oldifs" + arg="$1" + shift + argparam="$@" + + case "$arg" in + --help|-h) + cat <<-EOF + Usage: $0 [options...] + General options: + + <variable>=<value> Overrides default utils and flags, e.g. CC=gcc + EOF + echo "" + echo "Directory variables:" + for sdir in $standard_dirs; do + echo "--$sdir=<directory>" + done + echo "" + echo "Options specific to $pkg_name:" + for feat in $pkg_optional_features; do + echo "--enable-$feat[=arg]" + done + for feat in $pkg_default_features; do + echo "--disable-$feat" + done + for dep in $pkg_optional_dependencies; do + echo "--with-$dep" + done + + echo + echo Other options will be ignored. Please see the README for additional information. + exit 0 + ;; + --enable-*) + for feat in $pkg_optional_features $pkg_default_features; do + ft=$(echo $feat | tr - _) + if [ "--enable-$feat" = "$arg" ] && [ -z "$argparam" ]; then + eval "enable_$ft=true" + elif [ "--enable-$feat" = "$arg" ]; then + if [ "$argparam" = "yes" ]; then + eval "enable_$ft=\"true\"" + else + eval "enable_$ft=\"$argparam\"" + fi + fi + done + ;; + --disable-*) + argsave="--enable-${arg#--disable-}=false $argsave" + ;; + --with-*) + for dep in $pkg_optional_dependencies; do + if [ "--with-$dep" = "$arg" ] && [ -z "$argparam" ]; then + eval "with_$dep=yes" + elif [ "--with-$dep" = "$arg" ]; then + eval "with_$dep=\"$argparam\"" + fi + done + ;; + --without-*) + argsave="--with-${arg#--without-}=no $argsave" + ;; + --*) + for dir in $standard_dirs; do + [ "--$dir" = "$arg" ] && eval "var_$dir=\"$argparam\"" + done + ;; + *) + for flag in $standard_utils $standard_flags standard_vars; do + [ "$flag" = "$arg" ] && eval "$flag=\"$argparam\"" + done + ;; + esac + + set -- $argsave +done + +# Set default values +for util in $standard_utils; do + case "$util" in + CPP) eval "$util=\"\${${util}:-\\\$(CC) -E}\"" ;; + CXX) eval "$util=\"\${${util}:-g++}\"" ;; + RM) eval "$util=\"\${${util}:-rm -f}\"" ;; + MESON) eval "$util=\"\${${util}:-meson}\"" ;; + NINJA) eval "$util=\"\${${util}:-ninja}\"" ;; + *) eval "$util=\"\${${util}:-${util}}\"" ;; + esac +done +for feat in $pkg_optional_features; do + ft=$(echo $feat | tr - _) + eval "enable_$ft=\${enable_$ft:-false}" +done +for feat in $pkg_default_features; do + eval "enable_$feat=\${enable_$feat:-true}" +done +for feat in $pkg_optional_dependencies; do + eval "with_$feat=\${with_$feat:-no}" +done + +# Find source files +if [ -z "$var_srcdir" ]; then + [ -f ../Makefile.in ] && var_srcdir=.. + [ -f ./Makefile.in ] && var_srcdir=. +fi +if [ -z "$var_srcdir" ]; then + echo "Source files not found. Please specify a directory using --srcdir=..." >&2 + exit 1 +fi + +# Write Makefile +cat > Makefile <<EOF +$generated_comment +SHELL = /bin/sh +VPATH = ${var_srcdir} + +mesonbuilddir = ${var_mesonbuilddir:-build} +srcdir = ${var_srcdir} +prefix = ${var_prefix:-/usr/local} +exec_prefix = ${var_exec_prefix:-\$(prefix)} +bindir = ${var_bindir:-\$(exec_prefix)/bin} +sbindir = ${var_sbindir:-\$(exec_prefix)/sbin} +libexecdir = ${var_libexecdir:-\$(exec_prefix)/libexec} +datarootdir = ${var_datarootdir:-\$(prefix)/share} +datadir = ${var_datadir:-\$(datarootdir)} +sysconfdir = ${var_sysconfdir:-\$(prefix)/etc} +sharedstatedir = ${var_sharedstatedir:-\$(prefix)/com} +localstatedir = ${var_localstatedir:-\$(prefix)/var} +runstatedir = ${var_runstatedir:-\$(localstatedir)/run} +includedir = ${var_includedir:-\$(prefix)/include} +oldincludedir = ${var_oldincludedir:-/usr/include} +docdir = ${var_docdir:-\$(datarootdir)/doc/"$pkg_name"} +infodir = ${var_infodir:-\$(datarootdir)/info} +htmldir = ${var_htmldir:-\$(docdir)} +dvidir = ${var_dvidir:-\$(docdir)} +pdfdir = ${var_pdfdir:-\$(docdir)} +psdir = ${var_psdir:-\$(docdir)} +libdir = ${var_libdir:-\$(exec_prefix)/lib} +lispdir = ${var_lispdir:-\$(datarootdir)/emacs/site-lisp} +localedir = ${var_localedir:-\$(datarootdir)/locale} +mandir = ${var_mandir:-\$(datarootdir)/man} +manext = .1 +EOF + +if [ -d ${var_mesonbuilddir:-build} ]; then + echo "${var_mesonbuilddir:-build} already exists, deleting with" + $RM -r ${var_mesonbuilddir:-build} || exit 1 +fi + +for var in $standard_utils $standard_flags $standard_vars; do + eval "echo \"${var} = \$${var}\" >> Makefile" +done +echo >> Makefile + +mesonfeatopts="" +for feat in $pkg_optional_features $pkg_default_features; do + ft=$(echo $feat | tr - _) + eval "echo \"enable_$ft=\${enable_$ft}\" >> Makefile" + if [ "coverage" = $feat ]; then + mfeat="b_$feat" + else + mfeat=$feat + fi + eval "mesonfeatopts=\"$mesonfeatopts -D$mfeat=\${enable_$ft}\"" +done +for dep in $pkg_optional_dependencies; do + eval "echo \"with_$dep=\${with_$dep}\" >> Makefile" +done +echo >> Makefile + +cat "${var_srcdir}/Makefile.in" >> Makefile + +# Create default targets, if not already present +default_target() { + grep "^$1:" Makefile >/dev/null && return + echo ".PHONY: $1" >> Makefile + echo "$1: $2" >> Makefile + cat >> Makefile + echo >> Makefile +} + +#default_target Makefile <<EOF +# ./config.status +#EOF +for format in html dvi pdf ps; do + default_target "$format" </dev/null + default_target "install-$format" "$format" </dev/null +done +default_target check </dev/null +default_target mostlyclean clean </dev/null +default_target distclean clean <<EOF + \$(RM) Makefile config.status +EOF +default_target maintainer-clean distclean </dev/null +default_target install-strip <<EOF + \$(MAKE) INSTALL_PROGRAM='\$(INSTALL_PROGRAM) -s' \\ + INSTALL_SCRIPT='\$(INSTALL_SCRIPT)' install +EOF + +mesondiropts="" +for dr in $standard_dirs; do + if [ $dr = "srcdir" ]; then + continue + fi + if [ $dr = "mesonbuilddir" ]; then + continue + fi + eval "vn=\${var_$dr}" + if [ ! -z $vn ]; then + eval "mesondiropts=\"$mesondiropts -D$dr=\${var_$dr}\"" + fi +done + +${MESON} setup \ + -Ddefault_library=shared \ + $mesondiropts \ + $mesonfeatopts \ + ${var_mesonbuilddir:-build} \ + ${var_srcdir} || exit 1 + +# Done +echo "Package $pkg_name configured successfully." +echo "Run 'make' to build and 'make install' to install the package" +