10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 04:13:33 +01:00

Fixed Qcaml module

This commit is contained in:
Anthony Scemama 2020-12-29 00:03:01 +01:00
parent 68d022987e
commit 56d151ea36
3 changed files with 37 additions and 50 deletions

View File

@ -12,32 +12,36 @@
* Dune files :noexport:
** Generate dune files
Use [C-c C-c] on the code below to create the output for the dune files
#+header: :noweb strip-export
#+header: :noweb yes
#+header: :var name=(file-name-directory buffer-file-name)
#+header: :var dune="lib/dune"
#+header: :var dunetest="test/dune"
#+header: :var dependencies=dependencies
#+begin_src python :exports none :results output none
name = name.split('/')[-2]
synopsis = """
<<synopsis>>
"""
dependencies = '\n '.join(map(lambda x: x[0], dependencies))
with open(dune,'w') as f:
f.write(f"""
(library
(name {name})
(public_name qcaml.{name})
(synopsis {synopsis} )
<<dependencies>>
(libraries
{dependencies}
)
<<noimplementation>>
<<c-files>>
)
<<lex-yacc>>
""")
""".replace("qcaml.qcaml","qcaml"))
with open(dunetest,'w') as f:
f.write(f"""
@ -49,43 +53,25 @@ with open(dunetest,'w') as f:
qcaml.{name}
)
)
""")
""".replace("qcaml.qcaml","qcaml"))
#+end_src
** Dependencies
#+name: dependencies
#+begin_src elisp
(libraries
qcaml.ao
qcaml.common
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.mo
qcaml.operators
qcaml.particles
qcaml.perturbation
qcaml.simulation
)
#+begin_src sh :output value
grep "public_name" ../*/lib/dune | grep -v "qcaml)" | cut -d ' ' -f 3 | tr ')' ' '
#+end_src
** Modules without implementation
#+name: noimplementation
#+begin_src elisp
#+end_src
** Extra C files
#+begin_src elisp
#+end_src
** Parser files
#+name: lex-yacc
#+begin_src elisp
#+end_src
#+RESULTS: dependencies
| (libraries |
| qcaml.ao |
| qcaml.common |
| qcaml.gaussian |
| qcaml.gaussian_integrals |
| qcaml.linear_algebra |
| qcaml.mo |
| qcaml.operators |
| qcaml.particles |
| qcaml.perturbation |
| qcaml.simulation |
| ) |

View File

@ -1,21 +1,22 @@
(library
(name qcaml)
(public_name qcaml.qcaml)
(public_name qcaml)
(synopsis
"Main QCaml entry point"
)
(libraries
qcaml.ao
qcaml.common
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.mo
qcaml.operators
qcaml.particles
qcaml.perturbation
qcaml.simulation
)
qcaml.ao
qcaml.common
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.linear_algebra
qcaml.mo
qcaml.operators
qcaml.particles
qcaml.perturbation
qcaml.simulation
)
)

View File

@ -4,6 +4,6 @@
(synopsis "Test for qcaml library")
(libraries
alcotest
qcaml.qcaml
qcaml
)
)