From 7f189484b5bcfaf65e2c74b0f7751e78cc0a5e57 Mon Sep 17 00:00:00 2001 From: Christoph Knote Date: Thu, 10 Mar 2022 17:22:03 +0100 Subject: [PATCH] Build doc during dist creation, not after --- .gitignore | 7 ++++++ Makefile.am_BLUEPRINT | 4 ++-- build_dist.sh | 50 +++++++++++++++++++++++++++++++++++++++++++ configure.ac | 6 ------ doc/Makefile.am | 13 ----------- 5 files changed, 59 insertions(+), 21 deletions(-) delete mode 100644 doc/Makefile.am diff --git a/.gitignore b/.gitignore index 350d7a7..4da6f69 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,13 @@ build src/kpp boxmox*.tar.gz +doc/boxmox*toc +doc/boxmox*aux +doc/boxmox*log +doc/boxmox*pdf + +**~ + # bc we create this automatically using build_dist.sh Makefile.am diff --git a/Makefile.am_BLUEPRINT b/Makefile.am_BLUEPRINT index 43f37f2..acfde1c 100644 --- a/Makefile.am_BLUEPRINT +++ b/Makefile.am_BLUEPRINT @@ -29,10 +29,10 @@ # ####################################################################################### -SUBDIRS = src doc +SUBDIRS = src EXTRA_DIST = src/bison.h src/code.h src/gdata.h src/gdef.h src/scan.h -dist_doc_DATA = README.md doc/kpp_UserManual.pdf +dist_doc_DATA = README.md doc/kpp_UserManual.pdf doc/boxmox_UserManual.pdf dist_bin_SCRIPTS = scripts/list_BOXMOX_mechanisms \ scripts/new_BOXMOX_experiment \ scripts/new_BOXMOX_experiment_from_example \ diff --git a/build_dist.sh b/build_dist.sh index 3d07a80..ac6c3cb 100755 --- a/build_dist.sh +++ b/build_dist.sh @@ -1,6 +1,10 @@ #!/bin/sh buildDir=$1 +echo +echo " --- prep Makefile.am ---" +echo + # fancy shit: no wildcards in automake, add all files to be distributed with BOXMOX/KPP explicitly cp Makefile.am_BLUEPRINT Makefile.am @@ -10,12 +14,58 @@ distFiles=$(find drv examples case_studies int models util -type f) #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 +echo +echo " --- build documentation ---" +echo + +cd doc +pdflatex boxmox_UserManual +pdflatex boxmox_UserManual +cd .. + # now standard: + +echo +echo " --- aclocal ---" +echo aclocal + +echo +echo " --- autoconf ---" +echo autoconf + +echo +echo " --- automake ---" +echo automake -a -c + +echo +echo " --- makec maintainer-clean ---" +echo +make maintainer-clean + +echo +echo " --- configure ---" +echo ./configure --prefix="${buildDir}" + +echo +echo " --- make ---" +echo make + +echo +echo " --- make install ---" +echo make install + +echo +echo " --- make dist ---" +echo make dist + +echo +echo " --- make distcheck ---" +echo make distcheck diff --git a/configure.ac b/configure.ac index f67f5d2..f48d209 100644 --- a/configure.ac +++ b/configure.ac @@ -8,14 +8,8 @@ AM_INIT_AUTOMAKE([-Wall foreign tar-pax]) AC_PROG_CC AC_PROG_LEX(noyywrap) AC_PROG_YACC -AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex) -if test -z "$PDFLATEX"; then - AC_MSG_WARN([Unable to create PDF version of the user manual.]) -fi -AM_CONDITIONAL([HAVE_PDFLATEX], test -n "$PDFLATEX") AC_CONFIG_FILES([ Makefile src/Makefile - doc/Makefile ]) AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index ec5427f..0000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -docfiles = - -if HAVE_PDFLATEX -docfiles += boxmox_UserManual.tex boxmox_UserManual.pdf -boxmox_UserManual.pdf : boxmox_UserManual.tex - @PDFLATEX@ $< - @PDFLATEX@ $< - -clean-local: - rm -f *.log *.out *.toc *.aux boxmox_UserManual.pdf -endif - -doc_DATA = $(docfiles) \ No newline at end of file -- GitLab