From 36293d892e6961a65006b193719dc9fcf213693c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 3 Jun 2021 01:32:50 +0200 Subject: [PATCH] Clean configure --- .gitignore | 40 ++++++++++++++++++++-------------------- Makefile.am | 2 +- configure.ac | 21 ++++++++------------- org/.gitignore | 1 + org/qmckl_ao.org | 2 +- pkgconfig/qmckl.pc.in | 6 +++--- tools/build_doc.sh | 5 +++-- tools/build_makefile.py | 4 ++-- tools/tangle.sh | 5 +++-- tools/theme.setup | 2 +- 10 files changed, 43 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index 96b7a1b..61f6fbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,10 @@ +*.la +*.lo .deps/ -compile -depcomp -generated.mk -stamp-h1 -libtool -ltmain.sh -missing -m4/libtool.m4 -m4/ltoptions.m4 -m4/ltsugar.m4 -m4/ltversion.m4 -m4/lt~obsolete.m4 +.dirstamp +.libs Makefile +Makefile.in aclocal.m4 autom4te.cache/ config.guess @@ -19,13 +12,20 @@ config.log config.status config.sub configure -install-sh -qmckl.pc -Makefile.in -test-driver -.libs -.dirstamp -*.la -*.lo +generated.mk +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 qmckl-*.tar.gz qmckl.mod +qmckl.pc +stamp-h1 +tools/compile +tools/depcomp +tools/install-sh +tools/libtool +tools/ltmain.sh +tools/missing +tools/test-driver diff --git a/Makefile.am b/Makefile.am index b911ad8..110ff8a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,7 +159,7 @@ tests/chbrclf.h: $(qmckl_h) generated.mk: $(ORG_FILES) - python $(srcdir)/tools/build_makefile.py + $(PYTHON) $(srcdir)/tools/build_makefile.py cppcheck: cppcheck.out diff --git a/configure.ac b/configure.ac index 7a6c365..c313f56 100644 --- a/configure.ac +++ b/configure.ac @@ -38,13 +38,13 @@ AC_PREREQ([2.69]) AC_INIT([qmckl],[0.1.1], [https://github.com/TREX-CoE/qmckl/issues], [], [https://trex-coe.github.io/qmckl/index.html]) +AC_CONFIG_AUX_DIR(tools) AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests silent-rules 1.11]) AM_MAINTAINER_MODE() LT_INIT AC_CONFIG_SRCDIR([Makefile.in]) AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_MACRO_DIR([m4]) -#AM_MAINTAINER_MODE VERSION_MAJOR=`echo ${PACKAGE_VERSION} | cut -d. -f1` VERSION_MINOR=`echo ${PACKAGE_VERSION} | cut -d. -f2` @@ -64,6 +64,9 @@ AC_LANG(C) # Checks for programs. AC_PROG_CC +# Make sure the c compiler supports C99 +m4_version_prereq([2.70],[], [AC_PROG_CC_C99]) +AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([The compiler does not support C99])]) AC_PROG_CC_C_O AC_PROG_FC AC_PROG_FC_C_O @@ -72,13 +75,10 @@ AC_FC_FREEFORM AC_PROG_LIBTOOL AC_PROG_INSTALL AC_PROG_LN_S -AC_PROG_CC_C99 PKG_PROG_PKG_CONFIG([]) PKG_LIBS="" PKG_CFLAGS="" -AC_SUBST([HAS_CPPCHECK]) - # Checks for libraries. AC_FC_LIBRARY_LDFLAGS @@ -178,15 +178,8 @@ if test "x${QMCKL_DEVEL}" != "x"; then QMCKL_DEVEL=" -- Developer mode" AC_PROG_AWK - AC_CHECK_PROGS([PYTHON],[python python3 python2],[no]) - if test x${PYTHON} == xno ; then - AC_MSG_ERROR([ - -------------------------------------------- - Error: Python is required to build makefiles - -------------------------------------------- - ]) - fi - python ${srcdir}/tools/build_makefile.py + AM_PATH_PYTHON + ${PYTHON} ${srcdir}/tools/build_makefile.py AC_CHECK_PROGS([EMACS],[emacs26 emacs],[no]) if test x${EMACS} == xno ; then @@ -211,6 +204,8 @@ LIBS="${LAPACK_LIBS} ${BLAS_LIBS} ${LIBS}" PKG_LIBS="${PKG_LIBS} ${LIBS}" AC_SUBST([PKG_LIBS]) AC_SUBST([PKG_CFLAGS]) +AC_SUBST([HAS_CPPCHECK]) + AC_CONFIG_FILES([Makefile pkgconfig/qmckl.pc diff --git a/org/.gitignore b/org/.gitignore index e0963f0..931ace3 100644 --- a/org/.gitignore +++ b/org/.gitignore @@ -1,2 +1,3 @@ +ltximg/ *.tangled *.exported diff --git a/org/qmckl_ao.org b/org/qmckl_ao.org index 906bf17..06565aa 100644 --- a/org/qmckl_ao.org +++ b/org/qmckl_ao.org @@ -94,6 +94,7 @@ int main() { | ~shell_factor~ | ~[shell_num]~ | Normalization factor for each shell | | ~exponent~ | ~[prim_num]~ | Array of exponents | | ~coefficient~ | ~[prim_num]~ | Array of coefficients | + | ~prim_factor~ | ~[prim_num]~ | Normalization factors of the primtives | For H_2 with the following basis set, @@ -1661,7 +1662,6 @@ end function test_qmckl_ao_gaussian_vgl #+end_src ** TODO Slater basis functions - ** TODO Radial functions on a grid * Combining radial and polynomial parts * End of files :noexport: diff --git a/pkgconfig/qmckl.pc.in b/pkgconfig/qmckl.pc.in index 0d82f6b..a629932 100644 --- a/pkgconfig/qmckl.pc.in +++ b/pkgconfig/qmckl.pc.in @@ -7,7 +7,7 @@ Name: @PACKAGE_NAME@ Description: Quantum Monte Carlo kernel library URL: https://github.com/trex-coe/qmckl Version: @PACKAGE_VERSION@ -Cflags: -I${includedir} @PKG_CFLAGS@ -Libs: -L${libdir} -lqmckl @PKG_LIBS@ -Requires: @PKG_BLAS@ +Cflags: -I${includedir} +Libs: -L${libdir} -lqmckl +Libs.private: @PKG_LIBS@ diff --git a/tools/build_doc.sh b/tools/build_doc.sh index 389e3f3..37935dd 100755 --- a/tools/build_doc.sh +++ b/tools/build_doc.sh @@ -19,7 +19,7 @@ function extract_doc() html=${DOCS}/html/$(basename ${org%.org}.html) text=${DOCS}/text/$(basename ${org%.org}.txt) - ./missing emacs --batch \ + ./tools/missing emacs --batch \ --load ${HTMLIZE} \ --load ${CONFIG_DOC} \ ${org} \ @@ -34,8 +34,9 @@ function extract_doc() for i in $@ do exported=${i%.org}.exported + exported=$(dirname $exported)/.$(basename $exported) NOW=$(date +"%m%d%H%M.%S") - extract_doc ${i} &> $exported + extract_doc ${i} > $exported # Make log file older than the exported files touch -t ${NOW} $exported diff --git a/tools/build_makefile.py b/tools/build_makefile.py index 5290b3f..6f1f30f 100755 --- a/tools/build_makefile.py +++ b/tools/build_makefile.py @@ -33,8 +33,8 @@ def main(): for org in glob("org/*.org"): i = org.split('/')[-1].rsplit(".",1)[0] - tangled = "org/"+i+".tangled" - exported = "org/"+i+".exported" + tangled = "org/."+i+".tangled" + exported = "org/."+i+".exported" c_test_x = "tests/test_"+i c_test_o = "tests/test_"+i+".$(OBJEXT)" f_test_o = "tests/test_"+i+"_f.$(OBJEXT)" diff --git a/tools/tangle.sh b/tools/tangle.sh index a94189d..0f28038 100755 --- a/tools/tangle.sh +++ b/tools/tangle.sh @@ -24,7 +24,7 @@ function tangle() elif [[ ${org_file} -ot ${f_file} ]] ; then return fi - ./missing \ + ./tools/missing \ emacs --batch ${org_file} \ --load=${PWD}/tools/config_tangle.el \ -f org-babel-tangle @@ -33,8 +33,9 @@ function tangle() for i in $@ do tangled=${i%.org}.tangled + tangled=$(dirname $tangled)/.$(basename $tangled) NOW=$(date +"%m%d%H%M.%S") - tangle ${i} &> $tangled + tangle ${i} > $tangled # Make log file older than the tangled files touch -t ${NOW} $tangled diff --git a/tools/theme.setup b/tools/theme.setup index 3c46c18..156662b 100644 --- a/tools/theme.setup +++ b/tools/theme.setup @@ -6,7 +6,7 @@ #+INFOJS_OPT: toc:t mouse:underline path:org-info.js #+HTML_HEAD: -#+STARTUP: align fold nodlcheck hidestars oddeven lognotestate +#+STARTUP: align fold nodlcheck hidestars oddeven lognotestate latexpreview #+AUTHOR: TREX CoE #+LANGUAGE: en