mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-07-03 01:46:12 +02:00
Fix htmlize
This commit is contained in:
parent
59d56f6b27
commit
8882b4b3d4
|
@ -116,7 +116,7 @@ clean:
|
|||
- $(RM) test_qmckl_* test_qmckl.c \
|
||||
$(qmckl_h) $(qmckl_f) \
|
||||
qmckl_*.f90 qmckl_*.c qmckl_*.h \
|
||||
Makefile.generated *.html
|
||||
Makefile.generated *.html
|
||||
|
||||
Makefile.generated: Makefile $(QMCKL_ROOT)/tools/create_makefile.sh $(ORG_SOURCE_FILES)
|
||||
$(QMCKL_ROOT)/tools/create_makefile.sh
|
||||
|
|
|
@ -69,7 +69,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#+begin_src makefile
|
||||
# <<header()>>
|
||||
|
||||
.POSIX:
|
||||
.POSIX:
|
||||
#+end_src
|
||||
** Dependencies
|
||||
|
||||
|
@ -188,7 +188,7 @@ clean:
|
|||
- $(RM) test_qmckl_* test_qmckl.c \
|
||||
$(qmckl_h) $(qmckl_f) \
|
||||
qmckl_*.f90 qmckl_*.c qmckl_*.h \
|
||||
Makefile.generated *.html
|
||||
Makefile.generated *.html
|
||||
|
||||
Makefile.generated: Makefile $(QMCKL_ROOT)/tools/create_makefile.sh $(ORG_SOURCE_FILES)
|
||||
$(QMCKL_ROOT)/tools/create_makefile.sh
|
||||
|
@ -325,7 +325,7 @@ shared_lib=\$(QMCKL_ROOT)/lib/libqmckl.so
|
|||
static_lib=\$(QMCKL_ROOT)/lib/libqmckl.a
|
||||
qmckl_h=\$(QMCKL_ROOT)/include/qmckl.h
|
||||
qmckl_f=\$(QMCKL_ROOT)/share/qmckl/fortran/qmckl_f.f90
|
||||
munit=\$(QMCKL_ROOT)/munit/munit.c
|
||||
munit=\$(QMCKL_ROOT)/munit/munit.c
|
||||
|
||||
shared: \$(shared_lib)
|
||||
static: \$(static_lib)
|
||||
|
@ -489,13 +489,13 @@ EOF
|
|||
:END:
|
||||
|
||||
First define readonly global variables.
|
||||
|
||||
|
||||
#+begin_src bash :noweb yes
|
||||
readonly DOCS=${QMCKL_ROOT}/docs/
|
||||
readonly SRC=${QMCKL_ROOT}/src/
|
||||
readonly HTMLIZE=${DOCS}/htmlize.el
|
||||
readonly CONFIG_DOC=${QMCKL_ROOT}/tools/config_doc.el
|
||||
readonly CONFIG_TANGLE=${QMCKL_ROOT}/tools/config_tangle.el
|
||||
readonly CONFIG_DOC=${QMCKL_ROOT}/tools/config_doc.el
|
||||
readonly CONFIG_TANGLE=${QMCKL_ROOT}/tools/config_tangle.el
|
||||
#+end_src
|
||||
|
||||
Check that all the defined global variables correspond to files.
|
||||
|
@ -517,7 +517,7 @@ function check_preconditions()
|
|||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
for file in ${CONFIG_DOC} ${CONFIG_TANGLE}
|
||||
do
|
||||
if [[ ! -f ${file} ]]
|
||||
|
@ -537,7 +537,7 @@ function install_htmlize()
|
|||
{
|
||||
local url="https://github.com/hniksic/emacs-htmlize"
|
||||
local repo="emacs-htmlize"
|
||||
|
||||
|
||||
[[ -f ${HTMLIZE} ]] || (
|
||||
cd ${DOCS}
|
||||
git clone ${url} \
|
||||
|
@ -558,8 +558,8 @@ function install_htmlize()
|
|||
function extract_doc()
|
||||
{
|
||||
local org=$1
|
||||
local local_html=${SRC}/${org%.org}.html
|
||||
local html=${DOCS}/${org%.org}.html
|
||||
local local_html=${SRC}/${org%.org}.html
|
||||
local html=${DOCS}/${org%.org}.html
|
||||
|
||||
if [[ -f ${html} && ${org} -ot ${html} ]]
|
||||
then
|
||||
|
@ -570,23 +570,21 @@ function extract_doc()
|
|||
--load ${CONFIG_DOC} \
|
||||
${org} \
|
||||
--load ${CONFIG_TANGLE} \
|
||||
-f org-html-export-to-html
|
||||
-f org-html-export-to-html
|
||||
mv ${local_html} ${DOCS}
|
||||
|
||||
}
|
||||
#+end_src
|
||||
|
||||
The main function of the script.
|
||||
|
||||
|
||||
#+begin_src bash :noweb yes
|
||||
function main() {
|
||||
|
||||
[[ check_preconditions ]] \
|
||||
|| exit 1
|
||||
|
||||
|
||||
check_preconditions || exit 1
|
||||
|
||||
# Install htmlize if needed
|
||||
[[ install_htmlize ]] \
|
||||
|| exit 2
|
||||
install_htmlize || exit 2
|
||||
|
||||
# Create documentation
|
||||
cd ${SRC} \
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
# :END:
|
||||
|
||||
# First define readonly global variables.
|
||||
|
||||
|
||||
|
||||
readonly DOCS=${QMCKL_ROOT}/docs/
|
||||
readonly SRC=${QMCKL_ROOT}/src/
|
||||
readonly HTMLIZE=${DOCS}/htmlize.el
|
||||
readonly CONFIG_DOC=${QMCKL_ROOT}/tools/config_doc.el
|
||||
readonly CONFIG_DOC=${QMCKL_ROOT}/tools/config_doc.el
|
||||
readonly CONFIG_TANGLE=${QMCKL_ROOT}/tools/config_tangle.el
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ function check_preconditions()
|
|||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
for file in ${CONFIG_DOC} ${CONFIG_TANGLE}
|
||||
do
|
||||
if [[ ! -f ${file} ]]
|
||||
|
@ -55,7 +55,7 @@ function install_htmlize()
|
|||
{
|
||||
local url="https://github.com/hniksic/emacs-htmlize"
|
||||
local repo="emacs-htmlize"
|
||||
|
||||
|
||||
[[ -f ${HTMLIZE} ]] || (
|
||||
cd ${DOCS}
|
||||
git clone ${url} \
|
||||
|
@ -77,8 +77,8 @@ function install_htmlize()
|
|||
function extract_doc()
|
||||
{
|
||||
local org=$1
|
||||
local local_html=${SRC}/${org%.org}.html
|
||||
local html=${DOCS}/${org%.org}.html
|
||||
local local_html=${SRC}/${org%.org}.html
|
||||
local html=${DOCS}/${org%.org}.html
|
||||
|
||||
if [[ -f ${html} && ${org} -ot ${html} ]]
|
||||
then
|
||||
|
@ -89,7 +89,7 @@ function extract_doc()
|
|||
--load ${CONFIG_DOC} \
|
||||
${org} \
|
||||
--load ${CONFIG_TANGLE} \
|
||||
-f org-html-export-to-html
|
||||
-f org-html-export-to-html
|
||||
mv ${local_html} ${DOCS}
|
||||
|
||||
}
|
||||
|
@ -100,13 +100,11 @@ function extract_doc()
|
|||
|
||||
|
||||
function main() {
|
||||
|
||||
[[ check_preconditions ]] \
|
||||
|| exit 1
|
||||
|
||||
|
||||
check_preconditions || exit 1
|
||||
|
||||
# Install htmlize if needed
|
||||
[[ install_htmlize ]] \
|
||||
|| exit 2
|
||||
install_htmlize || exit 2
|
||||
|
||||
# Create documentation
|
||||
cd ${SRC} \
|
||||
|
|
|
@ -85,7 +85,7 @@ shared_lib=\$(QMCKL_ROOT)/lib/libqmckl.so
|
|||
static_lib=\$(QMCKL_ROOT)/lib/libqmckl.a
|
||||
qmckl_h=\$(QMCKL_ROOT)/include/qmckl.h
|
||||
qmckl_f=\$(QMCKL_ROOT)/share/qmckl/fortran/qmckl_f.f90
|
||||
munit=\$(QMCKL_ROOT)/munit/munit.c
|
||||
munit=\$(QMCKL_ROOT)/munit/munit.c
|
||||
|
||||
shared: \$(shared_lib)
|
||||
static: \$(static_lib)
|
||||
|
|
Loading…
Reference in New Issue
Block a user