From 8153b84c7be24c73c3bbc77deed9aaf67c8ad07e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sun, 7 Mar 2021 00:58:17 +0100 Subject: [PATCH] Working on configure.org --- .gitignore | 11 ++++ .gitmodules | 3 + configure.org | 137 +++++++++++++++++++++++++++++++++++++++++++ docs/org-html-themes | 1 + src/qmckl.org | 2 + 5 files changed, 154 insertions(+) create mode 100644 .gitignore create mode 100644 configure.org create mode 160000 docs/org-html-themes diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c7cf3cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +docs/index.html +docs/htmlize.el +autom4te.cache/ +config.log +config.status +src/auto/ +src/ltximg/ +src/qmckl.mod +*.swp + + diff --git a/.gitmodules b/.gitmodules index 8ad4907..6d6dce9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "munit"] path = munit url = https://github.com/nemequ/munit/ +[submodule "docs/org-html-themes"] + path = docs/org-html-themes + url = https://github.com/fniessen/org-html-themes.git diff --git a/configure.org b/configure.org new file mode 100644 index 0000000..010d101 --- /dev/null +++ b/configure.org @@ -0,0 +1,137 @@ +#+TITLE: QMCkl configuration + +This files contains al the information to generate the files required +by Autotools to build the =configure= script for the library. + +* Scripts analyzing source code + +** Version of the library + + #+NAME: version + #+BEGIN_SRC sh +echo 1.0 + #+END_SRC + + #+RESULTS: version + : 1.0 + + #+NAME: issues + #+BEGIN_SRC sh +echo "https://github.com/TREX-CoE/qmckl/issues" + #+END_SRC + + #+RESULTS: issues + : https://github.com/TREX-CoE/qmckl/issues + + #+NAME: website + #+BEGIN_SRC sh +echo "https://trex-coe.github.io/qmckl/index.html" + #+END_SRC + + #+RESULTS: website + : https://trex-coe.github.io/qmckl/index.html + + + #+NAME: revision + #+BEGIN_SRC sh +git log --oneline | head -1 + #+END_SRC + + #+RESULTS: revision + : 5f2da3e Fixed website + +** C Header files + + #+NAME: headers + #+BEGIN_SRC sh :tangle no +#grep --regexp="\#include\\s+<.*>" --no-filename src/*.org \ +grep --regexp="\#include\\s*<.*>" --no-filename src/*.org \ + | sort \ + | uniq \ + | cut -d '<' -f 2 \ + | cut -d '>' -f 1 \ + | tr '\n' ' ' + #+END_SRC + + #+RESULTS: headers + : assert.h errno.h math.h stdint.h stdlib.h string.h + + +* configure.ac + +** Initialization + + #+BEGIN_SRC sh :noweb yes :tangle configure.ac +# This file was generated from the org-mode file configure.org + +VERSION=[<>] +AC_SUBST([VERSION]) + +AC_REVISION([<>]) +AC_INIT([QMCkl],[<>], + [<>], [], + [<>]) + #+END_SRC + +** Source files + #+BEGIN_SRC sh :noweb yes :tangle configure.ac +AC_CONFIG_SRCDIR([src/README.org]) + #+END_SRC + +** C Compiler + + #+BEGIN_SRC sh :noweb yes :tangle configure.ac +AC_LANG_PUSH([C]) +AC_PROG_CC + +AC_CHECK_HEADERS([<>]) + #+END_SRC + +** Fortran Compiler + + #+BEGIN_SRC sh :noweb yes :tangle configure.ac +AC_PROG_FC([ifort gfortran flang],[Fortran]) +AC_PROG_FC_C_O +AC_FC_SRCEXT([f90]) +AC_FC_FREEFORM + #+END_SRC + +** External libraries + + #+BEGIN_SRC sh :tangle configure.ac +AC_CHECK_HEADER([munit/munit.h], [echo found], [echo not found] ) + +AC_CHECK_LIB([pthread], [pthread_create]) + +AC_SEARCH_LIBS([dgemm], [blas mkl], + [], + AC_MSG_ERROR([Unable to find a BLAS library]) + ]) + #+END_SRC + +** Makefile + + #+BEGIN_SRC sh :tangle configure.ac +AC_CONFIG_FILES(Makefile) + #+END_SRC + +** Library + + #+BEGIN_SRC sh :tangle configure.ac + + #+END_SRC + +** Documentation + + #+BEGIN_SRC sh :noweb yes :tangle configure.ac +AC_CHECK_PROGS([HAS_EMACS],[emacs],[]) + #+END_SRC + +** Finalization + + #+BEGIN_SRC sh :tangle configure.ac +AC_OUTPUT + #+END_SRC + +* Makefile.am + diff --git a/docs/org-html-themes b/docs/org-html-themes new file mode 160000 index 0000000..f7224a4 --- /dev/null +++ b/docs/org-html-themes @@ -0,0 +1 @@ +Subproject commit f7224a489462abc2c2174edbf7d4e82c0e276183 diff --git a/src/qmckl.org b/src/qmckl.org index 985f848..22cd3aa 100644 --- a/src/qmckl.org +++ b/src/qmckl.org @@ -3,6 +3,7 @@ The =qmckl.h= header file has to be included in <<>> codes when QMCkl functions are used: + #+BEGIN_SRC C :tangle none #include "qmckl.h" #+END_SRC f90 @@ -11,6 +12,7 @@ In <<>> programs, the =qmckl_f.f90= interface file should be included in the source code using the library, and the Fortran codes should use the ~qmckl~ module as + #+BEGIN_SRC f90 :tangle none use qmckl #+END_SRC f90