From 5c98bac31772c89af3630ef76777ace1fabb6b95 Mon Sep 17 00:00:00 2001 From: Christoph Knote Date: Wed, 9 Mar 2022 14:45:06 +0100 Subject: [PATCH] Introduce build script --- .gitlab-ci.yml | 9 +-------- Makefile.am | 6 +++--- build_dist.bash | 11 +++++++++++ doc/Makefile.am | 6 +++--- 4 files changed, 18 insertions(+), 14 deletions(-) create mode 100755 build_dist.bash diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d904812..3920427 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,14 +10,7 @@ build: - DEBIAN_FRONTEND=noninteractive apt-get -qq install wget patch make gcc gfortran flex bison texlive autoconf autotools-dev - "[ -f ./version ] && export VERSION=$(cat ./version)" script: - - aclocal - - autoconf - - automake -a -c - - ./configure --prefix="$CI_PROJECT_DIR/build" - - make - - make install - - make dist - - make distcheck + - . build_dist.bash "$CI_PROJECT_DIR/build" artifacts: name: boxmox-dist-$CI_COMMIT_SHORT_SHA paths: diff --git a/Makefile.am b/Makefile.am index 473c369..b572d85 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,9 +32,6 @@ SUBDIRS = src doc EXTRA_DIST = src/bison.h src/code.h src/gdata.h src/gdef.h src/scan.h -nobase_dist_pkgdata_DATA = drv/boxmox_adjoint.f90 drv/boxmox.f90 -#drv examples case_studies int models util - dist_doc_DATA = README.md dist_bin_SCRIPTS = scripts/list_BOXMOX_mechanisms \ scripts/new_BOXMOX_experiment \ @@ -53,3 +50,6 @@ all-local: @echo "export KPP_HOME=${prefix}" @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 new file mode 100755 index 0000000..f2849ba --- /dev/null +++ b/build_dist.bash @@ -0,0 +1,11 @@ +#!/bin/sh +buildDir=$1 + +aclocal +autoconf +automake -a -c +./configure --prefix="${buildDir}" +make +make install +make dist +make distcheck diff --git a/doc/Makefile.am b/doc/Makefile.am index 8f57b26..9ad867a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,7 +1,7 @@ -doc_DATA = kpp_UserManual.pdf +docfiles = kpp_UserManual.pdf if HAVE_PDFLATEX -doc_DATA += boxmox_UserManual.pdf +docfiles += boxmox_UserManual.pdf boxmox_UserManual.pdf : boxmox_UserManual.tex @pdflatex@ $< @pdflatex@ $< @@ -10,4 +10,4 @@ clean-local: rm -f *.log *.out *.toc *.aux boxmox_UserManual.pdf endif -dist_doc_DATA = $(doc_DATA) \ No newline at end of file +doc_DATA = $(docfiles) \ No newline at end of file -- GitLab