From d9b1270ad1e2a2069423d0233ed6d0002533b121 Mon Sep 17 00:00:00 2001 From: Christoph Knote Date: Thu, 10 Mar 2022 16:36:45 +0100 Subject: [PATCH] Add dist file includes automatisation. --- Makefile.am => Makefile.am_BLUEPRINT | 4 +--- build_dist.bash | 10 ++++++++++ configure.ac | 2 +- doc/Makefile.am | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) rename Makefile.am => Makefile.am_BLUEPRINT (93%) diff --git a/Makefile.am b/Makefile.am_BLUEPRINT similarity index 93% rename from Makefile.am rename to Makefile.am_BLUEPRINT index b572d85..43f37f2 100644 --- a/Makefile.am +++ b/Makefile.am_BLUEPRINT @@ -32,7 +32,7 @@ SUBDIRS = src doc EXTRA_DIST = src/bison.h src/code.h src/gdata.h src/gdef.h src/scan.h -dist_doc_DATA = README.md +dist_doc_DATA = README.md doc/kpp_UserManual.pdf dist_bin_SCRIPTS = scripts/list_BOXMOX_mechanisms \ scripts/new_BOXMOX_experiment \ scripts/new_BOXMOX_experiment_from_example \ @@ -51,5 +51,3 @@ all-local: @echo "export PATH=\$$KPP_HOME/bin:\$$KPP_HOME/boxmox/bin:\$$PATH" @echo " " -nobase_dist_pkgdata_DATA = drv/boxmox_adjoint.f90 drv/boxmox.f90 -#drv examples case_studies int models util diff --git a/build_dist.bash b/build_dist.bash index f2849ba..759803c 100755 --- a/build_dist.bash +++ b/build_dist.bash @@ -1,6 +1,16 @@ #!/bin/sh buildDir=$1 +# fancy shit: no wildcards in automake, add all files to be distributed with BOXMOX/KPP explicitly +cp Makefile.am_BLUEPRINT Makefile.am + +# list all files in these subdirectories +distFiles=$(find drv examples case_studies int models util -type file) + +#pretty print them 45 char wide dd tab, backslash at end remove backslash last line remove tab first line +printf 'nobase_dist_pkgdata_DATA = %s\n' "${distFiles[*]}" | fmt -w 45 | sed -e 's/\(.*\)$/\t\1 \\/g' | sed '$ s/\\//g' | sed '1 s/\t//g' >> Makefile.am + +# now standard: aclocal autoconf automake -a -c diff --git a/configure.ac b/configure.ac index 4c9dcfc..7aa143d 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl Finally run make to generate the project. AC_INIT([boxmox], [1.8], [christoph.knote@med.uni-augsburg.de]) dnl we use the build type foreign here instead of gnu because I do not have a NEWS file and similar, yet. -AM_INIT_AUTOMAKE([-Wall foreign]) +AM_INIT_AUTOMAKE([-Wall foreign tar-ustar]) AC_PROG_CC AC_PROG_LEX(noyywrap) AC_PROG_YACC diff --git a/doc/Makefile.am b/doc/Makefile.am index bfe48ef..98bf4e1 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,4 @@ -docfiles = kpp_UserManual.pdf +docfiles = if HAVE_PDFLATEX docfiles += boxmox_UserManual.pdf -- GitLab