mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 10:05:40 +01:00
Fixed Qcaml module
This commit is contained in:
parent
68d022987e
commit
56d151ea36
@ -12,32 +12,36 @@
|
|||||||
|
|
||||||
* Dune files :noexport:
|
* Dune files :noexport:
|
||||||
|
|
||||||
** Generate dune files
|
|
||||||
|
|
||||||
Use [C-c C-c] on the code below to create the output for the 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 name=(file-name-directory buffer-file-name)
|
||||||
#+header: :var dune="lib/dune"
|
#+header: :var dune="lib/dune"
|
||||||
#+header: :var dunetest="test/dune"
|
#+header: :var dunetest="test/dune"
|
||||||
|
#+header: :var dependencies=dependencies
|
||||||
#+begin_src python :exports none :results output none
|
#+begin_src python :exports none :results output none
|
||||||
name = name.split('/')[-2]
|
name = name.split('/')[-2]
|
||||||
synopsis = """
|
synopsis = """
|
||||||
<<synopsis>>
|
<<synopsis>>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
dependencies = '\n '.join(map(lambda x: x[0], dependencies))
|
||||||
|
|
||||||
with open(dune,'w') as f:
|
with open(dune,'w') as f:
|
||||||
f.write(f"""
|
f.write(f"""
|
||||||
(library
|
(library
|
||||||
(name {name})
|
(name {name})
|
||||||
(public_name qcaml.{name})
|
(public_name qcaml.{name})
|
||||||
(synopsis {synopsis} )
|
(synopsis {synopsis} )
|
||||||
<<dependencies>>
|
(libraries
|
||||||
|
{dependencies}
|
||||||
|
)
|
||||||
<<noimplementation>>
|
<<noimplementation>>
|
||||||
<<c-files>>
|
<<c-files>>
|
||||||
)
|
)
|
||||||
<<lex-yacc>>
|
<<lex-yacc>>
|
||||||
""")
|
""".replace("qcaml.qcaml","qcaml"))
|
||||||
|
|
||||||
with open(dunetest,'w') as f:
|
with open(dunetest,'w') as f:
|
||||||
f.write(f"""
|
f.write(f"""
|
||||||
@ -49,43 +53,25 @@ with open(dunetest,'w') as f:
|
|||||||
qcaml.{name}
|
qcaml.{name}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
""")
|
""".replace("qcaml.qcaml","qcaml"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Dependencies
|
|
||||||
|
|
||||||
#+name: dependencies
|
#+name: dependencies
|
||||||
#+begin_src elisp
|
#+begin_src sh :output value
|
||||||
(libraries
|
grep "public_name" ../*/lib/dune | grep -v "qcaml)" | cut -d ' ' -f 3 | tr ')' ' '
|
||||||
qcaml.ao
|
|
||||||
qcaml.common
|
|
||||||
qcaml.gaussian
|
|
||||||
qcaml.gaussian_integrals
|
|
||||||
qcaml.mo
|
|
||||||
qcaml.operators
|
|
||||||
qcaml.particles
|
|
||||||
qcaml.perturbation
|
|
||||||
qcaml.simulation
|
|
||||||
)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Modules without implementation
|
#+RESULTS: dependencies
|
||||||
|
| (libraries |
|
||||||
#+name: noimplementation
|
| qcaml.ao |
|
||||||
#+begin_src elisp
|
| qcaml.common |
|
||||||
#+end_src
|
| qcaml.gaussian |
|
||||||
|
| qcaml.gaussian_integrals |
|
||||||
** Extra C files
|
| qcaml.linear_algebra |
|
||||||
|
| qcaml.mo |
|
||||||
#+begin_src elisp
|
| qcaml.operators |
|
||||||
#+end_src
|
| qcaml.particles |
|
||||||
|
| qcaml.perturbation |
|
||||||
** Parser files
|
| qcaml.simulation |
|
||||||
|
| ) |
|
||||||
#+name: lex-yacc
|
|
||||||
#+begin_src elisp
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
|
|
||||||
(library
|
(library
|
||||||
(name qcaml)
|
(name qcaml)
|
||||||
(public_name qcaml.qcaml)
|
(public_name qcaml)
|
||||||
(synopsis
|
(synopsis
|
||||||
"Main QCaml entry point"
|
"Main QCaml entry point"
|
||||||
)
|
)
|
||||||
(libraries
|
(libraries
|
||||||
qcaml.ao
|
qcaml.ao
|
||||||
qcaml.common
|
qcaml.common
|
||||||
qcaml.gaussian
|
qcaml.gaussian
|
||||||
qcaml.gaussian_integrals
|
qcaml.gaussian_integrals
|
||||||
qcaml.mo
|
qcaml.linear_algebra
|
||||||
qcaml.operators
|
qcaml.mo
|
||||||
qcaml.particles
|
qcaml.operators
|
||||||
qcaml.perturbation
|
qcaml.particles
|
||||||
qcaml.simulation
|
qcaml.perturbation
|
||||||
)
|
qcaml.simulation
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
(synopsis "Test for qcaml library")
|
(synopsis "Test for qcaml library")
|
||||||
(libraries
|
(libraries
|
||||||
alcotest
|
alcotest
|
||||||
qcaml.qcaml
|
qcaml
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user