Skip to content

Commit

Permalink
[Template merge] fix version check in configure
Browse files Browse the repository at this point in the history
  • Loading branch information
flammie committed Sep 19, 2024
1 parent 0036597 commit 373b021
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/docsygen.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
name: Docs
on: [push]
on:
push:
branches:
- 'main'
jobs:
build-and-deploy:
build-and-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -25,7 +29,7 @@ jobs:
spellers: false
fst: hfst

# Mermaid processing starts here:
# Mermaid processing starts here:
- name: get list of files
id: getfile
run: |
Expand All @@ -35,22 +39,22 @@ jobs:
run: |
echo ${{ steps.getfile.outputs.files }}
# The actual Mermaid compilation
# The actual Mermaid compilation
- name: compile mermaid
uses: divvun/compile-mermaid-markdown-action@main
with:
files: ${{ steps.getfile.outputs.files }}
output: 'lang/docs/mermaid-svgs'
env:
HIDE_CODEBLOCKS: 1
# The next one must be declared, with an empty value, for paths to work for us:
# The next one must be declared, with an empty value, for paths to work for us:
ABSOLUTE_IMAGE_LINKS:
OUTPUT_FILE_TYPE: "svg"

- name: list generated svg fils
run: |
cd lang && ls -l docs/mermaid-svgs
# Mermaid processing ends here
# Mermaid processing ends here

- name: deploy gh pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
8 changes: 4 additions & 4 deletions m4/ax_compare_version.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
# ===========================================================================
#
# SYNOPSIS
Expand Down Expand Up @@ -79,7 +79,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 11
#serial 13

dnl #########################################################################
AC_DEFUN([AX_COMPARE_VERSION], [
Expand Down Expand Up @@ -146,7 +146,7 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
],
[.+],[
AC_WARNING(
[illegal OP numeric parameter: $2])
[invalid OP numeric parameter: $2])
],[])
# Pad zeros at end of numbers to make same length.
Expand All @@ -162,7 +162,7 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
[ne],[
test "x$A" != "x$B" && ax_compare_version=true
],[
AC_WARNING([illegal OP parameter: $2])
AC_WARNING([invalid OP parameter: $2])
])
])
Expand Down
14 changes: 7 additions & 7 deletions m4/giella-macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -667,13 +667,13 @@ AC_PATH_PROG([GTGRAMTOOL], [gtgramtool], [false])
AS_IF([test "x$enable_grammarchecker" != "xno"],
AX_PYTHON_MODULE(pip)
AC_MSG_CHECKING([whether we have gtgramtool])
AS_IF([test x$GTGRAMTOOL = xfalse],
AS_IF([test x$GTGRAMTOOL = xfalse],
[AC_MSG_ERROR([gtgramtool is needed for --enable grammarchecker.
on debian/ubuntu: sudo apt update; sudo apt install pipx; pipx ensurepath
on macbrew: brew install pipx; pipx ensurepath
then: pipx install git+https://github.com/divvun/giellaltgramtools
])]),
AC_MSG_RESULT(yes))
AC_MSG_RESULT([yes]))
_gtgramtool_min_version=0.7.0
gtgramtool_too_old_message="gtgramtool needs to be updated.
If you installed it with pipx, run:
Expand All @@ -683,12 +683,12 @@ AS_IF([test "x${GTGRAMTOOL}" != xno],
[_gtgramtool_version=$( "${GTGRAMTOOL}" --version | sed -e 's/^.*version //')],
[_gtgramtool_version=0])
AC_MSG_RESULT([$_gtgramtool_version])
AC_MSG_CHECKING([whether the gtgramtool version is at least $_gtgramtool_min_version])
AX_COMPARE_VERSION([$_gtgramtool_version], [ge], [$_gtgramtool_min_version],
[gtgramtool_version_ok=yes], [gtgramtool_version_ok=no])
AC_MSG_RESULT([$gtgramtool_version_ok])
AS_IF([test "x$enable_grammarchecker" != "xno"],
AC_MSG_CHECKING([whether the gtgramtool version is at least $_gtgramtool_min_version])
AX_COMPARE_VERSION([$_gtgramtool_version], [ge], [$_gtgramtool_min_version],
[gtgramtool_version_ok=yes], [gtgramtool_version_ok=no])
AS_IF([test "x${gtgramtool_version_ok}" != xno],
[AC_MSG_RESULT([$gtgramtool_version_ok])],
AS_IF([test "x${gtgramtool_version_ok}" != xno],,
[AC_MSG_ERROR([$gtgramtool_too_old_message])]))
Expand Down

0 comments on commit 373b021

Please sign in to comment.