make doc fails silently if FORD is not available

Issue #98 resolved
Stephen Biggs-Fox created an issue

If you run make doc but do not have FORD installed / available, then some preprocessing is done (so some make output messages are printed) but then nothing else happens. There is no error message to say that documentation was not built. This is confusing. There should be an error message to say something like: “FORD not available. Documentation not built. Please install FORD to build documentation, e.g. python3 -m pip install --user ford

Comments (10)

  1. David Dickinson

    We have the following in the makefile and the doc target should depend on this

    ifneq ("$(wildcard $(shell which $(FORD) 2>/dev/null))","")
    check_ford_install:
            $(call messageInfo,"Using ford at $(shell which $(FORD))")
    else
    check_ford_install:
            $(call messageInfo,"Ford command $(FORD) not in path -- is it installed?\\n\\tConsider installing with 'pip install --user ford' and add ${HOME}/.local/bin to PATH") ; which $(FORD)
    endif
    

    what’s the outcome of which ford on your system? What do you get if you run make check_ford_install?

  2. Stephen Biggs-Fox reporter
    • which ford has no output
    • make check_ford_install has the following output:

    Ford command ford not in path -- is it installed?
    Consider installing with pip install --user ford and add /home/steve/.local/bin to PATH
    Makefile:1016: recipe for target 'check_ford_install' failed
    make: *** [check_ford_install] Error 1

    Ah ha! I have found the problem. I was actually running make -j doc and the above error message was reported, just further up buried in amongst the Processing file ‘...' messages so I didn’t see it. This is easily solved by fixing the order of dependencies of the doc target. Micro-PR coming up in a few minutes…

  3. Stephen Biggs-Fox reporter

    Fix bug where missing Ford error message was lost

    This bug is not present in 8.0.3 or 8.0.4_RC but is present in next (d8aabb76). When running make -j doc with Ford not installed, the missing Ford error message gets lots in the output of the namelist_doc target. This is fixed by reversing the order of these two dependencies.

    Fixes #98

    → <<cset 7dc1279ae5db>>

  4. Stephen Biggs-Fox reporter

    Fix bug where missing Ford error message was lost

    This bug is not present in 8.0.3 or 8.0.4_RC but is present in next (1aefb86). When running make -j doc with Ford not installed, the error message reporting that Ford is missing gets lots in the output of the namelist_doc target. This is fixed by having namelist_doc depend explicitly on check_ford_install.

    Fixes #98

    → <<cset fbf4b285d1a8>>

  5. Log in to comment