1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 12:23:54 +01:00

Fixed compilation on macOS

This commit is contained in:
Anthony Scemama 2021-07-27 14:48:11 +02:00
parent 84e0d480c0
commit c381d5de4b
3 changed files with 7 additions and 15 deletions

View File

@ -1,4 +1,5 @@
#!/bin/bash
set -e
# Check that script is executed from tools directory
if [[ $(basename $PWD) != "tools" ]] ; then
@ -17,11 +18,12 @@ function tangle()
{
local command="(org-babel-tangle-file \"$1\")"
emacs --batch \
--eval "(require 'org)" \
--eval "(org-babel-do-load-languages 'org-babel-load-languages '((python . t)))" \
--eval "(setq org-confirm-babel-evaluate nil)" \
--load=${TOOLS}/emacs/config_tangle.el \
--eval "$command"
}
# --eval "(require 'org)" \
# --eval "(org-babel-do-load-languages 'org-babel-load-languages '((python . t)))" \
# --eval "(setq org-confirm-babel-evaluate nil)" \
# Create trex.json file
cd ${TREXIO_ROOT}

View File

@ -14,6 +14,7 @@
;(setq org-latex-listings t)
;(add-to-list 'org-latex-packages-alist '("" "listings"))
;(add-to-list 'org-latex-packages-alist '("" "color"))
(setq org-babel-python-command "python3")
(require 'subr-x) ;; for `when-let'

View File

@ -31,16 +31,5 @@
(makefile . t)
))
; The following is required to compute the file names
(setq pwd (file-name-directory buffer-file-name))
(setq name (file-name-nondirectory (substring buffer-file-name 0 -4)))
(setq f (concat pwd name "_f.f90"))
(setq fh (concat pwd name "_fh.f90"))
(setq c (concat pwd name ".c"))
(setq h (concat name ".h"))
(setq h_private (concat name "_private.h"))
(setq c_test (concat pwd "test_" name ".c"))
(setq f_test (concat pwd "test_" name "_f.f90"))
(org-babel-lob-ingest "../tools/lib.org")
(setq org-babel-python-command "python3 -q")